Title: AFXCORE
Subject: MFC Core RTF Help
Author: AFX

^#K$Overview

^# main_index

^K overview

^$ Overview

	SimStructure is a physics simulation program that is educational and fun.  It comes with several scenarios you can experiment with, some of which are like minor action games.  You can also use SimStructure to create new scenarios.
	There are two types of scenarios -- regular scenarios and design scenarios.  Regular scenarios are very non-structured.  They present a simulation of real world objects and you do what you like.  You can freely modify the objects and the settings  such as universal constants.  For example, one scenario involves a lunar lander.  There is no score built-in to this scenario, so you just fly it around and land on various terrain.  You can modify the lander, change the gravity of the planet or maybe change the density of the air.  
	The second type of scenario is a design scenario.  In design scenarios, you will be asked to design something to meet a goal such as minimum cost or maximum strength with limited materials.  For example, you may be asked to build a suspension bridge to span a certain distance with only certain pieces.  
	Vehicles are the strong point of SimStructure.  There is a programming language similar to C/C++ built-in to simstructure where you specify the control system for the vehicle.  You can design a rocket and adjust the feedback from it's guidance sensors so that it flys as you like, perhaps, under joystick control.
	Beginners may enjoy playing the scenarios and learning about physics by building structures.  Intermediate users with programming knowledge can design control systems for vehicles through trial and error.  Advanced users, who have studied control system theory can use SimStructure to test systematically designed controls.

Component types 

	Your structures and vehicles are built from seven types of components. Particles are the most basic component.  They appear as yellow circles.  Rigid bonds connect particles and appear as green lines.  They are stiff.  Rope bonds are red lines and behave like ropes.  Elastic bonds are black lines and behave like rubber bands.  Thrusters appear as blue trianges, foils appear as purple triangles and guns appear as cyan rectangles.

{bmc items.bmp}

	Getting Started  
	Modifying Scenarios  
	The Toolbar  
	Creating Scenarios  
	Tips  
	Warnings  
	File menu  
	Edit menu  
	View menu  
	Project menu  
	Preferences menu  
	Help menu  
	Methods  

^#K ^$Getting Started

^# getting_started

^K getting started

^$ Getting Started

	Open the scenario called "Start" by using the file menu "open" command.  Start the scenario by pressing the SPACE BAR or by using the toolbar button which looks like this:
{bmc runbar.bmp}
The keys to control the scenario will usually be displayed in the main window.  Use these keys or the joystick to interact while the simulation is running.  You can reset the simulation by pressing the ENTER key or by using the toolbar button which looks like this:
{bmc rstbar.bmp}

	When you feel comfortable starting, stopping and resetting the simulation, try the other scenarios.

^#K ^$Modifying Scenarios

^# modifying_scenarios

^K modifying scenarios

^$ Modifying Scenarios

	SimStructure is designed so that you can modify and expand scenarios.  The instructions for many scenarios will have suggestions for changes, but feel free to modify in any way that seems interesting to you.  If you wish to alter the explosiveness of a cannon ball or the stiffness of a structure, you can do it.  If you wish to add-on to a building or space ship, you can do that.  Expand a spaceship by adding sections with more thrusters and have two people fly it.    
	•Use the edit items toolbar button, {bmc edtbar.bmp}, to edit the attributes of items in the scenario.  After you press the button, click on items and change their attributes.  You can change the mass or explosiveness of particles in this way.  Or, you can change the spring constant, "k", of bonds.

	•Alter the settings for the scenario using the settings toolbar button, {bmc setbar.bmp}.

	•Use other Toolbar commands to move, add or delete items from the scenario. 

	•Make the scenario interactive using the adjustment controls feature.

	•Alter the command statements which control the scenario by bring-up the command window using the view menu.

^#K ^$Creating Scenarios

^# creating_scenarios

^K creating scenarios

^$ Creating Scenarios

	To create a scenario, use the "new" toolbar button, {bmc filenew.bmp}.  This will begin fresh, reseting all settings to their default values.  Then, select the settings toolbar button, {bmc setbar.bmp}, and set-up the settings.  If you are making an outer space scenario, uncheck the "ground present" box, check the "interpartical gravity" box and set the "air viscosity" to zero.  Next, create your structure or vehicle using the Toolbar .  If you are uncomfortable programming, use the adjustment controls feature while you are making your structure or vehicle to specify the user controls that will cause interaction during the simulation.  By entering adjustment controls when adding a thruster, for example, you can cause that thruster to respond to the joystick or keyboard.

	A more flexable method for adding interaction involves using the command window .  Use the view menu to bring-up the command window.  Place commands in the command window and they will execute during a simulation.  See the Tutor*.sim series of scenarios to learn the command syntax.

	Add scenario instructions by entering text preceeded by a "/*" and followed by a "*/" into the command window.  This is the format for C sytle comments.

	To set the strength of bonds in new scenarios, use the bondmargin command in the terminal window .  First, use "bondmargin Inf" to set all bonds to unbreakable.  Then, start the simulation and generate some forces on the bonds to collect data.  Next, use the "bondmargin" command with a percent to set the strength of bonds.  Try the "bondrep" command and check the percent column for the safety factor.  This percent will be different because "bondmargin" works-off the max-min force range and centers on the average while the "bondrep" precent is just the max of the tensile and compressive utilizations.  Repeatedly apply the "bondmargin" command until you find strengths you are happy with.

	When collecting data for the "bondmargin" command, try to push the vehicle or structure just to the limits of acceptable performance.  Fly an airplane or lander in all ways acceptable, but no more.  When collecting data for a building to implode use the quake feature in the settings dialog to stress the structure a little.  This is important for horizontal beams because they do not get much stress without quakes.

	Use the "round" terminal window command when designing new scenarios to move particles to evenly spaced locations.  If you apply the "round" several times, gradually increasing or decreasing the interval, you can scale the object.

^#K ^$Tips

^# tips

^K tips

^$ Tips

	•You can inspect the value of attributes using the terminal window which you activate with the view menu.  On the last line of the window, enter a statement like:

>p1.mass
 ans : 1
> 

	•You can modify the value of attributes or built-in variables using by typing assignments in the terminal window:

>b1.compressive_strength=100
 new value : 100
> 

	•You can abbreviate attribute names in expressions.  The following sets bond, b1's, tensile_strength to it's compressive_strength.

>b1.ten=b1.comp
 new value : 100
> 

	•You can abbreviate terminal window commands as long as you use three letters or more and it is not ambiguous.  The following highlights bond, b12, on the screen:

>high b12
> 

	•The save command and toolbar button will be disabled if no modifications have been made to the scenario.  If you just change a setting, SimStructure will not consider that a significant change.  You can see if the scenario has been modified by looking at the save scenario toolbar button.  

	•The following is a way to smoothly adjust bond length.  This method considers the fact that a bond might be displaced from equilibrium.  It converges on the desired new length exponentially.  Experiment with values for the period (the ".01" in brackets) and convergence rate constant (the ".05"). 

double current_length,desired_length;
[.01]current_length=b4.length+b4.displacement;
[.01]desired_length=30-20*(joy("but1")+key("2"));
[.01]b4.length=current_length+.05*(desired_length-current_length);

	•The air currents created by explosions can be adjusted by changing the "Explosive Constant" on the "General" page of the settings.  This will not change the radius of the crator or the size of the flash.  The radius of the crator can be adjusted by changing the "Ground Hardness" on the "Ground" page of the settings.

^#K ^$Warnings

^# warnings

^K warnings

^$ Warnings

	•Keystrokes will be sent to the active window.  A window becomes active when you click the mouse on it.  If you move the command window or terminal window, they will become active, capturing all the keystrokes.  If you are running a simulation and trying to control it with the keyboard, you will need to click on the title bar or some other area of the main SimStructure window to reactivate it.  

	•When creating your own scenarios, save them before you run them especially if you have modified the command window commands because the compiler sometimes crashes.  If it does crash, the offending code may be highlighted in the command window.

^#K ^$Changes from version 3.01 to 3.02:

^# current_release

^K current release news

^$ Current Release News

	•Bug with earthquake amplitudes and periods has been fixed.
	•Particles have "heading" attribute added.

Changes from version 3.00 to 3.01:
	•A "sound" function has been added so scenarios can have custom sound effects.
	•A new time identifier, "$", has been added which causes statements toexecute at the time sound values are loaded into buffers.  Three new variables go along with this--"sound_t", "sound_left" and "sound_right".
	•Undo/Redo have been added.
	•Assignments to quake_period and amplitude made in the command window are now smoothed by phase shifting to keep quakes continuous.
	•More Scenarios are included and all scenarios have long filenames.
	•An install and uninstall program is available
	•The syntax in the command window has changed.  Time identifiers have been moved in front of statements, conditional statements (if ... else ...) have been added, statement blocks can be created with braces and a new time identifier must be used for screen commands.  If you have files that need to be converted, I will assist.
	•A new bond attribute has been added called "utilization".  This gives the percent of the maximum force the bond is enduring. 
	•Rope bonds show slack when compressed.  Rigid bonds deform when compressed.  Width decreases when bonds are stretched.
	•Bond stress can be displayed with a color code.  In this mode, bonds in tension appear as dotted lines.
	•Warning pop-up windows can be disabled using the preferences menu.
	•The project "Differences" command now compares the text of the command window.
	•A "CONTROLS" command has been added to the terminal window to list the defined adjustment controls for a scenario.
	•User skill level modes have been added to the preferences menu.  These can be used to reduce the number of pop-up warning windows.
	•An option called "no refresh interpolation" has been added to the settings, "Simulation" page.  This option causes calculations to be performed in a consistent manner suitable for design contests.  
	•A function "overlap" has been added that makes it easier for a scenario creator to create a rule that prevents particle overlap in design projects.
	•Variable rate time identifiers.  After each moment the identifier is invoked, the expressions for period, delay and expiration time are recalculated.
	•Fixed bug which caused SimStructure to start-up slowly.
	•Added load time, run time and save time prompts for text in the command window.
	•Added "STUDENT" command to terminal window to prevent scores from being reset on save.

Changes from version 2.03 to 3.00:
	•Water has been added.  Just dig below it's depth and it will appear.
	•Design project are now supported.  To make your own design project, place statements like the following in your materials list window and lock the scenario with a password.

particle "JOINT" 5 : mass=5,charge=?,label="x",cost=5*charge;
particle "JOINT" 10 of mass : cost=10; //10 units of mass distributed any way
rigid "I beam" 5 :(length<10 "Too Short"),k=20,compressive_strength=10000/length,cost=10+length;

	•Air now has density.  This allows hot-air balloons.  This value also affects the lift of foils.  Air resistance has been replaced with density.
	•Arbitrary forces can be applied to particles.  Currently, this is done through the command window using the "force" keyword.
	•Color can be set for items and the background.  Currently, this can only be done through the terminal and command windows.
	•Bonds width can be adjusted.  Currently, this can only be done through the terminal, material list and command windows.
	•Support for more sound cards.
	•Realistic default settings for universal constants and properties of the ground and air are now used.
	•Foils are more realistic and they now use the names span, chord and camber for length, width and thickness.
	•Functions are available for summing values over a range of particles.  See sump, minp, maxp, avgp .
	•The first bond to break in a simulation will flash upon reset.  This is helpful for improving structural designs.
	•Several variables have been added for design projects.  See design project built-in variables
	•Support for more joystick buttons and controls. (These are untested.)
	•You can set the position and velocity of particles in the pop-up dialog boxes.  
	•You can set the length of bonds in the pop-up dialog boxes.  This is useful for putting bonds in compression, for example.
	•The scale for explosiveness has been modified.  The size of the flash and crator increase with the cube root of explosiveness.  (This is more accurate but I have no idea what it should be!)
	•The "line" command now has an optional width parameter.
	•The "bondmargin max" command has been changed to "bondmargin infinity"to make it more consistent. 
	•The .sim file format has been changed to a compressed format.
	•You can set the time between particle trail dots using the "display" page of the settings.
	•Particles have volume and density attributes.
	•You can email scenarios from the FILE menu.
	•A score mechanism has been added.  For scenarios with scores, you can display them using the SCORES command on the view menu.  To add scoring to your scenarios, assign to the built-in variable, "score".  To record an entry in the scoring history, assign a non-zero value to the built-in variable, "set_score".  See design project built-in variables for information on these variables. 

