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:
Done Finished; make a program from the diagram.
Redo Start over.
Move Move a box. Click the box you wish to move.
Delete Delete a box or a connection.
Geometry Select a new geometric principle box.
Physics Select a new physical principle box.
Make Var Make a local variable.
Specify Type Specify the type of a variable.
This can also be used to specify units.
OP Make an operation box, such as
+ - * /.
Type-in Type in a numeric constant, with units if
desired.
Constant Select a predefined constant,
such as the speed of light.
You must have the Java virtual machine installed to run this demo; you can get it for Windows (msjavx86.exe) here.
The best things in life are free: this demo uses the free software Gnu Common Lisp (GCL), XGCL, X windows [see also XFree86], Java, and WeirdX, a Java implementation of an X server.