next up previous contents index
Next: SUBROUTINE SYM3D Up: INIT3D Routines Previous: SUBROUTINE NUM3D

SUBROUTINE PLOT3D

 

 PLOT3D is the 3-d version of PLOT. A relative  rotation matrix and  origin is maintained (separate from viewing matrix and PLOT parameters). By setting the plotting option flag i in  INIT3D to -1, plotting will be inhibited. A common block, CPLOT3D, returns a 4 element vector V with the screen transformed coordinates. PLOT3D transforms the 3d input coordinates to 2d coordinates, clips to a 3d clipping window, and calls  PLOT with the 2d coordinates screen coordinates of the visible line segments.  

CALL PLOT3D (x,y,z,i)

x,y,z (R): coordinates of point (in 3 space)
i     (I): plot function parameter
           =  0: color control
                  x is the line color 
                  if x < 0 the screen is cleared
                  if x >= 0 2d plot angle (PLOT) becomes y
           = -1: change relative scale factor by x
           =  1: change relative rotation matrix
                   rotate x degrees CCW around x axis
                   rotate y degrees CCW around y axis
                   rotate z degrees CCW around z axis
           =  2: draw to (x,y,z) with 'pen down'
           = -2: same as i=2. (x,y,z) becomes new origin
           =  3: move to (x,y,z) with 'pen up'
           = -3: same as i=3. (x,y,z) becomes new origin
           =  9: erase to (x,y,z) (erase is color 0)
           = -9: same as i=9. (x,y,z) becomes new origin

common /CPLOT3D/V(4) : returned screen coordinates (x,y) of last
                       call to PLOT3D  v(1)=x, v(2)=y



David Long
Wed Jun 12 10:34:11 MDT 1996