< Lesson 1 Lesson 3 >

Lesson 2: Edit state

StatusBar

Selecting

Popup menus

Priority of the bodies

Continuous states

Add new bodies with the mouse

Add new bodies simultaneously

Find an object

Clipboard

Import and export

 

StatusBar

Load "Tutorial.grav" file using the File/Open... menu. Move the mouse pointer (cross-lines) over any of the bodies. The name of the body appears under the pointer (as a part of it) as well as in the StatusBar.

The long field on the left of the StatusBar contains general inforamation depending on the system states. The four short fields on the right tells you which state the program switches to when (from left to right) Shift or Control keys, or Left or Right mouse button is pressed (S, C, L, R). For instance, if you move the pointer over a body you can see that a Left mouse click would cause the program switch to Move state, and you could change the body position by dragging the mouse.

Let's give it a try: Move the pointer over the "Green" body, click the Left mouse button, and do not release it (read this paragraph first)! The left field of the StatusBar shows: "Move: (-81, 50) m", and the four short fields are empty. The text under the cross-lines changes from "Green" to "Move". The underlined text in the mouse pointer refers to a program state (or a selected, holded or sticked body). Now move the mouse with the button kept pressed. You can see that the pointer drags the body, while the StatusBar shows the new coordinates of the body. You can also see that when moving the body towards the right-bottom corner of the screen, both coordinates turn to positive, while the moving towards the left-top corner turns the coordinates into the negative range. The first number is the X, the second one is the Y value, and the unit is meters, which can be changed in the System page of System dialog window.

If the mouse pointer points to somewhere in front of the background, then the long field of the StatusBar shows the current time in seconds and "(year-month-day hour:minute:second)" format.

 

Selecting

In Edit state (when simulation is not running) the system-, body-, and group parameters can be changed. Changes can be done to more bodies at the same time provided that they are temporarily selected. The color of a selected body will change to the selection color, which can be set by clicking on the Select button in the System page of System dialog window. The position, velocity vector and priority (i.e. order of appearance) of the selected bodies can be changed at the same time with the mouse.

Load "Text Gravity.grav" file using the File/Open... menu. If you click the Left mouse button over the background, the selected bodies will be deselected, and then you can select new bodies by dragging the mouse until you release the mouse button. A dashed rectangle (in the color of selection) will mark the area within which the bodies are selected.

Select the bodies constituting an "a" letter in the text. The way of selection is the same as selecting icons on a Windows desktop. If you move the mouse pointer over a selected body you can see the name of the body underlined as a part of the pointer.

If you have already released the Left mouse button but still would like to select the bodies of letter "v" too, then press Shift and Left mouse button together to add new bodies to the selection. If you make the selection with the Control key pressed then you can remove bodies from the selection.

 

Popup menus

If you click the Right mouse button in front of the background, the Background menu appears. First line of this menu opens the already known System dialog window.

Now place the mouse ponter over an unselected body. Click the Right mouse button to open Body menu. The first menu point is the name of the body (plus three dots), which lets you modify body parameters. Increase the body size tenfold. The body size can also be changed in the second menu point by means of the mouse. You can see that the visible body diameter cannot be more than 100 pixels and less than one pixel. You can quit this program state by clicking the Right mouse button or releasing the Left mouse button.

The third point of the Body menu can be used for changing the velocity vector of a body. You can quit this state by clicking the Right mouse button.

You can remove a body from the system in the Remove... menu point.

If you click the Right mouse button over a selected body, the two-columned Selected menu appears. The rightward menu is the same as Body menu, and the leftward menu applies to all the selected bodies at the same time.

 

Proprity of the bodies

Load "Text Gravity.grav" file and move the mouse pointer over the body called "Text-39" close to the center of letter "G", and zoom it to 100 pixels visible size (i.e. 200 meters). If you move this big-sized body with the mouse then you can see that it covers light-blue bodies or those located in the top part of the screen, while does not cover dark-blue bodies or those located in the bottom half of the screen. The reason for this is that a higher-prioritized body can cover a body being in the same position but having lower priority. To raise or lower the priority of a body, use the Reorder control in the Bodies page of System dialog window. The last two points of the Body menu is used for moving the body to the first and last place of the priority list. With the Backward menu point you can set a body as the first drawn one, so the rest of the bodies will cover it.

See further Display

 

Continuous states

Move the mouse pointer over a body. You can move the body the known way with the Left mouse button, or continuously i.e. in "plus states".

If you move the mouse pointer over an unselected body and click the Left mouse button with the Shift or Control key pressed, the program switches to "Move+" state. If you move the mouse in this state, the body will stay in position and the rest of the bodies will continuously move to the opposite direction until you release the mouse button. The direction and velocity of move depend on the difference between the actual and starting position of the mouse. In the "Move+" state, the position of the body changes (in spite of the appearance), while the position of the rest of the bodies will not change (in spite of the appearance). The movement on the screen is created so that the View of the system changes with the body movement. After moving, the View can be reset with the Go enter command (View menu or Ctrl+E).

In the "plus states", the program will keep on running on two threads, ensuring the simultaneity of movement and mouse control.

 

Add new bodies with the mouse

You can add new bodies using the mouse too. Warning: if the body number changes (i.e. you add or remove new bodies to/from the system), then bookmarks will be lost and only a new "Restart" bookmark will be created.

Load "Tutorial.grav" file and click Right mouse button in front of the background to open Background menu. Choose Add bodies... menu on the bottom of the list to open Add bodies dialog window, where you can set the values of the body to be created. To exit from "Add" state, click the Right mouse button.

The body size and velocity vector can be set for each body.

 

Add new bodies simultaneously

Using the dialog window Group maker you can add multiple new bodies to the system simultaneously. To open this dialog window select Tools/Group maker... menu.

Enter the number of bodies in the "Bodies:" text field: 300, and leave the size "Fit to screen" selected. This means that 300 bodies will be created in the middle of the screen, inside the screen area, with maximal size. You can choose between two configuration forms: ellipsoid and text.

In case of ellipsoid form you can adjust the oblate and rotation of ellipsoid as well as the distribution (constant or normal). In case of text form you can enter the text and set the Font.

Enter the total mass of the configuration in the "Mass" field, and select the group which the bodies will belong to in the "Group" field.

In the Bodies page you can set the parameters of each body. The size, velocity vector and color can be generated randomly between two limit values if the checkbox is selected.

Click on the OK button to create the bodies. The created bodies will be selected, in turn all the previously selected bodies will be deselected. This way, you can handle these new bodies simultaneously, e.g. Move, Zoom, Remove, or reset parameters.

 

Find an object

Using the dialog window Find... you can search for a body or mass center of a group. To open this dialog window select Tools/Find... menu.

You have to select which body or mass centre to search for, and what to do with the searched object: put in on the center of the screen, be selected, holded and stick it to the screen.

 

Clipboard

You can copy the selected bodies to the Clipboard, from where you can insert it into even another Gravity application. Only the new bodies will be selected when copying. Clipboard functions are available in Edit menu.

 

Import and export

You can save major parameters of the System and the Bodies in a text file, which can be reloaded later. This allows the data to be processed by other programs.

 

 

 

 

 


< Lesson 1 Lesson 3 >