The Plot Relative Instruction, Pr - HP 7470A Interfacing And Programming Manual

Graphics plotter
Hide thumbs Also See for 7470A:
Table of Contents

Advertisement

This final example scales a square plotting area from 0 to 1 in each
axis and draws a unit circle. This program should run on most BASIC
systems. Change line 10 as necessary for your computer to define the
plotter as the system printer. Also, if PI is not a function recognized by
your computer, add a line before line 30 to define PI as a variable (PI
: 3.1416).Lines 60 and 65 are necessary to limit the number of digits in
the X- and Y-coordinates. This prevents the possibility of coordinates
being sent to the plotter in scientific notation, which sets an error in the
plotter.
10 PRINTER IS ?o5,ao
30 PRINT"IN;IP4DOO,3000,5000,4000;SP1;SCO,1,0,1;"
30 FOR T=O TU 2%PI+PI/20
STEP PI/20
40 N=cascTn
so
'=SIN(TB
so PRINT USING B5;"PH",X,Y,"PD;"
as INRGE 2H,2(MU.UDDD),3H
70 NEXT T
so PRINT "PU;SPO;"
so
END
The Plot Relative Instruction, PR
DESCMPTIUN The plot relative instruction, PR, moves the pen rela­
tive to its current location by the number of units specified by the X­
and Y—increment p arameters.
ME
The plot relative instruction can be used as PA to draw lines
and move to a point. However, with PR, pen movement is relative to
the current pen position. The instruction can be executed without
parameters to establish relative plotting as opposed to absolute plotting
for PU or PD commands with parameters. It is often used to draw
multiple occurrences of some figure on a plot, for example, to draw
several rectangles of the same size.
3-8 CONTROLLING THE PEN AND PLOTTING

Advertisement

Table of Contents
loading

Table of Contents