Programming and Problem Solving by Connecting Diagrams

This is a demonstration of the VIP (View Interactive Programming) program. VIP allows the user to create scientific programs or to solve physics problems by connecting diagrams that represent physical and mathematical principles. The following example shows a specification for calculating the mass of the sun, following Newton's reasoning, by equating the gravitational attraction of the sun on the earth with the force required to keep the earth in circular motion.

This demo is created by selecting physical principles and connecting buttons on the diagrams to signify that quantities are equal. In the above diagram, the user first selects Physics from the command menu, then Force principles, then Gravitation to get a gravitation box and position it on the screen. Next, the user gets a Centrifugal Force box and adds it to the screen. By clicking on the f buttons in each box, the user signifies that these forces are equal; the system responds by drawing a line between the two f buttons.

The user selects Constant to obtain a menu of built-in constants, and then Mass and Earth to get a constant for the mass of the earth; this is connected to the two mass buttons in the boxes. Similarly, a Length constant for the Earth-Sun distance is connected to the two radius variables. The Output box is moved using the Move command and connected to the other mass button of the Gravitation box; this will be the answer, i.e. the mass of the Sun.

At this point, everything is specified in the diagram except the v button in the Centrifugal Force box; this is the velocity of the earth in its orbit. This can be found by noting that the earth goes around the sun in one year. The Geometry command is selected, and a Circle box is obtained. The radius of this circle is the Earth-Sun distance; by dividing the circumference of the circle by a time constant of one year, the velocity of the earth is obtained. The Op command allows a / box to be added to the picture. Finally, giving the Done command generates a program to do the calculation.

When the program is started, a window is created with a command menu and input and output areas. Use the command Output Language to select the desired language for the program that is created. (The actual program will be served to you in a file that is presented after the demo program is terminated.) Use the input lines to specify the name and type of each input variable, one per line, in the format shown. Examples are (radius integer) and (speed (units real mph)). Then select the command New Program to start VIP.

A VIP program is created by connecting diagram boxes that represent variables and physical and mathematical principles. A connection signifies that two quantities are equal. To make a connection, click the mouse, once for each end of the connection, on variable boxes or on "buttons" associated with diagrams. To get a useful program, there must be a connection to the OUTPUT box.

The VIP commands are as follows:

Note: For remote users, it may take several minutes before the connection to X is fully established. After clicking in an input area and typing, you may have to wait a few minutes before typing is echoed.


Instructions

  1. You must be logged in to a host running X windows.
  2. Type xhost + www.cs.utexas.edu (exactly as shown at left) in a window on that host to allow this server to write to your display.
  3. Enter your X display name here if needed; you may need to change what is shown in the box to your X display name. For example, myterminal.cs.utexas.edu:0.0
  4. Click to start the demo.
Gordon S. Novak Jr.