Changes from version 2.03 to 2.04:
	•The screen refresh rate can be adjusted using the settings command.  By checking the "maximize refresh rate" box, you can make SimStructure adjust the refresh rate to fully utilize your CPU. 
	•Screen updates are double buffered, eliminating flicker.
	•When moving particles during a simulation, bond length stay fixed.  A new setting called "move particle strength" controls how much force is applied when particles are moved.
	•Units of measure have been added.
	•The ground elevation can be edited with the mouse even while a simulation is running.
	•Plot window axes labels and hash marks have been added.
	•Use the right mouse button to edit items as an alternative to the "E" toolbar button.  This only works when the simulation is not running.Therefore, you can still use the right mouse button to control things during a simulation.
	•The accuracy of particle collisions has been improved so they almost conserve energy. 
	•Bullets can be set to explode after a delay.  See  "Ship3.sim" for an example.
	•Collisions are now loud or quiet.  Their volume is scaled by a new setting--"collision sound scale."
	•Sound fades away off screen and the stereo sound bug has been fixed.
	•The numeric keypad is now supported.
	•Explosions are calculated differently.  They are no longer discrete events and the force is inversely proportional to the square of the distance from the center instead of the cube.
	•You can enter infinity for ground viscosity and submerged particles will not move.  This speeds calculations.  It does not work with quakes, however.
	•The spot for editing guns is now the center instead of the muzzle.
	•The velocity function V() has been changed so it is the derivative of the distance function D().  A negative value of V() means particles are approaching.  A positive value means the particles are getting further apart.

Changes from version 2.02 to 2.03:
	•SimStructure now has stereo sound effects!
	•A velocity-squared air resistance is now available in addition to the straight velocity air viscosity.
	•Scenario instructions now conceal the command portion of the program code making the instructions more visually appealing.
	•The coordinates of the mouse cursor are now displayed in the status bar.
	•The item attributes, "dx" and "dy" have been changed to "dxdt" and "dydt", making them more mathematically correct.

^#K ^$Future Releases

^# future_releases

^K future releases

^$ Future Releases

	The following are possible future features.  There is no guarentee that they will ever be added to SimStructure.  Please e-mail any ideas you have about features you'd like to see added to SimStructure to SimStructure@Hare.com.

	•3 Dimensions so things like gyroscopes and boomerangs can be simulated.
	•Hinges and rigid joints.  In general torsional springs with ranges.
	•Linear bearings -- sliders.
	•Density for bonds
	•An option to enter density for particles
	•Water waves.
	•Fix foils so they are more accurate when not parallel to the wind.  Make the effects of viscosity on foils accurate.  Make foils work when partially submerged in two mediums.  Water foils seem wrong.  Make foils feel explosion winds.
	•Improve the accuracy of explosions, in all different mediums.
	•Coefficient of drag for particles.
	•Bonds that break when hit by particles or cause particles to bounce.  3 Dimensional plates that break or reflect particles.
	•A choice of sound effects on a per particle, gun or thruster basis.  This would allow a hiss for thrusters in space and a roar for rocket thrusters.  And, it would allow a cannon or rifle effect for guns.
	•Make select item dialog box pop-up out of the way so you can view the items in question.
	•A periodic coordinate system so the world wraps around if you wish.  This might be tied to window size.
	•A ground_slope function to conveniently access the slope of the ground at a given X coordinate.
	•Matrix arithmetic in expressions.
	•Filters defined by matrices so you can import and use MATLAB filter matrices.
	•Allow entry of commands in terminal window on lines besides the last line.
	•More keys to the adjustment control list and key() functions.
	•A key3 function which returns the ascii of the most recently pressed key.
	•Cut & Paste boxes, use of the clipboard and group selection.  Implement group selections with commands like BONDMARGIN.  Add rectangular and polar copying.
	•Floating toolbar for item addition, to free-up space on the regular toolbar.
	•Dockable command window, material list window, plot window and terminal window.
	•Multiple plot windows.
	•Add user color and width selection boxes.
	•Make so beginner, intermediate, advanced and expert modes do more.
	•Full-screen mode
	•Include files
	•"For" loops
	•User defined functions
	•The ability to generate file that can be played-back in real-time for simulations that are too slow.
	•ABS and ARG/ANGLE functions to convert to polar coordinates.
	•s2w and w2s functions to transfer between screen and world coordinates.
	•Different color particle trails for each particle
	•Allow nestled sump,maxp,minp, etc functions.  This will make possible use of these functions from within the material list.  Come-up with a way to use summing functions in a multitasking application--screen updates time identifiers  interfere with other time identifiers. 
	•Add an AUTOCAD snap feature.
	•Allow abbreviated local attribute names in the material list or sump, minp, maxp, etc. functions.
	•Special assignment to label attribute of new items created through the material list--specify a prefix and an asterisk that gets converted into unique numbers.
	•Expand the power of wild-card label matching, possible to include regular expressions.
	•Expand the power of time identifiers syntax to make specifying a set of update times possible.  Perhaps, use of a matrix?
	•Create time identifiers for various window's events, such as key-up, key-down.
	•Provide options for how items are sorted when shown in terminal window commands such as BONDREP, and WHO.
	•Make so particles don't pop-up when leaving the ground.

Internal changes that programmers can help with:
	•Improve the efficiency of the expression evaluator by making it a non-recursive function.
	•Improve the efficiency of the scheduler for time identifiers.
	•Make so particles get destroyed when someone assigns a non-zero value to the "destroyed" attribute in the command window.
	•Come-up with a way to handle screen refresh time identifiers that are nestled inside another time identifier.
	•Add bullet color to gun attributes.
	•Replace array references to differential equation data with structure references.
	•Fix material list scrolling bug.  Show warning messages better.
	•No context help when simulation is running.
	•"No Refresh Interpolation" timing is inaccurate.
	•Lex bug which requires non-eof token after numbers.  Remove kludges that work-around it.
	•Make so interparticle_gravity, water_present, ground_present, etc. are read write and get updated whenever changed from outside expression evaluator.

Scenario creation items:
	•Uncover formulas for bond moment strength, compressive strength,tensile strength, spring constant, bending constant for beams as a function of length for various materials including steel, concrete and wood.
	•Research the relationship between real earthquakes and ground movement so scenarios with realistic quakes can be created. 

^#K ^$Methods

^# methods

^K methods

^$ Methods

	SimStructure uses and adaptive-step sized Runge-Kutta differential equation solver to perform simulation calculations.  Because the step size varies, it interpolates in time to reach a desired instant.  This linear interpolation introduces a source of error into the simulation because the positions and velocities of particles don't really change linearly in time.

	Foils are very inaccurate.  SimStructure is way-off in it's handling of foils at an angle to the wind.  The effects of viscosity on foils is wrong, too.  And, foils do not yet feel the effects of explosion winds.

	Structures made in SimStructure do not take into account moment strengths, yet.  This is a major weakness because moment strengths are very important in structural design.

	Explosions are ficticious.  They are not even close to accurate.

See air_viscosity and air_density for a discussion of foils.  Note that foils work the same in the water and in the ground.

See general builtin variables for a discussion of gravity, the electrostatic force, collisions and explosions.

^#K ^$File menu commands

^# menu_file

^K files: managing

^$ File menu commands

The File menu offers the following commands:

New | Creates a new document.
Open | Opens an existing document.
Close | Closes an opened document.
Save | Saves an opened document using the same file name.
Save As | Saves an opened document to a specified file name.
Send... | Sends the active document through electronic mail.
Exit | Exits SimStructure.

^#Edit menu commands

^# menu_edit

The Edit menu offers the following commands:

Undo | Reverse previous editing operation.
Redo | un-Reverse previous editing operation.
Cut | Deletes data from the document and moves it to the clipboard.
Copy | Copies data from the document to the clipboard.
Paste | Pastes data from the clipboard into the document.

^#View menu commands

^# menu_view

The View menu offers the following commands:

Toolbar | Shows or hides the toolbar.
Status Bar | Shows or hides the status bar.
Terminal Window | Shows or hides the terminal window.
Plot Window | Shows or hides the plot window.
Commands Window | Shows or hides the command window.
Materials List Window | Shows or hides the materials list window.
Scores | Shows scores.

^#K ^$Project menu commands

^# menu_project

^K project menu

^$ Project menu commands

The Project menu offers the following commands:

Restart Project | Removes added items and restores sattings.
Differences | Shows changes made to project.
Scenario Lock | Locks or Unlocks the project.

^#K ^$Preferences menu commands

^# menu_preferences

^K preferences menu

^$ Preferences menu commands

The Preferences menu offers the following commands:

Beginner Mode | Set to beginner user mode.
Intermediate Mode | Set to intermediate user mode.
Advanced Mode | Set to advanced user mode.
Expert Mode | Set to expert user mode.

^#Help menu commands

^# menu_help

The Help menu offers the following commands, which provide you assistance with this application: 

Scenario Instructions | Offers you help on the current scenario
Help Topics | Offers you an index to topics on which you can get help.
About | Displays the version number of this application.

^#K ^$ New command (File menu)

^# HID_FILE_NEW

^K files: managing

^$ File New command

Use this command to create a new document in SimStructure.  
You can open an existing document with the Open command.

Shortcuts
Toolbar:	{bmc filenew.bmp}
Keys:	CTRL+N

^#K ^$ Open command (File menu)

^# HID_FILE_OPEN

^K files: managing

^$ File Open command

Use this command to open an existing document in a new window.

You can create new documents with the New command.

Shortcuts
Toolbar:	{bmc fileopen.bmp}
Keys:	CTRL+O

^#File Open dialog box

^# AFX_HIDD_FILEOPEN

The following options allow you to specify which file to open:
File Name
Type or select the filename you want to open.  This box lists files with the extension you select in the List Files of Type box. 
Drives
Select the drive in which SimStructure stores the file that you want to open. 
Directories
Select the directory in which SimStructure stores the file that you want to open.
Network...
Choose this button to connect to a network location, assigning it a new drive letter. 

^#K ^$ Close command (File menu)

^# HID_FILE_CLOSE2

^K files: managing

^$ File Close command

Use this command to close the active document.  SimStructure suggests that you save changes to your document before you close it.  If you close a document without saving, you lose all changes made since the last time you saved it.  Before closing an untitled document, SimStructure displays the Save As dialog box and suggests that you name and save the document.

^#K ^$ Save command (File menu)

^# HID_FILE_SAVE

^K files: managing

^$ File Save command

Use this command to save the active document to its current name and directory.  When you save a document for the first time, SimStructure displays the Save As dialog box so you can name your document.  If you want to change the name and directory of an existing document before you save it, choose the Save As command.

Shortcuts
Toolbar:	{bmc filesave.bmp}
Keys:	CTRL+S

^#K ^$ Save As command (File menu)

^# HID_FILE_SAVE_AS

^K files: managing

^$ File Save As command

Use this command to save and name the active document.  SimStructure displays the Save As dialog box so you can name your document.  

To save a document with its existing name and directory, use the Save command.

^#Send command (File menu)

^# HID_FILE_SEND_MAIL

Use this command to send the active document through electronic mail.  This command presents a mail window with the active document attached to it.  You may then fill out the To: field, Subject: field, etc., and add text to the body of the message if you wish.  When you are finished you may click the "Send" button to send the message.

Note that the default address is SimStructure@Hare.com.  This is so you can easily send scenarios to be posted on the SimStructure web site.  Simply change the address to another address if you wish to email a friend instead.

^#File Save As dialog box

^# AFX_HIDD_FILESAVE

The following options allow you to specify the name and location of the file you're about to save:
File Name
Type a new filename to save a document with a different name.  SimStructure adds the extension you specify in the Save File As Type box.
Drives
Select the drive in which you want to store the document.
Directories
Select the directory in which you want to store the document.
Network...
Choose this button to connect to a network location, assigning it a new drive letter. 

^# ^K ^$ 1, 2, 3, 4 command (File menu)

^# HID_FILE_MRU_FILE1

^K files: managing

^$ File 1, 2, 3, 4 command

Use the numbers and filenames listed at the bottom of the File menu to open the last seven documents you closed.  Choose the number that corresponds with the document you want to open.

^#K ^$ Exit command (File menu)

^# HID_APP_EXIT

^K exit

^$ File Exit command

Use this command to end your SimStructure session.  You can also use the Close command on the application Control menu.  SimStructure prompts you to save documents with unsaved changes.

Shortcuts
Mouse:	Double-click the application's Control menu button.
	{bmc appexit.bmp}
Keys:	ALT+F4

^#Undo command (Edit menu)

^# HID_EDIT_UNDO

Use this command to reverse the last editing action.  Up to 64 commands can be reversed.  Use Redo to undo the undo command.

Shortcuts

Keys:	CTRL+Z or
	ALT-BACKSPACE

^#Redo command (Edit menu)

^# HID_EDIT_REDO

Use this command to reverse the undo command.

Shortcuts

Keys:	CTRL+Y

^#Cut command (Edit menu)

^# HID_EDIT_CUT

Use this command to remove the currently selected data from the document and put it on the clipboard.  This command is unavailable if there is no data currently selected.

Cutting data to the clipboard replaces the contents previously stored there.

Shortcuts
Toolbar:	{bmc editcut.bmp}
Keys:	CTRL+X

^#Copy command (Edit menu)

^# HID_EDIT_COPY

Use this command to copy selected data onto the clipboard.  This command is unavailable if there is no data currently selected.

Copying data to the clipboard replaces the contents previously stored there.

Shortcuts
Toolbar:	{bmc editcopy.bmp}
Keys:	CTRL+C

^#Paste command (Edit menu)

^# HID_EDIT_PASTE

