HP 7470A Interfacing And Programming Manual page 49

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

Advertisement

)
)
)
45 DEGREE CHORD ANGLE
30 DEGREE CHORD ANGLE
15 DEGREE CHORD ANGLE
5 DEGREE CHORD ANGLE
The circle instruction includes an automatic pen down feature. When a
circle command is received, the pen lifts (if it was down), moves from
the center of the circle to the circle starting point on the circumference,
lowers the pen, draws the circle, then returns, pen up, to the center of
the circle. After drawing the circle, the pen assumes the pen state (up or
down) that was in effect prior to the circle command. To avoid drawing
lines to the center of the circle, move to and away from the circle's
center with the pen up.
Circles are drawn within the defined window, with clipping occurring
outside the window limits. Drawing circles within the window conforms
to the definitions given for plotting under the PA instruction.
Each chord of the circle is drawn using the currently defined line type.
Refer to The Line Type Instruction, LT, in Chapter 4.
To demonstrate some of the features of the circle instruction, the follow­
ing strings of HP-GL instructions draw various circles with different
line types, radii, and starting points.
" I N ; S P 1 ; I P 2 G 5 0 , 1 3 2 5 , 7 6 5 0 , 6 3 2 5 ; "
" S C - 1 0 0 , 1 0 0 , - 1 0 0 , 1 0 0 ; "
" P R O , 0 ; L T ; C I 1 0 , 5 ; L T O ; C I - 2 0 , 5 ; L T 1 ; C I 3 0 , 5 ; "
" L T 2 ; C I - 4 0 , 5 ; L T 3 ; C I 5 0 , 5 ; L T 4 ; C I - G O , 5 ; L T 5 ;
C I ? 0 , 5 ; L T 6 ; C I 8 0 , 5 ; "
4 CONTROLLING THE PEN AND PLOTTING
/ / 1
! I I
I
I
'
/
\
\
\
\
\
\
\
\
x
\
\
\
\
\
\
\ M \ \
I
I 1 I I
/
/
/
/
/
/
/
/
/
/
y//
/
y
/
/
The following BASIC program shows that the circle instruction can
also be used to define a series of circles that must be repeated in a
particular pattern.
10
PRINTER I S
10
20
PRINT
" I N ; S P 1 ; I P 2 6 5 0 , 1 3 2 5 , 7 6 5 0 , G 3 2 5 ; "
30
PRINT " S C - 1 0 0 0 , 1 0 0 0 , - 1 0 0 0 , 1 0 0 0 ; " -
40
PRINT " P f l - 8 0 0 , 8 0 0 ; "
50
GOSUB 130
60
PRINT " P f l 2 0 0 , 8 0 0 ; "
70
GOSUB 130
80
PRINT
" P f l - 8 0 0 , - 2 0 0 ; "
90
GOSUB 130
100
PRINT "PFI200, - 2 0 0 ; "
110
GOSUB 130
120
END
130
PRINT
" C I 5 0 ; P R 6 0 0 , 0 ; C I 5 0 ; P R - 3 0 0 , - 3 0 0 ; C I 2 5 0 ; "
140
PRINT
" P R - 3 0 0 , - 3 0 0 ; C I 5 0 ; P R 6 0 0 , 0 ; C I 5 0 ; "
150
RETURN
Line 10 defines the select code of the interface; change this statement
as necessary for your computer.
CONTROLLING THE PEN AND PLOTTING
3-15

Advertisement

Table of Contents
loading

Table of Contents