Libraries‎ > ‎orbits‎ > ‎

Plot distances

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

this creates the pen of the distances plot for each body.

End description

Plot distances

Begin NetLogo code:

set-current-plot (word kind " Distances")create-temporary-plot-pen (word kind " pen")set-plot-pen-color ( color + my-orbits )let distance-com 0if-else the-world-is-3-d?      [ set distance-com distancexyz the-center-of-mass-xcor the-center-of-mass-ycor the-center-of-mass-zcor ]      [ set distance-com distancexy the-center-of-mass-xcor the-center-of-mass-ycor ] let d precision (distance-scale * distance-com ) 3if d != 0 [ add-to-plot (time - my-time-of-complete-orbit) d ]

End NetLogo code

Authored by Maria Marinari and Ken Kahn.

BehaviourComposer: ignore everything after this.