next up previous contents index
Next: SUBROUTINE PLOTVT Up: Description of Plotting Previous: SUBROUTINE PLOTS

SUBROUTINE PLOTRM

 PLOTRM is the central routine for controlling the plotting of lines to the Ramtek or REF package. PLOTRM is called by the  PLOT routine but can be called separately. Any call to PLOTRM when the Ramtek package is not initialized is a dummy call. Options for PLOTRM are similar to PLOT (see documentation on PLOT). An attempt to make the viewport bigger than the Ramtek screen window will force the viewport to be the size of the Ramtek screen window (this is the default). Typically the Ramtek screen window is either 13.75 or 11 by 11 inches depending on the type (1280x1024 and 512x512, respectively), with the lower left corner at (0,0) and the upper right corner at (13.75,11).

The transformation from an input point (x,y) in plot units to an output point (nx,ny) in pixels (ignoring clipping and any axis direction reversal) is:

    nx = (z * (x * cos( a ) - y * sin( a )) + ox) / rx
    nx = (z * (x * sin( a ) + y * cos( a )) + oy) / ry

where

    a is the relative plotting angle (expressed in radians)
    z is the zoom scale factor
    ox,oy is the scaled, rotated relative origin
    rx,ry is the screen resolution for each axis (inches/pixel)
(see WHERERM)
  The relative plotting angle a is updated according to:
    anew = aold + ain
and the relative origin (ox,oy) is updated according to:
    oxnew = z * (xin * cos( a ) - yin * sin( a )) + oxold
    oynew = z * (xin * sin( a ) + yin * cos( a )) + oyold
CALL PLOTRM (x,y,i)

x,y   (R): coordinate values
i     (I): plot function parameter
           =  0: Ramtek color control
                   x is the Ramtek color table index
                   if x < 0 the Ramtek screen is cleared
           =  2: Ramtek draw to (x,y) with 'pen down'
           = -2: same as i=2. point (x,y) becomes new origin
           =  3: Ramtek move to (x,y) with 'pen up'
           = -3: same as i=3. Point (x,y) becomes new origin
           =  4: upper right corner of viewport set to (x,y)
           = -4: lower left corner of viewport set to (x,y)
           =  5: pick pen up at last point
           =  6: set relative plotting angle to x
           =  9: draw to (x,y) 'pen down' color 0 (erase)
           = -9: same as i=9. Point (x,y) becomes new origin
           = 11: end plot (close Ramtek package)
           =999: end plot (close Ramtek package)



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