Previous: pl3el Up: ../plot79_p.html Next: plna2


PL3SP

       SUBROUTINE  PL3SP (PH,TH,R,VISBLE)
 C$    (3-D Spherical Polar Pen Movement)
 C$    Change the  angular variables  (PH,TH,R) to  the  Cartesian
 C$    coordinates X,Y,Z  so as  to define  directly in  spherical
 C$    polar coordinates points  which lie upon  the surface of  a
 C$    constant sphere  and  graph  their projection  on  the  X-Z
 C$    plane, where the  Z axis  is vertical,  and the  X axis  is
 C$    positive to the right.  Points  with positive Y values  lie
 C$    behind the plane  and are marked  as invisible.   (PH,TH,R)
 C$    are all assumed  to be  scaled to the  unit interval.   The
 C$    Cartesian coordinates  (X,Y,Z)  are adjusted  to  the  unit
 C$    interval and passed to MOVA3/LINA3 as (X,Z,Y), so that  the
 C$    default view plane (the X-Y plane) will receive the  image.
 C$    Spherical coordinate ranges are:
 C$
 C$    0 .LE. RHO .LE. infinity
 C$    0 .LE. PHI .LE. 2*pi
 C$    0 .LE. THETA .LE. pi
 C$
 C$    See H. Margenau  and G.M. Murphy,  "Mathematics of  Physics
 C$    and Chemistry", 2nd  Ed., Van  Nostrand (1956),  Vol 1,  p.
 C$    177.  These are related to the Cartesian coordinates by
 C$
 C$    X = RHO*SIN(THETA)*COS(PHI)
 C$    Y = RHO*SIN(THETA)*SIN(PHI)
 C$    Z = RHO*COS(THETA)
 C$
 C$    The coordinate surfaces are
 C$    (1) Concentric spheres about the origin (RHO = constant)
 C$    (2) Right circular cones with apex at the origin and axis
 C$        along Z (THETA = constant)
 C$    (3) Half planes from the Z axis (PHI = constant).
 C$
 C$    To obtain coordinates (PH,TH,R) expressed on the unit
 C$    interval, (PHI,THETA,RHO) are transformed as follows:
 C$
 C$    PH = PHI/TWOPI
 C$    TH = THETA/PI
 C$    R = RHO (simply clipped to 0..1)
 C$
 C$    Note that since THETA is measured from the positive Z axis,
 C$    the range of TH, (0.0..1.0), corresponds to the range of Z,
 C$    (+R..-R).  Thus to get lettering upright on the sphere, the
 C$    up direction should be set to (0,-1,0).
 C$    (09-APR-82)