WHAT IS IT?
-----------
This model maps turtles between cartesian and spherical
3-dimensional coordinates.  To create a sphere the program
randomly generates turtles about the shell of a sphere in
spherical coordinates.  To render the sphere in the
StarLogoT graphics window it translates the turtles from
spherical to cartesian coordinates.

Converting from cartesian to spherical coordinates:

x = r cos theta = p sin phi cos theta
y = r sin theta = p sin phi sin theta
z = p cos theta

theta:  angle of the turtle's projection on the x-y plane.
phi:  turtles angle of incidence to the z axis.
p: distance of the turtle from the origin.

HOW TO USE IT
------------- 
Click the setup-sphere button to generate turtles randomly
about the surface of a sphere.  Click the go (forever)
button to run the model.  To generate a square click the
setup-square button and click the go button.

NUM-TURTLES determines the number of turtles that are used
to generate the various geometries

THETA-VEL determines the speed at which the turtles are
rotated.

(Rotating turtles in the rotate-turtles procedure is
implemented simply by incrementing each turtle's theta
variable by theta-vel!  ROTATING turtles is easy in
spherical coordinates.  However it's far easier to TRANSPOSE
turtles in cartesian coordinates.)

THINGS TO NOTICE
----------------

Notice that turtles closer (positive) on the y-axis appear
blue white and turtles further away (negative) appear blue
black.

THINGS TO TRY
-------------

Try moving the theta-vel slider as the model is running. 
This will provide real time feedback to your adjustments.

EXTENDING THE MODEL
-------------------

Create a procedure to transpose turtle coordinates. 
Remember that it is easier to transpose in cartesian
coordinates.

Try animating the phi variable.  Conceptually why does this
not make sense?

Adjust the setup-square procedure to generate a hollow
square.  Adjust the setup-square procedure to generate a
rectangle.

Create a procedure to generate new 3D geometries.

STARLOGOT FEATURES
-------------------

Notice the use of scale-color to show the depth of turtles
along the y axis.