| < Tutorial Home | Lesson 1 > |
Gravity is a program to simulate the path of move for bodies (i.e. objects with mass) altered by the gravity drive between each other, i.e. a gravity simulator.
See further Introduction
The program displays bodies in a two-dimensional coordinate system, with a default origin placed in the centre of the screen, X-axis increasing to the right and Y-axis increasing downwards:
![]() |
Both the position (View) and scale (Zoom) of the coordinate system can be modified. One pixel on the screen makes a distance of one meter if zoom is one-fold.
The Gravity divides Bodies into Groups, which together constitute the System:
| Object | Quantity | Relationships of the objects to each other (example) | |||
| System | 1 | Solar system | |||
| Group | 16 | Sun system | Sun system, Earth system | ||
| Body | - | Sun | Venus | Earth | Moon |
There is one System (universe), characteristics of which are defined by the system parametres (e.g.: name, background color, zoom, vectors, etc.).
There are 16 Groups, with names and colors definable. Bodies may belongs to group. Some characteristics of the bodies belonging to the same group can be handled simultaneously, e.g.: display of common mass centre.
The number of Bodies is theoretically unlimited, though can be some thousands in practice.
See further Objects
By means of the View, the origin can be removed from the centre of the screen, therefore we can see another view of the (practically) infinite plane:
Original view (center) |
Translated view |
See further Change view
The Zoom defines how many pixels on the screen correspond to one meter in reality. In case of simple zoom, one pixel refers to one meter, while if zoom is 10 times, then 10 pixels corresponds to one meter. In the practice we rather use a huge reducing (as the program is capable of processing real data).
The formula of zoom is as follows: visible distance (pixel) / real distance (meter). For instance: the Sun-Earth distance is about 1.5E11 (1.5*1011) meters. If we would like to see this distance in 150 (1,5E2) pixels on the screen, we have to use the enlargement of: 1,5E2 / 1,5E11 = 1E-9 (i.e. a reducing of 1E9 times).
In case of a planet system, the reducing is about one billion-fold, which can be even much more with star systems and galaxies.
In order to visualize every body on the screen even with the highest reducing (i.e. to avoid a body shrinking to 0 pixel size), the smallest visible body size is one pixel. The largest visible body size is 100 pixels.
Original size |
Zoomed screen |
See further Zoom
| < Tutorial Home | Lesson 1 > |