Use this command to insert a copy of the clipboard contents at the insertion point.  This command is unavailable if the clipboard is empty.

Shortcuts
Toolbar:	{bmc editpast.bmp}
Keys:	CTRL+V

^#K ^$ Toolbar command (View menu)

^# HID_VIEW_TOOLBAR

^K toolbar

^$ View Toolbar Command

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in SimStructure, such as File Open.  A check mark appears next to the menu item when the Toolbar is displayed.

See Toolbar for help on using the toolbar.

^#K ^$ Toolbar

^# AFX_HIDW_TOOLBAR

^K toolbar

^$ toolbar

{bml hlptbar.bmp}

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to many tools used in SimStructure,

To hide or display the Toolbar, choose Toolbar from the View menu (ALT, V, T).

Click	To
{bmc filenew.bmp}	Open a new document.

{bmc filesave.bmp}	Save the active document or template with its current name.  If you have not named the document, SimStructure displays the Save As dialog box.

{bmc zmpbar.bmp}	Zoom in.

{bmc zmmbar.bmp}	Zoom out. 

{bmc ctrbar.bmp}	Centers the screen on the center of mass of all particles.  Note that this cancels partical tracking.

{bmc trkbar.bmp}	Track a particle.  After clicking this, select a particle and SimStructure will keep the screen centered on it.  Clicking the track toolbar button again or adjusting the scroll bars will cancel tracking.

{bmc edgbar.bmp}	Edit Ground.  After clicking this, left click the mouse to add points to the ground or right click to reset the ground to zero everywhere.

{bmc runbar.bmp}	Run/Stop simulation.  Click this to start and stop the simulation.  

{bmc rstbar.bmp}	Reset the simulation.  This will return the simulation to the initial values.

{bmc capbar.bmp}	Capture the current state of the simulation.  This will modify the stored initial values to match the current state of the simulation.  Be careful because you will lose the old initial values.

{bmc setbar.bmp}	Modify settings.  This produces a dialog box of settings you can modify.  You can change them while a simulation is running and they take effect immediately.

{bmc parbar.bmp}	Add particles.  This produces a dialog box which specifies the attributes for the particles you wish to add.  After closing the box, click where you wish to place new particles.

{bmc elabar.bmp}	Add elastic bonds.  Elastic bonds are like rubber bands which shrink to zero length.  This button produces a dialog box which specifies the attributes of elastic bonds you wish to add.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

{bmc rigbar.bmp}	Add rigid bonds.  Rigid bonds are like springs with non-zero length. This button produces a dialog box which specifies the attributes of rigid bonds you wish to add.  The default settings produce bonds which are fairly stiff.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

{bmc ropbar.bmp}	Add rope bonds.  Rope bonds are like ropes or cables.  They do not support compression.  This button produces a dialog box which specifies the attributes of rope bonds you wish to add.  The default settings produce bonds which are fairly stiff.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

{bmc movbar.bmp}	Move particles.  After pressing this toolbar button, press the mouse button near a particle you wish to move, hold the mouse button while moving to a new location and release.  You can continue moving other particles.  This command can be done while a simulation is running, allowing for real-time interaction.

{bmc delbar.bmp}	Delete items.  After pressing this toolbar button, press the mouse button near a particle, bond, thruster, foil or gun you wish to delete.  For bonds or guns, click near the middle.  For thrusters, click near the bottom of the thruster.  For foils and guns, click near the front.

{bmc tchbar.bmp}	Touch items.  This is used to rapidly modify many items in the same way.  After pressing this toolbar button, press the mouse button near items to update their attributes with the most recent values from the corresponding item attribute dialog box.  For example, to change the mass of existing particles, click the particle toolbar button to bring-up the particle attribute dialog box, modify the mass, close the box, click the touch button and click near particles you wish to modify.

{bmc edtbar.bmp}	Edit item Attributes.  After pressing this toolbar button, press the mouse button near items to modify their attributes.  Note that this is useful for capturing attributes so they can be stored with the touch command -- it can act like the eye-dropper command in paint programs.

{bmc velbar.bmp}	Set initial velocity of particles.  After pressing this toolbar button, press the mouse button near a particle who's velocity you wish to modify and hold it while moving to a new location indicating the direction and magnitude of the desired velocity vector.  This command can be used while a simulation is running to modify particle velocities.  It is helpful to use the "display velocity vector" toolbar button in conjuction with this button.  Note you can adjust the scale of the velocity vectors under the settings dialog box which you reach with the "modify settings" toolbar button.

{bmc gunbar.bmp}	Add guns.  A dialog box will appear allowing you to specify the attributes of the guns you wish to add.  After closing the box, add a new gun by pressing the mouse button near the particle which you want to be the muzzle of the gun and hold the mouse button while moving to a particle which you wish to be the back of the gun.

{bmc thrbar.bmp}	Add thrusters.  A dialog box will appear allowing you to specify the attributes of thrusters you wish to add.  After closing the box, add a new thruster by pressing the mouse button near the particle you wish the thruster to be attached to and hold the mouse button while moving to another particle which you wish to use as a reference.  The thruster will always point to the reference particle unless you set the angle of the thruster to a non-zero value.

{bmc foibar.bmp}	Add foils.  A dialog box will appear allowing you to specify the attributes of the foils you wish to add.  After closing the box, add a new foil by pressing the mouse button near the particle which you want to be the leading edge of the foil and hold the mouse button while moving to a particle which you wish to be the trailing edge.

{bmc grdbar.bmp}	Toggle grid display.  Click to display the grid.  The spacing of the grid can be adjusted using the settings command.

{bmc bstbar.bmp}	Toggle bond stress display.  Click to display the bond stress using a color code.  Bonds in tension appear as dotted lines.

{bmc chabar.bmp}	Toggle display charge.  Click to cause the charge of particles to be indicated with colored circles.  Green circles will be drawn around positively charged particles while red ones anound negatively charged particles.

{bmc masbar.bmp}	Toggle mass display.  Click to cause a purple circle to be drawn around particles indicating their relative mass.

{bmc dvebar.bmp}	Toggle velocity vector display.  Click to cause blue vectors to be drawn from particles indicating their velocities.  The scale of these vectors can be adjusted in the settings dialog box using the "modify settings" toolbar command.

{bmc labbar.bmp}	Toggle label display.  Click to display the labels of all items.  Note that labels will be drawn on top of each other when items are in the same place.  Use the Terminal Window "who" command to list labels of all items.

{bmc trabar.bmp}	Toggle particle trails display.  Click to display trails for particles as they move. 

^#K ^$ Zoom In command (Toolbar)

^# HID_ZOOM_IN

^K zoom in

^$ Zoom In command

Use this command to zoom in.  Note that the zoom setting gets saved when the file gets saved.

Shortcuts
Toolbar:	{bmc zmpbar.bmp}

Keys:	z

^#K ^$ Zoom Out command (Toolbar)

^# HID_ZOOM_OUT

^K zoom out

^$ Zoom Out command

Use this command to zoom out.  Note that the zoom setting gets saved when the file gets saved.

Shortcuts
Toolbar:	{bmc zmmbar.bmp}

Keys:	x

^#K ^$ Center Screen command (Toolbar)

^# HID_CENTER

^K center screen

^$ Center Screen command

Use this command to centers the screen on the center of mass of all particles.  Note that this cancels partical tracking.

Shortcuts
Toolbar:	{bmc ctrbar.bmp}

Keys:	c

^#K ^$ Track Particle command (Toolbar)

^# HID_TRACK_PARTICLE

^K track particle

^$ Track Particle command

Use this command to keep the screen centered on a particular particle.  After activating this command, select a particle and SimStructure will keep the screen centered on it.  Clicking the track particle toolbar button again or adjusting the scroll bars will cancel tracking.

Shortcuts
Toolbar:	{bmc trkbar.bmp}

^#K ^$ Edit Ground Elevation command (Toolbar)

^# HID_EDIT_GROUND

^K edit ground

^$ Edit Ground command

Use this command to edit the elevation of the ground.  After selecting this mode left click the mouse add new reference points to the ground.  Right click to reset the elevation to zero everywhere.

Shortcuts
Toolbar:	{bmc edgbar.bmp}

^#K ^$ Run/Stop command (Toolbar)

^# HID_RUN_STOP

^K run/stop simulation

^$ Run/Stop command

Use this command to start and stop the simulation.  Before a simulation begins, all values and positions of particles are saved so that the initial conditions can be restored by a Reset command.  Stopping the simulation only pauses--it does not reset the simulation. 

Shortcuts
Toolbar:	{bmc runbar.bmp}

Keys:	<SPACE> or "!"

^#K ^$ Reset command (Toolbar)

^# HID_RESET

^K reset simulation

^$ Reset command

Use this command to reset SimStructure to the initial values for the current system of particles.  This command will stop a simulation in progress.

Shortcuts
Toolbar:	{bmc rstbar.bmp}

Keys:	<ENTER>

^#K ^$ Capture command (Toolbar)

^# HID_CAPTURE

^K capture state of system

^$ Capture command

Use this command to replace the initial conditions with the current state of particles and other items.  Be careful because you lose the old initial conditions!

This command is useful when you wish the system to start at an equilibrium.  You can start a simulation that's not at an equilibrium, wait for it to reach an equilibrium and capture it. 

This command will stop a simulation that's in progress.

Shortcuts
Toolbar:	{bmc capbar.bmp}

^#K ^$ Modify Settings command (Toolbar)

^# HID_SETTINGS

^K modifying settings

^$ Modify Settings command

Use this command to pop-up the settings dialog box.  The box allows you to change universal constants and other built-in variables.  The changes can be made while a simulation is running.

See adjustment controls for an explaination of these special attributes.

Shortcuts
Toolbar:	{bmc setbar.bmp}

Keys:	s

^#K ^$ Add Particles command (Toolbar)

^# HID_PARTICLE

^K particles, adding

^$ Add Particles command

Use this command to add particles.  A dialog box which specifies the attributes for the particles you wish to add will appear.  After closing the box, click the mouse where you wish to place new particles.

Shortcuts
Toolbar:	{bmc parbar.bmp}

Keys:	p

^#K ^$ Add Elastic Bonds command (Toolbar)

^# HID_ELASTIC

^K elastic bonds, adding

^$ Add Elastic Bonds command

Use this command to add elastic bonds.  Elastic bonds are like rubber bands which shrink to zero length.  A dialog box which specifies the attributes of the elastic bonds you wish to add will appear.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

Shortcuts
Toolbar:	{bmc elabar.bmp}

Keys:	e

^#K ^$ Add Rigid Bonds command (Toolbar)

^# HID_RIGID

^K rigid bonds, adding

^$ Add Rigid Bonds command

Use this command to add rigid bonds.  Rigid bonds are like springs with non-zero length.  A dialog box which specifies the attributes of the rigid bonds you wish to add will appear.  The default settings produce bonds which are fairly stiff.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

Shortcuts
Toolbar:	{bmc rigbar.bmp}

Keys:	r

^#K ^$ Add Rope Bonds command (Toolbar)

^# HID_ROPE

^K rope bonds, adding

^$ Add Rope Bonds command

Use this command to add rope bonds.  Rope bonds are like ropes or cables.  They do not support compression.  A dialog box which specifies the attributes of the rope bonds you wish to add will appear.  The default settings produce bonds which are fairly stiff.  After closing the box, connect particles with bonds by pressing the mouse button near one particle and holding it while you move and release near another.

Shortcuts
Toolbar:	{bmc ropbar.bmp}

Keys:	o

^#K ^$ Move Particles command (Toolbar)

^# HID_MOVE_PARTICLE

^K moving particles

^$ Move Particles command

Use this command to move particles.  After selecting this command, press the mouse button near a particle you wish to move, hold the mouse button while moving to a new location and release.  You can continue moving other particles.  This command can be used while a simulation is running, allowing for real-time interaction.

Shortcuts
Toolbar:	{bmc movbar.bmp}

Keys:	m

^#K ^$ Delete Items command (Toolbar)

^# HID_DELETE

^K deleting items

^$ Delete Items command

Use this command to delete items.  After selecting this command, press the mouse button near a particle, bond, thruster, foil or gun you wish to delete.  For bonds or guns, click near the middle.  For thrusters, click near the bottom of the thruster.  For foils, click near the front. 

Alternatively, the Terminal Window can be used to delete items.

Shortcuts
Toolbar:	{bmc delbar.bmp}

Keys:	Delete
		d

^#K ^$ Touch Items command (Toolbar)

^# HID_TOUCH

^K touching items

^$ Touch Items command

Use this command to rapidly modify the attributes of many items.  After selecting this command, press the mouse button near items to update their attributes with the current values from the corresponding attributes dialog box.  For bonds and guns, click near the middle.  For thrusters, click near the bottom of the thruster.  For foils, click near the front.

For example, to copy an existing item's attributes to other items, select the Edit Attributes command from the toolbar, click near an item who's attributes you wish to copy and close the item attribute dialog box.  This sets the values for the attributes to be copied.  Select the TOUCH toolbar command and click near items you wish to update.  The items must be of the same type as the item you selected as the source.

