08.12.2012 Views

Systems Reference Library IBM 1130/1800 Plotter Subroutines

Systems Reference Library IBM 1130/1800 Plotter Subroutines

Systems Reference Library IBM 1130/1800 Plotter Subroutines

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SCALE<br />

The scale subroutine accepts and stores scaling<br />

inf ormat ion required by the grid, plot and character<br />

functions.<br />

I f the scale subroutine Is not c alled, t he plot subrout<br />

ine assumes init ial scale values of one inch per<br />

unit along both axes and establishes the origin<br />

(intersection of the X axis and the Y axis) at the<br />

present pen position. Howev er, t he scale subroutine<br />

must be called to define other scale factors and to<br />

establish the origin at other points. T h e scale subroutine<br />

can be called as often as required to redefine<br />

the s c aling values and the origin position (see<br />

Figure 2).<br />

Desired Scale: X Direction: 0 . 2 5 Inch Per User's Unit<br />

Direction: 0 . 0 5 Inch Per User's Unit<br />

(Not Drawn<br />

= T o Scale)<br />

=<br />

• =1<br />

,<br />

• =<br />

Chart Paper<br />

i I<br />

= Present Pen<br />

(-5,30)<br />

Up<br />

Call Example (FORTRAN):<br />

CALL SCALE (0.25, 0.05, - 5., 30.)<br />

X,Y Scale Factor Pr esent Pen Location<br />

(Inches Per User's Unit) (User's Units)<br />

Down<br />

User's<br />

Units<br />

•<br />

+X<br />

+4 —<br />

+3 —<br />

+25<br />

+I —<br />

t i l l t<br />

-I —<br />

-2 —<br />

-3 —<br />

-4 —<br />

-5 —<br />

Desi red<br />

Origin<br />

-25<br />

l - V<br />

Paper Movements P e n Movements<br />

Figure 2. S c al i ng and Origin Location (Example)<br />

Left R i g h t — . .<br />

FORTRAN<br />

Standard precision:<br />

PLOTTER SUBROUTINES<br />

NOTE: E a c h time the scale subroutine is called,<br />

the origin established is based on the physical<br />

location of the pen. Theref ore, t he pen must be<br />

moved to the position assumed by the subroutine<br />

before the subroutine is called. A l s o , t he pen<br />

position cannot be moved more than 327. 67 inches<br />

in either X direction f rom its physical location at<br />

the t ime the origin was last established.<br />

Scale values are given in inches per unit of the<br />

using program. F o r example, t o indicate a scale<br />

of 1/4 inch equal to 1 foot, t he scale value would<br />

be O. 25. T o indicate a scale of 1 inch equal to<br />

10 years, t he scale would be 0.1. Di f f e r e n t scale<br />

values can be assigned to the X axis and the Y axis.<br />

The pen is usually aligned by ret ic le adjustment<br />

to some point on the chart paper. T h e scale s ubroutine<br />

establishes the origin at any des ired point<br />

relative to the physical location of the pen when the<br />

subroutine is called. Thereaf t er, o r unt il the<br />

origin is moved, a l l measurements are calculated<br />

f rom this origin to prevent an accumulation of<br />

errors which would res ult f rom meas uring f rom<br />

point to point with calculated values that have been<br />

rounded off or truncated.<br />

The values inserted by this subroutine are<br />

positive or negative as measured perpendic ularly<br />

f rom each desired axis to the present location of<br />

the pen.<br />

CALL S C A L F ( X<br />

s<br />

, Y<br />

Extended s precision:<br />

, X<br />

o<br />

CA L L S C A L E ( X<br />

, Y<br />

s<br />

o<br />

, Y<br />

X)<br />

s<br />

number s of inches per user's unit to be used along<br />

the , X<br />

i X axis.<br />

0<br />

s<br />

, Y<br />

a<br />

o<br />

r<br />

)<br />

e<br />

a<br />

l<br />

c<br />

<strong>Plotter</strong> <strong>Subroutines</strong> 3<br />

o<br />

n<br />

s

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!