Libraries‎ > ‎orbits‎ > ‎

Body properties

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

set all relevant proprieties of the earth.http://ssd.jpl.nasa.gov/horizons.cgi#resultsin this version distances and speeds from 01/01/2013 at 00:00 were used. an average radius

End description

Venus properties

Begin NetLogo code:

substitute-text-area-for mass-of-body 0substitute-text-area-for initial-x-speed-of-body 0substitute-text-area-for initial-y-speed-of-body 0substitute-text-area-for size-of-body 1substitute-text-area-for radius-of-body 0substitute-text-area-for color-of-body bluesubstitute-text-area-for initial-x-distance-of-body-from-center-of-mass 0substitute-text-area-for initial-y-distance-of-body-from-center-of-mass 0substitute-text-area-for number-from-the-sun-of-body 1substitute-text-area-for length-of-year-of-body 1substitute-text-area-for minimum-distance-to-com-of-body 0substitute-text-area-for maximum-distance-to-com-of-body 1substitute-text-area-for name-of-body the-marssubstitute-text-area-for initial-z-speed-of-body 0substitute-text-area-for initial-z-distance-of-body-from-center-of-mass 0set my-mass mass-of-bodyset size size-of-body ; display sizeset color color-of-bodyset my-radius radius-of-body / distance-scalelet x initial-x-distance-of-body-from-center-of-masslet y initial-y-distance-of-body-from-center-of-massif x != 0 or y != 0 [set my-initial-heading atan x y]if not the-world-is-3-d?[    setxy (x / distance-scale) (y / distance-scale)]set my-initial-x-velocity initial-x-speed-of-bodyset my-initial-y-velocity initial-y-speed-of-bodyif my-initial-x-velocity != 0 or my-initial-y-velocity != 0 [set my-initial-velocity-heading atan my-initial-x-velocity my-initial-y-velocity]if not the-world-is-3-d?  [set my-initial-speed ( sqrt ( my-initial-x-velocity ^ 2 + my-initial-y-velocity ^ 2 ) / distance-scale)   * time-scale]set my-number-from-the-sun number-from-the-sun-of-bodyset my-length-of-year-in-seconds length-of-year-of-body  * 24 * 60 * 60 ; in daysset my-minimum-distance-to-com minimum-distance-to-com-of-body ; in kmset my-maximum-distance-to-com maximum-distance-to-com-of-body ; in kmset name-of-body self ; name starts with the-...if the-world-is-3-d?  [let z initial-z-distance-of-body-from-center-of-mass   set my-initial-z-velocity initial-z-speed-of-body   set my-initial-speed    ( sqrt ( my-initial-x-velocity ^ 2 + my-initial-y-velocity ^ 2 + my-initial-z-velocity ^ 2 ) / distance-scale)    * time-scale    facexyz my-initial-x-velocity my-initial-y-velocity my-initial-z-velocity    set my-initial-velocity-pitch pitch   setxyz (x / distance-scale) (y / distance-scale) (z / distance-scale)    ]   if my-initial-speed > the-maximum-speed [set the-maximum-speed my-initial-speed]

End NetLogo code

This micro-behaviour can be used to set all relevant proprieties of the body including: appearance (color and apparent size on screen), starting position, heading and speed ( km/s ) and actual mass (kg) and radius ( km).
In this model we are assuming that the center of mass is 0, 0.

Authored by Maria Marinari and Ken Kahn.

BehaviourComposer: ignore everything after this.