Alternatively, the Terminal Window can be used to edit item attributes.

Shortcuts
Toolbar:	{bmc tchbar.bmp}

Keys:	t

^#K ^$ Edit Attributes command (Toolbar)

^# HID_EDIT_ATTRIBUTES

^K editing attributes

^$ Edit Attributes command

Use this command to edit the attributes of items.  After selecting this command, press the mouse button near items to bring-up a dialog box for editing their attributes.  Note that for bonds and guns you should click near the middle.  For thrusters, click near the bottom of the thruster.  For foils, click near the front.

Alternatively, the Terminal Window can be used to edit item attributes.

Shortcuts
Toolbar:	{bmc edtbar.bmp}

Keys:	Ctrl E

^#K ^$ Set Velocities command (Toolbar)

^# HID_SET_VELOCITY

^K setting velocities

^$ Set Velocities command

Use this command to set velocities of particles.  After selecting this command, press the mouse button near a particle who's velocity you wish to modify and hold it while moving to a new location indicating the direction and magnitude of the desired velocity vector.  This command can be used while a simulation is running to modify particle velocities.

It is helpful to use the Display Velocity  command in conjuction with this button.  You can adjust the scale of the velocity vectors under the settings dialog box which you reach with the Modify Settings  command.

Shortcuts
Toolbar:	{bmc velbar.bmp}

Keys:	v

^#K ^$ Add Thrusters command (Toolbar)

^# HID_THRUSTER

^K thrusters, adding

^$ Add Thrusters command

Use this command to add thrusters.  A dialog box will appear allowing you to specify the attributes of the thrusters you wish to add.  After closing the box, add a new thruster by pressing the mouse button near the particle you wish the thruster to be attached to and hold the mouse button while moving to another particle which you wish to use as a reference for the thruster.  The thruster will always point to the reference particle unless you set the angle of the thruster to a non-zero value.

Shortcuts
Toolbar:	{bmc thrbar.bmp}

^#K ^$ Add Foils command (Toolbar)

^# HID_FOIL

^K foils, adding

^$ Add Foils command

Use this command to add foils.  Foils are wing-like surfaces that you can imagine extend perpendicular to the screen.  A dialog box will appear allowing you to specify the attributes of the foils you wish to add.  After closing the box, add a new foil by pressing the mouse button near the particle which you want to be the leading edge of the foil and hold the mouse button while moving to a particle which you wish to be the trailing edge.

Shortcuts
Toolbar:	{bmc foibar.bmp}

Keys:	f

^#K ^$ Add Guns command (Toolbar)

^# HID_GUN

^K guns, adding

^$ Add Guns command

Use this command to add guns.  A dialog box will appear allowing you to specify the attributes of the guns you wish to add.  After closing the box, add a new gun by pressing the mouse button near the particle which you want to be the muzzle of the gun and hold the mouse button while moving to a particle which you wish to be the back.

Shortcuts
Toolbar:	{bmc gunbar.bmp}

Keys:	g

^#K ^$ Display Charges command (Toolbar)

^# HID_DISPLAY_CHARGE

^K displaying charges

^$ Display Charges command

Use this command to toggle the display of charge.  When charge is displayed, green circles will be drawn around positively charged particles while red ones anound negatively charged particles.  The radius of the circles will be proportional to the square root of the charge magnitude.

Shortcuts
Toolbar:	{bmc chabar.bmp}

^#K ^$ Display Masses command (Toolbar)

^# HID_DISPLAY_MASS

^K displaying masses

^$ Display Masses command

Use this command to toggle the display of mass.  When mass is displayed, purple circles will be drawn around particles.  The radius of the circles will be proportional to the cubed root of the mass.

Shortcuts
Toolbar:	{bmc masbar.bmp}

^#K ^$ Display Velocities command (Toolbar)

^# HID_DISPLAY_VELOCITY

^K displaying velocities

^$ Display Velocities command

Use this command to toggle the display of velocity vectors.  When velocities are displayed, blue lines representing velocity vectors will be drawn from each particle.  The scale of these vectors can be adjusted using the Modify Settingscommand.

Shortcuts
Toolbar:	{bmc dvebar.bmp}

^#K ^$ Display Labels command (Toolbar)

^# HID_DISPLAY_LABELS

^K displaying labels

^$ Display Labels command

Use this command to toggle the display of item labels.  Note that labels will be drawn on top of each other when items are in the same place.  If you need to identify such an item, use the Terminal Window "who" command to list labels and examine the (x,y) coordinates.

Shortcuts
Toolbar:	{bmc labbar.bmp}

^#K ^$ Display Trails command (Toolbar)

^# HID_DISPLAY_TRAILS

^K displaying trails

^$ Display Trails command

Use this command to toggle the display of particle trails.  Black dots will be displayed as particles move when display trails is active.

Shortcuts
Toolbar:	{bmc trabar.bmp}

^#K ^$ Display Grid command (Toolbar)

^# HID_DISPLAY_GRID

^K displaying the grid

^$ Display Grid command

Use this command to toggle the display of the grid.  You can adjust the spacing using the settings command.

Shortcuts
Toolbar:	{bmc grdbar.bmp}

^#K ^$ Display Bond Stress command (Toolbar)

^# HID_DISPLAY_BOND_STRESS

^K displaying bond stress

^$ Display Bond Stress command

Use this command to toggle the display of bond stress using a color code.  Bonds in tension appear as dotted lines.

Shortcuts
Toolbar:	{bmc bstbar.bmp}

^#K ^$Status Bar command (View menu)

^# HID_VIEW_STATUS_BAR

^K status bar

^$ View Status Bar Command

Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.

See Status Bar for help on using the status bar.

^#K ^$Status Bar

^# AFX_HIDW_STATUS_BAR

^K status bar

^$ status bar

The status bar is displayed at the bottom of the SimStructure window.  To display or hide the status bar, use the Status Bar command in the View menu.

{bml hlpsbar.bmp}

1. X coordinate of the mouse cursor.

2. Y coordinate of the mouse cursor.

3. SCORE: Most recent score for the scenario.  Most scenarios do not have a valid score.

4. TIME: Number of simulation seconds since the simulation started.  Time in the simulation can pass faster or slower than real time based on the time_scale setting.

5. TIME_SCALE: A number larger than 1 indicates time passes faster in the simulation than real time.  Time_scale is adjusted in some scenarios to use a certain percentage of your computer's processing power.

6. TOLERANCE: This number specifies the accuracy of the simulation.

7. CPU DEMAND: Percentage of the processor's power that is demanded for the simulation to run at the correct speed.  A number larger than 100% means your computer is too slow to keep-up.  SimStructure requires a computer with a high clock speed (measured in MHz).  Generally, more RAM will not improve performance.

8. CPU USAGE: Percentage of the processor's power that is currently being used.  The unregistered, freeware version of SimStucture tries not to use more than 40%.

9. SCREEN REFRESH RATE: The refresh rate is adjusted based on the available processing power but will not exceed 60Hz.

^#K ^$Terminal Window command (View menu)

^# HID_VIEW_TERMINAL

^K terminal window

^$ View Terminal Window Command

Use this command to display and hide the Terminal Window, which provides a textual interface to SimStructure. A check mark appears next to the menu item when the Terminal Window is displayed.

See Terminal Window  for help on using the Terminal Window.

^#K ^$Use of the Terminal Window: 

^# HIDD_TERMINAL

^K terminal window, use of

^$ Use of the Terminal Window

The View Terminal Window command will bring-up the terminal window.  Type any of the following commands on the last line of the terminal window, after the ">" or "$" prompt and press <ENTER>.

  <exp>                 Display the value of an expression.
  <var>=<exp>           Assign the value of an expression to a variable
                        or an item's attribute.
  add                   Add all current items to design project
  bondrep               Display report on bonds
  bondmargin <percent>[,<round>] Sets the tensile and compressive
                        strengths to a certain safety margin.
                        PERCENT is the safety margin and ROUND
                        is the number to round-up to.
  bondmargin inf        Makes all bonds unbreakable
  clear                 Clears the Terminal Window
  clear project         Deletes instructor data
  controls              Lists the defined adjustment controls
  debug [ON | OFF]      Turn on or off debugging.
  delete <label>        Delete named item.
  diff                  Compare student data to instructor data
  exit                  Exit SimStructure.
  help                  Displays a summary of help topics.
  highlight <label>     Toggle highlighting on screen.
  highlight OFF         Turns-off all highlighting
  inspect <label>       Display detailed info on item.
  lock                  Lock scenario with password
  null                  Reset the lengths of rigid bonds and ropes so
                        they are at at equilibrium.
  plot <sig>,<sig>,...  Plot signals or tables.
  reset                 Reset simulation
  restart               Restart design project
  round <value>         Round-off x,y coordinates for particles
  run                   Run simulation
  save                  Save scenario
  stop                  Stop simulation
  student               Student mode (saves scores & expands prompts)
  unlock                Unlock scenario with password
  who                   Lists all defined items.
  who particles         Lists just particles. Bonds, thrusters, foils,
                        guns, doubles, integrators, matrices, signals,
                        tables and filters can be similarly listed.
  *                     Repeat last command.

See expressions for help on using expressions and for a description of item's attributes.

Note that the prompt will be a ">" if the simulation is reset and a "$" if a simulation is in progress.  In general, changes made while the prompt is a "$" are temporary, being lost by a RESET command.  The BONDMARGIN command is an exception.

^#K ^$Plot Window command (View menu)

^# HID_VIEW_PLOT

^K plot window

^$ View Plot Window Command

Use this command to display and hide the Plot Window, which displays graphs of signals. A check mark appears next to the menu item when the Plot Window is displayed.

See Plot Window for help on using the Plot Window.

^#K ^$Command Window command (View menu)

^# HID_VIEW_COMMANDS

^K command window

^$ View Command Window Command

Use this command to display and hide the Command Window, which allows entry of commands which execute when the simulation runs. A check mark appears next to the menu item when the Command Window is displayed.

See Command Window for help on using the Command Window.

^#K ^$Materials List Window command (View menu)

^# HID_VIEW_MATERIAL_LIST

^K materials list window

^$ View Materials List Window Command

Use this command to display and hide the Materials List Window, which specifies the materials which are available for the current design project scenario.  There are actually two materials list windows -- one for the instructor and one for the student.  The instructor's material list window will be shown when the project is unlocked.  The student's material list will be shown when the project is locked.  
	A check mark appears next to the menu item when the Materials List Window is displayed.

See Student's Materials List Window for help on using the student's Materials List Window.
See Instructor's Materials List Window for help on using the instructor's Materials List Window.

^#K ^$Scores command (View menu)

^# HID_VIEW_SCORES

^K Scores

^$ View Scores

Use this command to display the 10 most recent scores, 10 highest scores and 10 lowest scores.

^#K ^$Restart Project command (Project menu)

^# HID_RESTART_PROJECT

^K restart project command

^$ Restart Project Command

Use this command to reset a design project scenario to it's initial state.  All added items will be removed, all modified items will be unmodified and the settings will be restored to the state the instructor specified.

^#K ^$Differences command (Project menu)

^# HID_DIFF

^K differences command

^$ Differences Command

	Use this command to check for differences between a student design and the instructor's initial set-up.  Changes to the command window, settings and the initial items will be noted.
	This command can be used by instructors to grade student designs.  If the students do not know the password and the scenario was locked, the differences command is sure to reveal what the students changed.

^#K ^$Scenario Lock command (Project menu)

^# HID_LOCK

^K scenario lock command

^$ Scenario Lock Command

	Use this command to lock or unlock the scenario.  An instructor can use this command to secure a design project with a password so that changes the students make to initial settings can be revealed with the differences command.  In fact, all design projects require a password.  When you wish all to have access choose "password" as the password.  (This is just a convention.)
	When a scenario is locked, a copy is made of the command window text, the settings and all items added while the scenario was unlocked.  These are the instructors copy and they are saved with the scenario so that a differences can be performed when a student turns-in a design file after working on it.
	The scenario can be unlocked by reentering the original password.  It's good to unlock a scenario when grading it to verify that the file is derived from the original.  Unlocking also allows changes to be made.  Note that the materials list can be modified, but that SimStructure will crash if there are items added while the scenario was locked and you insert new materials list entries (except at the end) or delete entries.
	Editing the materials list while there are items added when the scenario was locked is a way to change multiple items at once!  The changes will take effect when you lock the scenario again.
	If a password has been correctly entered by a scenario user, SimStructure assumes the user is an instructor.  When the scenario is saved, the number of tries and work time will be set to zero so that they will include just the time spent by the student.

^##K ^$Student Material List Window

^# materials_list_window2

^# HIDD_SELECT_MATERIAL

^K student materials list window

