Interactive PhysicsTM

Controls


[Up][Home][Help]

BHS -> Staff -> Mr. Stanbrough ->IP How-To Notes -> this page


It can get tedious going to the Properties Window to change some property of an object, particularly if you have to do it repeatedly. Also, if you are building a simulation for someone not familiar with the Interactive PhysicsTM program, you might not want them "messing around" in the Properties Window. Fortunately, Interactive PhysicsTM lets you add controls to a simulation, which solves both of these problems in a convenient way.


Adding A Control:

In Interactive PhysicsTM, you can create controls for:

To do so:

  1. Select the object with the mouse.
  2. Select the desired control from the "New Control" submenu of the Define Menu


Control Types:

There are four types of controls: sliders, text boxes, buttons, and tables. You will probably use sliders the most, and tables are a little "beyond the scope of this class"...

Sliders:

Slider control screen shot
Slider Properties Window screen shot
The slider is the default control - when you select "New Control" from the Define Menu, you get a slider. It is very versatile, and probably the one that you will use the most. The upper screen shot at the right shows a slider to control mass.

You can adjust the slider by dragging the slider with the mouse, or clicking in the slider area. You can also type a value directly into the text box. This value does not have to coincide with one of the slider values, but it must be between the minimum and maximum values set for the slider.

Opening the Properties Window for the control allows you to change its type by selecting one of the four icons. You can also set the minimum and maximum value for the slider. (This value does not affect the text box.) The "number of snaps" constrols the resolution of the slider. In the example at right, the slider will take on 20 values from 0.010 to 1.000 (inclusive). Unchecking the "Show text" box will cause the slider's text box to disappear.

Of course, you can use the Appearance Window to change the labels, colors, etc. of any control.

Text Boxes:

A text box control
text box properties window
You can change a control to a text box control from the control's Properties Window. The text box is the same one that appears (by default) with the slider, except there's no slider. You can enter any value into the text box control between the minimum and maximum values. 

Buttons:

The button can be used when you want to toggle between two values, either min or max as contained in the Properties Window.

Tables:

The table is a whole tale unto itself. Basically, what it allows you to do is have the control read values from a text file, such as a file saved from a spreadsheet or a data table. We won't be using it for our simple simulations.


[Up][Home][Help]

BHS -> Staff -> Mr. Stanbrough ->IP How-To Notes -> this page
last update July 19, 2000 by JL Stanbrough