BehaviourComposer: ignore everything before this.
Begin micro-behaviour:
Begin description:
set all relevant proprieties of the earth. http://ssd.jpl.nasa.gov/horizons.cgi#results in 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 0 substitute-text-area-for initial-x-speed-of-body 0 substitute-text-area-for initial-y-speed-of-body 0 substitute-text-area-for size-of-body 1 substitute-text-area-for radius-of-body 0 substitute-text-area-for color-of-body blue substitute-text-area-for initial-x-distance-of-body-from-center-of-mass 0 substitute-text-area-for initial-y-distance-of-body-from-center-of-mass 0 substitute-text-area-for number-from-the-sun-of-body 1 substitute-text-area-for length-of-year-of-body 1 substitute-text-area-for minimum-distance-to-com-of-body 0 substitute-text-area-for maximum-distance-to-com-of-body 1 substitute-text-area-for name-of-body the-mars substitute-text-area-for initial-z-speed-of-body 0 substitute-text-area-for initial-z-distance-of-body-from-center-of-mass 0 set my-mass mass-of-body set size size-of-body ; display size set color color-of-body set my-radius radius-of-body / distance-scale let x initial-x-distance-of-body-from-center-of-mass let y initial-y-distance-of-body-from-center-of-mass if 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-body set my-initial-y-velocity initial-y-speed-of-body if 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-body set my-length-of-year-in-seconds length-of-year-of-body * 24 * 60 * 60 ; in days set my-minimum-distance-to-com minimum-distance-to-com-of-body ; in km set my-maximum-distance-to-com maximum-distance-to-com-of-body ; in km set 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.