^$ Student Material List Window

	The student material list window is the main window for design projects.  It displays a summary of available materials.  These materials can be selected by placing the mouse on the text describing them and clicking.  Once selected, you can add the items to the main SimStructure window.  As you add new items, the materials list will be updated, reflecting usage of materials.  
	The cost and load limit of the design appear mid way down the window.  The load limit reflects the maximum force the structure was able to withstand during the last simulation.
	The "highlight" button will cause entries taken from the currently selected material list line to be highlighted on the main screen.  Click "highlight" again to stop highlighting.
	The "view" button will show the instructor's material list window.  You cannot modify the items unless you unlock the scenario using the Scenario Lock command under the project menu.
	If the specifications for the design project are not met, messages will appear.  On the line next to "Build", messages related to specifications failure during the design/build phase will appear.  On the line next to "Run Test", messages related to failures during the simulation phase will appear.
	Next to "Tries" at the bottom is the number of times the student has run the simulation and next to "Time" is the time (in minutes) the student has worked on the design.

^##K ^$Instructor Material List Window

^# materials_list_window

^# HIDD_MATERIALS_LIST

^K instructor materials list window

^$ Instructor Material List Window

	In the instructor's material list window, you enter statements which specify the available materials for the design project.  The syntax for each material entry is as follows:
<type> "<desc>" <quantity_exp> [of <usage_exp>] : <assign_constraint_list>;

<type> is one of the 7 SimStructure item types -- particle, rigid, elastic, rope, thruster, foil or gun.

<desc> is a description that will appear in the student material list window.

<quantity_exp> is the number available.  This can be "Inf" for infinite if no limit is desired.

An optional <usage_exp> can be specified.  This specifies how the quantity in <quantity_exp> is used-up as materials are added.  It's like a normal expression but can include attribute names appropriate for the item <type> in question used independent of a specific instance of an item.  Entering "length+10", for example, means that each time an item is added, it's length plus ten will be subtracted from <quantity_exp>.  If no <usage_exp> is specified, the default is the number one which makes <quantity_exp> act like a count of items.

<assign_constraint_list> is a comma separated list of assignments to attributes of the item mixed with constraints placed on the item.  It is evaluated in the order it appears.  Assignments consist of an attribute name, an equals and an expression that can include other attribute names independent of a specific instance.  For example, "compressive_strength=10000/length" can be entered where "length" doesn't have to be preceded by a specific bond label and a period.  By entering a question mark in place of an expression, you can allow the attribute to be entered by the student.  The appropriate item attribute dialog box will pop-up when the student selects it.  You may wish to include a note in <desc> as to which items can be entered because the dialog does not indicate it, yet.

Constraints in the <assign_constraint_list> have the following format:
( <logical_exp> "<message>")

<logical_exp> is an expression that must be false (zero) for the design to be valid.

<message> is text that will appear in the student material list window if the constraint is violated. (If <logical_exp> is true the message will be displayed.)

Finally, global constraints can appear in the instructor's materials list window.  An example might be a constaint to limit the total cost of all items.  This particular constraint would appear as:
(total_cost>1000000 "Cost Overrun:");

If you wish to place more than one global constraint, separate them with semicolons.

Here are several example material list entries:

particle "JOINT variable charge" 5 : mass=7,charge=?,label="joint",cost=5*charge;

This lets the student place 5 particles each of mass 7 kg and labeled "joint".  The student can enter a charge for the particle and the cost will be five times the charge.

particle "JOINT variable mass" 100 of mass : cost=10, mass=?, 
  (mass<5 "Mass must be greater than 5 Kg"),
  (y<water_depth "Must be above sea level");

This lets the student place particles of variable mass allowing up to 100 Kg to be placed.  Each will cost $10.  Each must have a mass larger than 5 Kg and must be placed above sea level.

rope "Steel Cable" 100 of length+10 : k=2*length, (length>40 "Too long")
tensile_strength=10000,cost=length+30;

This lets the student place a total of 0-90 m of rope in several pieces.  A penalty of 10 m is assessed for each separate piece.  The spring constant increases with length.  A maximum length of 40 m is allowed and a $30 cost penalty is assessed for each separate piece.

^####K ^$User Mode commands (Preferences menu)

^# HID_BEGINNER_MODE

^# HID_INTERMEDIATE_MODE

^# HID_ADVANCED_MODE

^# HID_EXPERT_MODE

^K User Modes

^$ User Modes

	Use these commands to adjust number of instructional and warning windows that appear as you use SimStructure.  The more advanced you set the mode, the fewer the number of windows that will appear.

^##K ^$Command Window

^# command_window

^# HIDD_USER_NOTES

^K command window, overview

^$ Command Window

	The command window allows you to enter program statements that execute during a simulation.  For a summary of the command syntax see Command Window Syntax.  To learn how to use the program statements, see the scenarios, TUTOR1.SIM through TUTOR4.SIM.  For specific commands see the following:

	comments
	prompts
	expressions
	assignments
	statement blocks 
	conditionals (if ... else ...)
	doubles
	force
	text
	line
	signals and tables
	plot
	sound
	integrators
	filters
	matrices

^#K ^$Command Window Syntax

^# command_syntax

^K command window, syntax

^$ Command Window Syntax

Declarations:
  double <double_name>=<exp>;      Defines a user variable
                                   and initializes it to an expression.
  integrator <int_name>;           Defines an integrator variable.
  table <table_label>=(<exp>,<exp>),(<exp>,<exp>),...;
                                   Creates a look-up table function
                                   and defines points between which
                                   you can interpolate.  Note that the
                                   expressions can be matrices, in which
                                   case the function will be a matrix
                                   function.
  signal <signal_label>;           Defines a variable-length array
                                   in which you can store time-stamped
                                   values.  Note that signals and scalar
                                   tables are identical.  Therefore, if
                                   you query a signal between points
                                   an interpolated value will be returned.
  filter <filter_label>(B1,B2,...); Defines a FIR filter
  filter <filter_label>(B1,B2,... : A1,A2,...); Defines a IIR filter
  matrix <matrix_name>(rows,cols); Defines a matrix variable.

Assignments:
  <time_identifier><lhs>=<exp>;    Assigns an expression to a
                                   left hand side term at
                                   specified times.  The left hand side 
                                   can be a double, integrator, item
                                   attribute, built-in variable or signal.

  <time_identifier>if (<exp>)     Conditional statements are like C
                     <statements>;
                    else 
                     <statements>;

Definition of <time_identifier>:
   Nothing          Evaluated each time derivative of state
                    is calculated.  These assignments will take place
                    the most frequently, but may not be in time order and 
                    certainly will not be uniformly timed.
   @                Evaluated when the screen is updated.
   []               Evaluated after each Runge-Kutta step.  These assignments
                    will take place in time order but will not be uniformly
                    timed.  Use these with key2,joy2 and mouse2 functions.
   [<period>,<phase>,<expiration>]	Evaluated periodically
                    starting after a delay of PHASE seconds.
                    If an EXPIRATION time is specified, stop
                    evaluating after that time.

Miscellaneous:
  force <force_name>("<particles>",<x_exp>,<y_exp>,<mag_exp>);
                                         Defines a force to act on particles
  text(<exp>,<exp>[,<string>] [,<exp>]); Puts text on the screen
  line(<exp>,<exp>,"<color>");           Draws a line on the screen
  plot <signal>,<signal>,...             Plots signals or tables
  load "filename.mat";                   Loads a MATLAB matrix file.

See expressions for help on using expressions and for a description of item's attributes.

^#K ^$Comments 

^# comments

^K command window, comments

^$ Comments

	Documentation can be added using either of the two C/C++ styles.  You can bracket text you wish to serve as documentation between "/*" and "*/".  Using this style you can add multiline comments.  Or, you can use the single line comment style which causes everything following "//" on a line to be interpreted as a comment.  The following demonstrates the two comment styles:

/* This is the first comment style.
It is a multiline comment
that can go on and on...
and on and on...
*/
t1.thrust=5;  //This is a single line comment next to an assignment
/* This is another bracketed comment */
p1.mass=2; 

Note that the first bracketed comment in a scenario will be displayed as the scenario instructions.

^#K ^$Prompts 

^# prompts

^K command window, prompts

^$ Prompts

	You can prompt the user for text to be entered into the command window using three special commands.  These commands are preprocessor directives that are bracketed inside double angle brackets << >>.  "prompt_load" will prompt the user for text when the scenario is loaded.  "prompt_run" will prompt the user each time the scenario is run.  "prompt_save" will prompt the user when the scenario is saved.  With all three, you can specify an optional prompt and an optional default, both enclosed in double quotes.  Here is an example:

/* Name: <<prompt_save "Enter your name","Anonymous">>
Age: <<prompt_save "Enter your age">>
*/

double ship_fuel = <<prompt_load "Ship Fuel","10000">>;
[,0]g1.ammo=<<prompt_run "Ammunition","10">>;

^#K ^$Statement Blocks 

^# statement_blocks

^K command window, statement_blocks

^$ Statement Blocks

	Statements can be grouped into blocks with braces {  }.  This is useful for conditionals and for grouping statements with a common time identifier.  Blocks can be nestled, but be careful nestling time identifiers because inner statements can only execute if outer statements do.  Screen refresh time identifiers can be grouped, but not nestled.

	The syntax for a statement block is:

<time_identifier> {
   <statement#1>;
   <statement#2>;
        ...
}

^#K ^$Assignments 

^# assignments

^K command window, assignments

^$ Assignment Statements

	Assignments consist of  a "time identifier" which specifies when the update is to take place, the value you wish to update, an equals sign, an expression specifying the new value and a semicolon to terminate it.  That is,

<time_identifier><value_to_update>=<expression>;

With assignment statements, you can update item attributes. The attributes of particles, bonds, foils, thrusters and guns can be accessed by stating the label of the item, a period and the attribute name.  This is like a C structure access.  However, SimStructure allows abbreviations for structure element names so long as they are not ambiguous.  Consider the following:

t1.thrust=10*joy("up");            //  Set thrust of thruster "t1" to amount
                                    //joystick is pushed up.
t1.angle=(pi/2)*mouse_x/1000;       //  Set thruster angle to scaled 
                                    //mouse X coordinate.
b1.len=b1.length+key("1")-key("2"); //  Adjust bond length with keyboard.
                                    //See tips for a smoother way to adjust
                                    //bond length.

With assignment statements, you can also update doubles, add an entry to signals, clock digital filters, and perform integration.

^#K ^$Conditionals 

^# conditionals

^K command window, conditionals

^$ Conditional Statements

	Conditional consist of  a "time identifier" which specifies when the statement is to execute, the word "if", a conditional expression in parenthesis, a statement or statement block, and an optional else clause.

<time_identifier>if (<exp>) { 
               <statement#1>;
               <statement#2>;
                    ...
             } else { 
               <statement#3>;
               <statement#4>;
                    ...
             } 

^#K ^$Time Identifiers

^# time_identifiers

^K command window, time identifiers

^$ Time Identifiers

	Time identifiers specify when actions are to take place while a simulation is running.  They are complicated by the fact that SimStructure uses adaptive time step sizing while doing it's calculations.  So, SimStructure takes smaller steps in time when important things are happening to improve accuracy.  And, when making each step, SimStructure probes at various times.

There are three basic forms for time identifiers: 

  A. Nothing         Evaluated each time derivative of state
                     is calculated.  These take place most frequently,
                     but may not be in time order and certainly will not
                     be uniformly timed.
  B. []              Evaluated after each step.  These will be ordered 
                     correctly in time but will not be uniformly
                     spaced timed.
  C. [<period>,<phase>,<expiration>]	Evaluated periodically
                     starting after a delay of PHASE seconds.
                     If an EXPIRATION time is specified, stop
                     evaluating after that time.
     [<period>]      Evaluated periodically.
     [,<phase>]      Evaluate once at a specified delay. 
  D. @               Evaluated each screen refresh.    

Consider the following four assignments:
  A.  t1.thrust=t1.saturation*joy("up");
  B.  []ground_mass=ground_mass+10000*(key2("1")-key2("2"));
  C.  [.1]b1.length=b1.length+0.01*(joy("left")-joy("right"));
  D.  @text(#5,#5,"Hello");

The following chart shows a sample timing for these assignments:

Step   Time |  A   B   C
------------|-------------   
  0    0.00 |      *   *     
  0    0.01 |  *
  0    0.03 |  *
  0    0.06 |  *
  0    0.15 |  *             
  1    0.10 |      *   *
  1    0.19 |  *
  1    0.14 |  *
  1    0.13 |  *
  2    0.13 |      *
  2    0.14 |  *
  2    0.15 |  *
  2    0.16 |  *   
  3    0.16 |      *
  3    0.17 |  *
  3    0.18 |  *
  3    0.21 |  *
  4    0.20 |      *   *

^#K ^$Doubles 

^# doubles

^K command window, doubles

^$ doubles

	Doubles are floating point variables just like in C/C++.  You declare them with the keyword "double".  These declarations can occur anywhere in the code so long as they precede the first use of the variable in an expression.  Multiple double variables can be declared in the same statement by separating them with commas.  An optional initializing expression can be included.  If no initializer is given, the value zero is assigned to the variable.  The following are double declarations:

double my_variable;
double my_angle=pi/2,my_temp,my_distance=10.0+my_angle;

Note that there is only one name space in SimStructure and there is not a test for duplicate 
names at the moment.

^#K ^$Text Command 

^# text

^K command window, text

^$ text command

	You can place text on the screen during simulation run time with the "text" keyword. The format is as follows:

@text(<x_coordinate_expression>, <y_coordinate_expression>, "Text to be displayed");

See coordinate expressions for a description of the various options for coordinates.

The value of one expression can be displayed by including a C printf format specifier in the text string and adding an additional parameter to the text function call containing the expression.  For example,

@text(#5,#5,"Energy: %7.3f",p1.total_energy+p2.total_energy);

will display the combined energy of particles 1 and 2 formated in a field of seven characters with three decimal places.

In the future, it may be possible to format more than one value at a time.

^#K ^$Coordinate Expressions 

^# coordinate_expressions

^K command window, coordinate expressions

^$ coordinate expressions

	If you pass an expression to the text or line routines in one of the coordinate parameters, it will be interpreted as a "world" coordinate value.  That is, a value that exists in the simulation coordinate system and which changes position when the screen is zoomed or scrolled.  However, if you precede an expression with a "#" then it will be interpreted as a "screen" coordinate value.  Screen coordinates are not effected by zooming or scrolling so they stay in the same place in the window.  Positive screen coordinates are interpreted as pixels from the upper left corner of the window.  Negative screen coordinates are interpreted as pixels from the lower left corner of the screen.  World and screen coordinates can be mixed -- the X could be a screen and the Y a world.  Consider the following examples:

@text(#5,#5,"Upper Left");
@text(#-100,#5,"Upper Right");
@text(p1.x,p1.y,"Next to Particle 1");

^#K ^$Line Command 

^# line

^K command window, line

^$ line command

	You can draw lines on the screen during simulation run time with the "line" keyword. The format is as follows:

@line(<x1_exp>, <y1_exp>, <x2_exp>, <y2_exp>, <color>,[<width_exp>]);

See coordinate expressions for a description of the various options for coordinates.

The available colors are black, red, green, blue, purple, yellow, cyan, white, light_gray, medium_gray, dark_gray, dark_red, dark_green, dark_blue, dark_purple, brown and dark_cyan.

The following draws a red line from particle 1 to particle 2:

@line(p1.x,p1.y,p2.x,p2.y,red);

^#K ^$Force Command 

^# force

^K command window, force

^$ force command

	You can specify forces to act on particles with the "force" keyword.  The format is as follows:

force <force_name>("<label_string>",<x_exp>,<y_exp>,<mag_exp>);

	The <label_string> contains the name of a particle or can include "?" or "*" to include multiple particles.  "?" signifies a single wild card character while "*" signifies all remaining characters are wild.  The <x_exp> and <y_exp> specify the direction the force is to act.  This direction need not be normalized.  The <mag_exp> is the magnitude of the force.

	The following declares a downward force that grows with time to all particles with a label that begins with "road".  This might be useful for a bridge design scenario.

force f1("road*",0,-1,2000*t);

	The following declares forces on p1 and p2, pulling them together with 100 N.

force f2("p1",p2.x-p1.x,p2.y-p1.y,100),
      f3("p2",p1.x-p2.x,p1.y-p2.y,100);

Once a force has been defined, it's magnitude can be reset with an assignment such as:

f2 = 20 * joy("up");

This is an alternative method of setting the magnitude since the magnitude expression could have been entered in the force declaration.  A force's magnitude can be referenced in any expression by using it's name as in:

f3 = 2.0 * f2;

^#K ^$Signals and Tables 

^# signals_and_tables

^K command window, signals and tables

^$ signals and tables

	SimStructure has variable length arrays which store two values in each element.  These are called signals or tables.  When one value is time, you should use a signal.  Otherwise, use a table.  The keywords, "signal" and "table" are used to declare signals and tables.

Tables 
Tables can be used to implement irregular functions.  When you declare your table, initialize it with the ordered pair values which define it.  Later, you can look-up values from the table by placing the name as though it were a function, into an expression.  SimStructure will interpolate between points if you look-up at a point which was not defined.  The following statement declares and initializes a table that approximates a parabola:

table my_parabola=(0,0),(1,1),(2,4),(3,9),(4,16),(5,25);

You can look-up values from this table by using it in an expression:

t1.thrust=5+my_parabola(5*joy("up"));

Note that tables can be used to implement an irregular relationship between the joystick and 
the thrust of a thruster.

Signals 
Signals are used to record values over time.  After you declare them, you make "assignments" to them that record both the value and the time the assignment was made.  Then, you plot the signal.  The following demonstates how to plot the Y coordinate of a particle using a signal:

signal my_y_signal;   //Declare signal
[.1]my_y_signal=p1.y;
[.1]plot my_y_signal;

^#K ^$Plot Command 

^# plot

^K command window, plot

^$ plot command

	You can plot signals with the plot statement.  Simply list the signal names after the keyword "plot" and separate them with commas as in:

@plot my_sig1,my_sig2,my_sig3;

The plot window will appear when the simulation runs and the signals will be shown as colored lines.  The first signal will appear RED, the second GREEN and the third BLUE.  Remaining signals will appear PURPLE, YELLOW and CYAN.

The "plot" command can be typed into the terminal window to plot signals separately.

If you use a plot command in the command window with no signal, the current plot is refreshed without altering the zoom settings.

^#K ^$Sound Command 

^# sound

^K command window, sound

^$ sound command

	You can add custom sound effects using the "sound" function.

[.1]sound(VOICE_NUM,AMP,WAVEFORM,FREQ,X);

VOICE_NUM 	is the audio channel to use.  A number from 0 to 31 is valid.
AMP 		is the amplitude.  A number from 0.0-1.0 is valid.
WAVEFORM 	must be one of the waveform constants, "sinusoid", "triangular", "sawtooth", or "noise".
FREQ 		is the frequency in hertz.  Numbers from 20 to 15000 may be audible.
X 			is the steriophonic x coordinate for the sound.  For example, providing a particle's x-coordinate will cause the sound to follow the particle.  Entering "inf" will cause the sound to be centered equally between speakers.

[.01]sound(0,0.1,triangular,440,p1.x);

This will cause a triangular waveform sound of 440 Hz with amplitude 0.1 to follow particle, "p1".  The time identifier for the statement will cause the sound to be adjusted every 0.01 seconds.

	A more flexible way exists for adding sound.  The variables,"sound_left" and "sound_right" represent the current speaker position and range from -1.0 to +1.0.  Assignments can be made to these to directly add sounds using a new time identifier, "$".  A new time variable, "sound_t", is useful for generating values inside "$" statements.

filter my_low_pass(.5:1.0,-.5);
table waveform={(0,0), (.5,.5), (.75,.25), (.98,.5), (1.02,-.5), (1.25,-.25), (1.5,-.5), (2,0)}; 
${ my_low_pass=waveform( (sound_t*200) % 2.0);
  sound_left=sound_left+my_low_pass;
  sound_right=sound_right+my_low_pass;
}

This will generate a custom waveform from a look-up table with a frequency of 100 Hz.  Be careful because the $ statements execute 8000-16000 times a second and may hog CPU time. 

^#K ^$Plot Window 

^# plot_window

^K plot window

^$ plot window

	The plot window shows graphs of signals .  Signals are values which change over time.  The horizontal axis of the plot will be "time" and the vertical axis will be the values at particular times.

	The plot window can be displayed or hidden with the view menu.

	The plot can be zoomed in the X and Y directions with the "X+", "X-", "Y+" and "Y-" toolbar buttons.

^#K ^$Integrators 

^# integrators

^K command window, integrators

^$ integrators

	You can integrate an expression with respect to time by using SimStructure's integrator data type.  Declare an integrator.  Then, "assign" an expression, but use a NULL time identifier .

integrator fuel_used;                 //Declares an integrator
t1.thrust=t1.saturation*joy("up");    //Control thruster with joystick
fuel_used=t1.output_thrust;           //Integrate output thrust
@text(#5,#5,"Fuel Used:%f",fuel_used); //Display fuel used on screen

The integrator variable, fuel_used, will gradually increase as the user activates the joystick and thruster.  It can be used just like a double in expressions.

^#K ^$Filters 

^# filters

^K command window, filters

^$ filters

	You can perform digital filtering using the "filter" keyword.  Define a filter using one of two forms:

filter name(B1,B2,...,Bnb : A1,A2,...,Ana);  //IIR form
filter name(B1,B2,...,Bnb);  //FIR form

The numbers A1-Anb and B1-Bnb are constants which define the filter.  If Y[k] is the output signal from a filtered signal, X[k], then Y is releated to X by the following:

A1*Y[k] = B1*X[k] + B2*X[k-1] + ... + Bnb*X[k-nb]
        - A2*Y[k-1] - ... - Ana*Y[k-na]

If you are unfamiliar with digital filters, use the following format:

filter name(B1 : A1, A2);

Apply the following three rules to calculate the three numbers B1,A1 and A2:
	1) A1=1.0
	2) 0<B1<1.0
	3) A2=B1-1.0
To increase the effect of the filter, make B1 closer to zero. (You will have to make A2 closer to -1.00 at the same time.)

Consider the following examples:

filter f1(0.001:1,-.999), //Declare Infinite Impulse Response filter
       f2(.25,.25,.25,.25), //Declare Finite Impule Response filter
       f3(1,-1:Ts),         //Declare a differentiator for sample rate Ts
       f4(1/Ts:1,-1);       //Declare an integrator for sample rate Ts

	After declaring a filter, make an "assignment" to it.  This passes a value through the filter.  The result can be accessed by using the filter name in an expression.  Consider the following example:

[.1]f2=t1.saturation*joy("up"); //Pass a value through filter
[.1]t1.thrust=f2;  //Access filtered result in expression

^#K ^$Matrices 

^# matrices

^K command window, matrices

^$ matrices

	SimStructure has a matrix data type but it's not fully implemented.  You can declare matrices or load them from MATLAB files.  See Hover3.sim for an example of what's currently available.

^#K ^$Expressions

^# expressions

^K expressions

^$ expressions

Operators
Built-in Functions
Built-in Variables and Constants
Particle Attributes
Bond Attributes
Thruster Attributes
Foil Attributes
Gun Attributes
Interpolated Functions

^#K ^$Operators

^# operators

^K operators

^$ operators

	 Arithmetic: 
		+ 	addition
		- 	subtraction
		* 	multiplication
		/ 	division
		% 	remainder

	 Logical: 
		== 	equal to
		!= 	not equal to
		> 	greater than
		< 	less than
		>= 	greater than or equal
		<= 	less than or equal

		&& 	AND
		|| 	OR
		^ 	Exclusive OR
		! 	NOT

^#K ^$Built-in Functions

^# builtin_functions

^K built-in functions

^$ built-in functions

  exp,log,pow,log10,sin,cos,tan,atan,asin,acos,sinh,cosh,max,min,
  D(<item>,<item>)      Distance between items
  V(<item>,<item>)      Velocity of item1 with respect to item2
  A(<item>,<item>,<item>) Angle of vector 1-2 with respect to 3-2
 dA(<item>,<item>,<item>) Derivative of angle
  key("F1")             State of key. At this time only the number
                        and function keys are allowed. Returns 1.0
                        when pressed
  joy("UP")             State of joystick. "UP","DOWN","LEFT",
                        "RIGHT","BUT1" and "BUT2" are permitted
  mouse("LEFT")         State of mouse button. "LEFT" and "RIGHT"
                        are permitted
  key2("F1")            A special function that allows you to apply
                        changes once when a key is pressed
  joy2("BUT1")          A special function that allows you to apply
                        changes once when a button is pressed
  mouse2("LEFT")        A special function that allows you to apply
                        changes once when a button is pressed
  d(expression)        *A function that will approximate the
                        derivative of an expression
  step                  The unit step function
  sqr,sqrt              Square and square root functions
  unwrap(<angle>,<start>) Converts an angle to an interval
                        starting at a specified angle. To
                        convert to [-pi,pi) set start to -pi
  sign                  Returns -1,0 or 1 based on the sign
  abs                   Absolute value
  rnd()                 Random number in the range 0.0-1.0
  a2d(<val>,<bits>,<err>) Analog to digital convertor applied to <val>
                        which should be in the range 0.0-1.0.  Quantized
                        to 2^<bits> levels.  Before quantizing, a random
                        signal of <err>2^-<bits> magnitude is added.
  d2a(<val>,<bits>,<err>) Digital to digital convertor applied to <val>
                        which should be in the range 0-(2^<bits>-1). Quantized
                        to 2^<bits> levels.  Output range is 0.0-1.0 and
                        a random signal of <err>2^-<bits> is added.
  sump(<exp>,"<label_exp>")  Returns the sum of an expression added-up
                        for all particles who's labels match <label_exp>.
                        <label_exp> can contain single wild card characters
                        using "?" or multiple wild card characters using "*".
                        Particle attributes names appearing alone in <exp>
                        refer to the particle being summed.  For example,
                        sump(kinetic_energy,"*") sums the energy of all 
                        particles.
  minp,maxp,avgp        Are similar to sump except they return the minimum
                        of the expression, maximum of the expression or
                        average of the expression over all the matching
                        particles.
  sumb,minb,maxb,avgb   Return values over matching bonds.
  sumt,mint,maxt,avgt   Return values over matching thrusters.
  sumf,minf,maxf,avgf   Return values over matching foils.
  sumg,ming,maxg,avgg   Return values over matching guns.
  sumfc("<label_exp>")  Returns the sum of force magnitudes for forces
                        who's name matches <label_exp>.  It is actually a
                        double sum because it is over all matching force names
                        and over all particles the force applies to.
  minfc,maxfc,avgfc     Are similar to sumfc.
  overlap("<label_exp1>","<label_exp2>")  Returns the sum of the distance the
                        particles matching <exp1> overlap the particles 
                        matching <exp2>.  Try 'overlap("*","*")' to check
                        for any overlap between any two particles.

 Note: "*" means not implemented.

^#K ^$General Built-in Variables

^# HIDD_GENERAL_PAGE

^K built-in variables, general

^$ general built-in variables

rw  gravitational_constant
	Universal gravitational constant.  This constant scales the gravitational force.  The gravitational force equation is:
F = gravitational_constant * mass1 * mass2 / distance^2

r-  interparticle_gravity
	This is a "flag" indicating whether or not particles feel the gravity from other particles.  In space scenarios, you might want to turn interpartricle gravity on in.  Otherwise, leave this off because gravitiational forces between particles are usually very small and SimStructure will not have to do as many calculations.

rw  electrostatic_constant
	Universal electrostatic constant.  This constant scales the electrostatic force.  The electrostatic force equation is:
F = electrostatic_constant * charge1 * charge2 / distance^2

rw  collision_constant
	Universal collision constant.  When particles overlap, a force is generated which pushes them apart.  It is a high order spring force.  This constant scales the overlap distance before it is raised to a power.  SimStructure's collision force equations is:
F = (collision_constant * hardness1 * hardness2 * overlap_distance) ^ 16
If collision_constant is zero, no force will be generated when particles overlap, allowing them to pass through each other.  Note that SimStructure collisions are not realistic.

rw  explosion_constant
	Interparticle explosive force constant.  This constant scales the force that is applied to other particles while one particle explodes.  The explosion force equation is:
F = explosion_constant * current_explosion_intensity * particle.radius^2 / distance^2
Note that this equation is not realistic.  Real explosions are very complex and depend on the medium. 

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Air Related Built-in Variables

^# HIDD_AIR_PAGE

^K built-in variables, air related

^$ air related built-in variables

rw  air_color (only accessable through the terminal and command windows)
Red-Green-Blue color number value indicating color of the air.

rw  air_density
Density of air.  The density of air has four effects.  First, it generates an upward buoyant force:
F = air_density * particle.volume
Second, it generates a lift force on foils according to: 
F = Cl * air_density * A * velocity^2 / 2
where "Cl" is the lift coefficient (approximately camber / 8.0 for plates) and "A" is the foil area.  Third, it generates a drag force on moving particles according to: 
F = Cd * A * air_density * velocity^2 / 2
where "Cd" is the coefficient of drag (approximately 0.5 for spheres) and "A" is the particle cross-sectional area.  Fourth, it generates a profile drag force on foils moving at an angle to the wind.  I'm not sure about this one, but I model it as:
F = Cd * A * air_density * velocity^2 / 2
where "Cd" is the coefficient of drag (1.0 for rectangles?) and "A" is the foil profile area.
	Note that air density does not yet vary with altitude on simstructure.

rw  air_viscosity
Viscosity generates a slowing force on particles and foils proportional to velocity (not velocity squared like density does).  I'm not sure about this but I think the formula for spheres is approximately:
F = air_viscosity * 6 * pi * particle.radius * velocity
For foils moving at an angle in the wind it generates a drag force.  I'm really not sure about this but I model it as:
F = air_viscosity * 12 * pi * A * velocity
where "A" is the profile area.  I know this is wrong because the units don't match, but at least it provides some viscous effect on foils.

rw  wind_x,wind_y
Wind x,y velocity.

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Water Related Built-in Variables

^# HIDD_WATER_PAGE

^K built-in variables, water related

^$ water related built-in variables

r-  water_present
"Flag" indicating if water is present.

rw  water_color (only accessable through the terminal and command windows)
Red-Green-Blue color number value indicating color of the water.

rw  water_depth
Depth of water.  This defines the elevation of water's surface. (Imagine it is a lake and you are specifying the surface elevation with respect to sea level.)

rw  water_density
Density of water.  The density of water has four effects.  First, it generates an upward buoyant force:
F = water_density * particle.volume
Second, it generates a lift force on foils according to: 
F = Cl * water_density * A * velocity^2 / 2
where "Cl" is the lift coefficient (approximately camber / 8.0 for plates) and "A" is the foil area.  Third, it generates a drag force on moving particles according to: 
F = Cd * A * water_density * velocity^2 / 2
where "Cd" is the coefficient of drag (approximately 0.5 for spheres) and "A" is the particle cross-sectional area.  Fourth, it generates a profile drag force on foils moving at an angle to the current.  I'm not sure about this one, but I model it as:
F = Cd * A * water_density * velocity^2 / 2
where "Cd" is the coefficient of drag (1.0 for rectangles?) and "A" is the foil profile area.

rw  water_viscosity
Viscosity generates a slowing force on particles and foils proportional to velocity (not velocity squared like density does).  I'm not sure about this but I think the formula for spheres is approximately:
F = water_viscosity * 6 * pi * particle.radius * velocity
For foils moving at an angle in the current it generates a drag force.  I'm really not sure about this but I model it as:
F = water_viscosity * 12 * pi * A * velocity
where "A" is the profile area.  I know this is wrong because the units don't match, but at least it provides some viscous effect on foils.

rw  current_x,current_y
Water current x,y velocity.

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Ground Related Built-in Variables

^# HIDD_GROUND_PAGE

^K built-in variables, ground related

^$ ground related built-in variables

r-  ground_present
"Flag" indicating if ground is present.

rw  ground_color  (only accessable through the terminal and command windows)
Red-Green-Blue color number value indicating color of the ground.

rw  ground_mass, ground_radius
These are the mass and radius of the planet.  They determine the gravitational force felt by particles.  The force equation is:
F = gravitational_constant * ground_mass * particle.mass / (ground_radius + particle.y)^2

r-  g (only accessable through the terminal and command windows)
Acceleration due to ground gravity.  This is a read-only variable equal to:
g = gravitational_constant * ground_mass / ground_radius^2

rw  ground_density
Density of ground.  The density of ground has four effects.  First, it generates an upward buoyant force:
F = ground_density * particle.volume
Second, it generates a lift force on foils according to: 
F = Cl * ground_density * A * velocity^2 / 2
where "Cl" is the lift coefficient (approximately camber / 8.0 for plates) and "A" is the foil area.  Third, it generates a drag force on moving particles according to: 
F = Cd * A * ground_density * velocity^2 / 2
where "Cd" is the coefficient of drag (approximately 0.5 for spheres) and "A" is the particle cross-sectional area.  Fourth, it generates a profile drag force on foils moving at an angle to the quake.  I'm not sure about this one, but I model it as:
F = Cd * A * ground_density * velocity^2 / 2
where "Cd" is the coefficient of drag (1.0 for rectangles?) and "A" is the foil profile area.
	The default ground density is simply the mass of the Earth divided by the volume.  This density is higher than is should be for the ground near the surface because the iron core skews the average.

rw  ground_viscosity
Viscosity generates a slowing force on particles and foils proportional to velocity (not velocity squared like density does).  I'm not sure about this but I think the formula for spheres is approximately:
F = ground_viscosity * 6 * pi * particle.radius * velocity
For foils moving at an angle in the quake it generates a drag force.  I'm really not sure about this but I model it as:
F = ground_viscosity * 12 * pi * A * velocity
where "A" is the profile area.  I know this is wrong because the units don't match, but at least it provides some viscous effect on foils.
	Set the viscosity to "infinity" to keep particles fixed.  This will speed computations significantly.  The viscosity of lava varies from 10^2 to 10^12. 

rw  ground_hardness
"Hardness" of surface of ground.  This is not a real-world number, just a creation for SimStructure.  It effects the force felt when particles are partially submerged in the ground.  The force equation is:
F = (collision_constant * ground_hardness * particle_hardness * overlap_distance) ^ 16
Setting ground hardness to zero will cause particles to enter the ground instead of bounce off the ground.

rw  ground_surface_friction
Actual coefficients of friction are calculated by multiplying the ground_surface_friction number by the particle friction number.  Therefore, the friction force is:
F = ground_surface_friction * particle.friction * F_normal

rw  quake_x,quake_y (only accessable through the terminal and command windows)
Quake x,y velocity.

rw  quake_x_amplitude,quake_y_amplitude
rw  quake_x_period,quake_y_period
If the amplitude is non-zero, these cause the ground to move with a sinusoidal velocity pattern.  Be aware that changing the period or amplitude causes a discontinuity in velocity that is disruptive.

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Display Related Built-in Variables

^# HIDD_DISPLAY_PAGE

^K built-in variables, display related

^$ display related built-in variables

rw  current_sock_scale
Scale factor for water current sock, the circle that appears midway down the left side of the screen with a line indicating the magnitude and direction of the water current velocity.

--  explosion_time_scale
The speed at which explosions occur.  A larger number will speed-up explosions.

rw  force_scale
Scale factor for the size of force lines on screen.

--  min_refresh_rate
Minimum rate screen is updated.  If computations are taking a long time and SimStructure is unable to keep-up with the requested time_scale, SimStructure will interrupt the computations and update the screen at this rate.

--  maximize_refresh_rate
If this is checked, SimStructure will adjust maximum_refresh_rate to utilize 100% of the CPU.  It will not exceed 70 Hz, however.  Note that in the unregistered version of SimStructure the refresh rate is always maximized.  (Otherwise,it is difficult to impose the 50% limitation.)

--  max_refresh_rate
Maximum rate screen is updated.  If computations are not taking too long, this is the refresh rate.  If you have maximize_refresh_rate checked or you own the unregistered version of SimStructure, it is pointless to set this number.

rw  quake_sock_scale
Scale factor for size of quake sock, the circle that appears at the lower left of the screen with a line indicating the magnitude and direction of the quake velocity.

rw  thruster_scale
Scale factor for the size of thrusters on screen.

--  trails_time
The time between particle trail dots.

rw  velocity_vector_scale
Scale factor for velocity vectors on screen.  This effects both the display of velocity vectors and the setting of new velocities.

rw  wind_sock_scale
Scale factor for size of wind sock, the circle that appears at the upper left of the screen with a line indicating the magnitude and direction of the wind velocity.

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Sound Related Built-in Variables

^# HIDD_SOUND_PAGE

^K built-in variables, sound related

^$ sound related built-in variables

--  sound_on
Sound enable/disable

--  bond_break_sound
Enables/disables sound effect for bonds breaking.

--  collision_sound_scale
Scales volume of particle collsions.  The volume of collisions is determined by this value, the energy of the collision and the distance from the center of the screen.

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Simulation Related Built-in Variables

^# HIDD_SIMULATION_PAGE

^K built-in variables, simulation

^$ simulation related built-in variables

r-  cpu_load (only accessable through the terminal and command windows)
The current CPU load percentage.

rw  cpu_utilization
If set to non-zero value, time_scale will be adjusted to maintain this percent CPU usage.

rw  time_scale
Difference between simulation time and real time.  A larger value will cause the simulation to run faster, assuming the CPU can handle it.

rw  tolerance
Accuracy of simulation.  Sometimes it is useful to reduce the tolerance to cause higher accuracy.

--  move_particle_strength
Force applied to particles when dragged around during a simulation with the mouse.

rw  no_interpolation
If this is unchecked, SimStructure interpolates to achieve uniform screen refreshing.  Unfortunately, this introduces a source of variation that is effected by timing differences.  For design contests, check this box to keep from interpolating.  Instead, refresh timing will be irregular.  

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Design Project Built-in Variables

^# design_project_builtin_variables

^K built-in variables, design project

^$ design project related built-in variables

r-  destroyed_bonds
Count of bonds which have broken.

r-  structure_failure_time
Time when first bond breaks.

r-  total_cost
Cost of all items.

r-  tries
The number of times the simulation has been reset and run.  An instructor might wish to limit the attempts.

r-  work_time
The time in minutes spent modifying or testing the design.

rw  score
Score you can assign.  Usually, you should assign to this using the "[ ]" time identifier. 

-w  set_score
Assign a non-zero value to this when you wish to enter the score into the score history.  Usually, you should assign to this using the "[ ]" time identifier.  Also, be careful not to record more than one score in a single simulation.  You can either reset the scenario before more scores are recorded or use an extra variable to help record just once.

The following example sets the score based on "t", records the score when a bond breaks and resets the simulation.

[]{
  score=t;  //score is based on how long play lasts before breaking a bond
  if (destroyed_bonds>0) 
    set_score=1.0;
    reset_time=t;
  }
}

The following example sets the score based on "t", records the score when a bond breaks and allows play to continue.

double former_destroyed_bonds=0;  //Declare a variable to help record once 
[]{
  if (destroyed_bonds==0) 
    score=t;  //score is based on how long play lasts before breaking a bond
  else {
    if (former_destroyed_bonds==0)
      set_score=1.0;
  }
  former_destroyed_bonds=destroyed_bonds;
}

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^#K ^$Miscellaneous Built-in Variables

^# misc_builtin_variables

^K built-in variables, miscellaneous

^$ miscellaneous built-in variables

r-  ans                      Last answer from the terminal window
r-  e                        2.71828
r-  inf                      A very large number
r-  r2d                      Radians to Degrees multiplier
r-  d2r                      Degrees to radians multiplier
rw  mouse_x,mouse_y          Mouse x,y coordinates 
rw  mouse_sx,mouse_sy        Mouse x,y screen coordinates 
r-  pi                       3.14159
rw  reset_time               If non-zero, the time the simulation
                             should reset itself
rw  stop_time                If non-zero, the time the simulation
                             should stop itself
r-  t                        Simulation time
r-  wall_time                The elapsed real time used by simulation

 Notes: "r" means variable can be read in expressions
        "w" means variable can be written to in assignment statements

^##K ^$Built-in Variables and Constants

^# builtin_variables

^# HIDD_SETTINGS_SHEET

^K built-in variables

^$ built-in variables

Air Related
Design Project Related
Display Related
General 
Ground Related
Miscellaneous 
Simulation 
Sound Related
Water Related

^#K ^$Interpolated Functions

^# interpolated_functions

^K interpolated functions

^$ interpolated functions

  <table>(<exp>)       Returns an interpolated value from a table
  <signal>(<exp>)      Returns an interpolated value from a signal

^##K ^$Particle Attributes

^# particle_attributes

^# HIDD_PARTICLE

^K particles, attributes

^$ particle attributes

  set position          If this is checked, the position will be set
                        to the values in the position boxes.
  x,y                   Coordinates of the particle
  set velocity          If this is checked, the velocities will be set
                        to the values in the velocities boxes.
  dxdt,dydt             Velocities in the x and y directions
  radius                Radius in pixels at 100% zoom.
                        The particle will experience a viscous
                        force proportional to the square of the
                        radius.
  mass,charge           Mass and electrical charge
  hardness              Hardness effects the spring constant
                        used to resolve collisions.  Setting a
                        hardness to zero will make the particle
                        immune to collisions.
  friction              Coefficient of friction multiplier
  expiration_time       Time when particle will self-destruct
  explosiveness         Radius of explosion on collision
  collision_count       Count of collisions the particle is in
  speed                 Magnitude of the velocity vector
  heading               Motion angle CW degrees starting at north
  kinetic_energy        0.5*mass*sqr(velocity)
  potential_energy      mass*g*height
  total_energy          kinetic_energy+potential_energy
  destroyed             Flag to show whether particle is destroyed.
                        Non-zero means the particle is destroyed.
  volume                4/3*pi*pow(radius,3.0)
  density               mass/volume
  color                 Red-Green-Blue color number value
  cost                  Design project cost

See adjustment controls for an explaination of these special attributes.

^####K ^$Bond Attributes

^# bond_attributes

^# HIDD_RIGID

^# HIDD_ROPE

^# HIDD_ELASTIC

^K bonds, attributes

^$ bond attributes

  k                     The spring constant of the bond.
  set_length            If this is checked, the length will be set
                        to the value in the length box.
  length                The length of the bond with no 
                        force applied.
  width                 The width on the screen of the bond.
  tensile_strength      The maximum force the bond can 
                        sustain while being stretched.
  compressive_strength  The maximum force the bond can
                        sustain while being compressed.
  moment_strength      *The maximum moment the bond can sustain.
  x,y,dxdt,dydt,speed,  Values for the midpoint of the bond
  heading,spin          Orientation of bond and rate of spin
  force                 Force endured by bond. Negative for
                        compressive forces.
  max_force,min_force   Max and min force since start of simulation.
  moment               *Moment endured by bond.
  max_moment,min_moment *Max and min moment since start of simulation.
  displacement          Displacement of bond from equilibrium.
                        Displacement is negative for compression.
  energy                Energy stored in bond
  neighbors             Number of other bonds which share the same
                        particles as this bond.
  utilization           Percent of strength being used
  cost                  Design project cost
  color                 Red-Green-Blue color number value
  destroyed             Flag to show whether bond is broken.
                        Non-zero means the bond is broken.

See adjustment controls for an explaination of these special attributes.

^##K ^$Thruster Attributes

^# thruster_attributes

^# HIDD_THRUSTER

^K thrusters, attributes

^$ thruster attributes

  thrust                Requested output thrust
  angle                 Angle of nozzle
  saturation            Maximum thrust (saturation level)
  x,y,dxdt,dydt,speed   Values for the base of the thruster 
  heading,spin          Orientation of thruster and rate of spin
  output_thrust         Thrust achieved after being limited by
                        saturation and by no negative thrust constraint
  cost                  Design project cost
  color                 Red-Green-Blue color number value
  destroyed             Flag to show whether thruster is destroyed.
                        Non-zero means the thruster is destroyed.

See adjustment controls for an explaination of these special attributes.

^##K ^$Foil Attributes

^# foil_attributes

^# HIDD_FOIL

^K foils, attributes

^$ foil attributes

  angle                 Angle of foil with respect to mount particles
  span                  Distance of foil surface perpendicular to screen.
  chord                 Distance from leading to trailing edge.
  camber                The amount the wing is indented on the bottom.
                        A negative value will indent on the top.  This is
                        given as a percentage of chord distance.
  x,y,dxdt,dydt,speed   Values for the front particle of the foil
  heading,spin          Orientation of foil and rate of spin
  lift,torque           Lift force and torque generated by foil
  cost                  Design project cost
  color                 Red-Green-Blue color number value
  destroyed             Flag to show whether foil is destroyed.
                        Non-zero means the foil is destroyed.

See air_viscosity and air_density for a discussion of the lift and drag equations.                       
See adjustment controls for an explaination of these special attributes.

^##K ^$Gun Attributes

^# gun_attributes

^# HIDD_GUN

^K guns, attributes

^$ gun attributes

  bullet_mass,bullet_radius,bullet_charge,bullet_hardness,bullet_friction
  bullet_life           Time bullet will stay on screen.
  bullet_explosiveness  Radius of crater left on the ground
  bullet_time_fuse      Flag indicating bullet will explode after timer
  reload_time           Time to reload. "0" means once per trigger
  muzzle_velocity       Speed of bullet leaving gun
  ammo_count            Ammo left in gun
  x,y,dxdt,dydt,speed   Values for the front of the gun
  heading,spin          Orientation of gun and rate of spin
  fire_count            Bullets to fire at the next opportunity
  next_fire_time        Simulation time when gun will be reloaded
  cost                  Design project cost
  color                 Red-Green-Blue color number value
  destroyed             Flag to show whether gun is destroyed.
                        Non-zero means the gun is destroyed.

See adjustment controls for an explaination of these special attributes.

^#K ^$Adjustment Controls

^# adjustment_controls

^K adjustment controls

^$ Adjustment Controls

	Adjustment controls provide a mean for beginners to create scenarios that include the adjusting of values during a simulation.  Enter an amount in the "amount" column and that amount will be added or subtracted from the value when the control in the "increase" or "decrease" column is activated during a simulation.  Adjustment controls are an alternative to use of the command window .  The following command window statement is equivalent to an adjustment control with amount of "0.01" and increase value of "1 key" and decrease value of "2 key":

[]gravitational_constant=gravitational_constant+0.01*(key2("1")-key2("2"));

^#Scenario Instructions command (Help menu)

^# HID_INSTRUCTIONS

	Use this command to display the instructions specific to the current scenario.  Usually, a description of the scenario and the controls to interact with it will appear.  This is the same screen that appears when the scenario is opened.
	You can modify the text that appears in the scenario instructions by opening the command window under the view menu.  See Creating Scenarios for more information on adding scenario instructions.

^#Index command (Help menu)

^# HID_HELP_INDEX

Use this command to display the opening screen of Help.  From the opening screen, you can jump to step-by-step instructions for using SimStructure and various types of reference information.  

Once you open Help, you can click the Contents button whenever you want to return to the opening screen.

^#Contents command (Help menu)

^# HID_HELP_FINDER

Use this command to display the table of help contents.  

^#Using Help command (Help menu)

^# HID_HELP_USING

Use this command for instructions about using Help.

^#About command (Help menu)

^# HID_APP_ABOUT

Use this command to display the copyright notice and version number of your copy of SimStructure.

^#$Context Help command 

^# HID_CONTEXT_HELP

^$ Help Using Help Command

{bml curhelp.bmp}

Use the Context Help command to obtain help on some portion of SimStructure.  When you choose the Toolbar's Context Help button, the mouse pointer will change to an arrow and question mark.  Then click somewhere in the SimStructure window, such as another Toolbar button.  The Help topic will be shown for the item you clicked.

Shortcut
Keys:	SHIFT+F1

^#Title Bar

^# HID_HT_CAPTION

Filename - SimStructure

The title bar is located along the top of a window.  It contains the name of the application and document.

To move the window, drag the title bar.  Note: You can also move dialog boxes by dragging their title bars.

A title bar may contain the following elements:
{bmc bullet.bmp}	Application Control-menu button
{bmc bullet.bmp}	Document Control-menu button
{bmc bullet.bmp}	Maximize button
{bmc bullet.bmp}	Minimize button
{bmc bullet.bmp}	Name of the application
{bmc bullet.bmp}	Name of the document
{bmc bullet.bmp}	Restore button

^# Scroll bars

^# scrollbars

Displayed at the right and bottom edges of the document window.  The scroll boxes inside the scroll bars indicate your vertical and horizontal location in the document.  You can use the mouse to scroll to other parts of the document.

<< Describe the actions of the various parts of the scrollbar, according to how they behave in your application. >>

^#Size command (System menu)

^# HID_SC_SIZE

Use this command to display a four-headed arrow so you can size the active window with the arrow keys.
{bml curarw4.bmp}

After the pointer changes to the four-headed arrow:
1.	Press one of the DIRECTION keys (left, right, up, or down arrow key) to move the pointer to the border you want to move.  
2.	Press a DIRECTION key to move the border.
3.	Press ENTER when the window is the size you want.

Note:  This command is unavailable if you maximize the window.

Shortcut
Mouse:	Drag the size bars at the corners or edges of the window.

^#Move command (Control menu)

^# HID_SC_MOVE

Use this command to display a four-headed arrow so you can move the active window or dialog box with the arrow keys.
{bmc curarw4.bmp}

Note:  This command is unavailable if you maximize the window.

Shortcut
Keys:	CTRL+F7

^#$Minimize command (application Control menu)

^# HID_SC_MINIMIZE

^$ System Minimize Command

Use this command to reduce the SimStructure window to an icon.

Shortcut
Mouse:	Click the minimize icon {bmc scmin.bmp} on the title bar.
Keys:	ALT+F9

^#Maximize command (System menu)

^# HID_SC_MAXIMIZE

Use this command to enlarge the active window to fill the available space.

Shortcut
Mouse:	Click the maximize icon {bmc scmax.bmp} on the title bar; or double-click the title bar.
Keys:	CTRL+F10 enlarges a document window.

^#$Find command (Edit menu)

^# HID_EDIT_FIND

^$ Edit Find Command

<< Write application-specific help here. >>

^#$Find dialog box

^# AFX_HIDD_FIND

^$ Find Dialog

<< Write application-specific help here. >>

^#$Replace command (Edit menu)

^# HID_EDIT_REPLACE

^$ Edit Replace Command

<< Write application-specific help here. >>

^#$Replace dialog box

^# AFX_HIDD_REPLACE

^$ Replace Dialog

<< Write application-specific help here. >>

^#$Repeat command (Edit menu)

^# HID_EDIT_REPEAT

^$ Edit Repeat Command

Use this command to repeat the last editing command carried out.  The Repeat menu item changes to Can't Repeat if you cannot repeat your last action.

Shortcut
Key:	F4

^#No Help Available

^# HID_HT_NOWHERE

No help is available for this area of the window.

^# No Help Available

^# AFX_HIDP_default

No help is available for this message box.

<< If you wish to author help specific to each message box prompt, then remove the AFX_HIDP_xxx values from the [ALIAS] section of your .HPJ file, and author a topic for each AFX_HIDP_xxx value.  For example, AFX_HIDP_INVALID_FILENAME is the help topic for the Invalid Filename message box. >>