You are on page 1of 64
DANIEL F. MERRIAM, Editor FORTRAN IV CDC 6400 COMPUTER PROGRAM FOR CONSTRUCTING ISOMETRIC DIAGRAMS By WILLIAM B. WRAY, Jr. University of California, Berkeley (oie Erase Kael COMPUTER CONTRIBUTION 44 State Geological Survey ‘The University of Kansas, Lawrence 1970 EDITORIAL STAFF D.F. Merriam* Editor Technical Editors John C. Davi Owen T. Spitz” Paul J. Wolfe Associate Editors Frederic P. Agterberg John H. Hefner* William C. Pearn * Richard W. Fetzner* Sidney N. Hockens* Max G. Pitcher* James M. Forgotson, Jr. * J. Edward Klovan Floyd W. Preston John C. Griffiths William C. Krumbein* Walther Schwarzacher John W. Harbaugh* R.H. Lippert Peter HA. Sneath Editor’s Remarks The "FORTRAN IV CDC 6400 computer program for constructing isometric diagrams", by W.B. Wray, Jr. will find many uses by earth scientists. Long oriented to use of graphics such as maps, cross sections, and 3D diagrams, geologists will welcome this contribution. Other COMPUTER CONTRIBUTIONS spe~ cifically concerned with graphic output are CC's 15, 23, 36, and 37. Most other programs also have output in graphic form. For a limited time the Geological Survey will make available this program on magnetic tape for $20.00 (US). An extra. charge of $10.00 is made if punched cards are required. When ordering a particular program pleat specify the longuage and computer facility needed because several versions of many programs ere ‘available. ‘A complete and up=to~date list of available COMPUTER CONTRIBUTIONS can be obtained by writing the Editor, COMPUTER CONTRIBUTIONS, Kansas Geological Survey, The University of Kansas, Lawrence, ‘ansas : Computer Contribution Mathematical simulation of rine sedimentetion wth IBM 7070/7094 computers, by J.W. Horbaugh, 1966. + (out of print) 2, A generalized two-dimensional regression procedure, by J.R. Dempsey, 1966 | $0.50 3. FORTRAN IV and MAP program for computation and plotting of trend surfaces for degree 1 through 6, by Mont O'Leary, R.H. Lippert, and ©.T. Spitz, 1966 + $0.75 4. FORTRAN Il program for multivariate discriminant analysis using an IBM 1620 computer, by J.C, Davis ond R.J. Sampson, 1966 + $0.50 5. FORTRAN IV program using double Fourier series for surface fitting of irregularly spaced data, by W.R, Jomes, 1966. hig Stes ecole Sante Spe $0.75 6. FORTRAN IV program for estimation of cladistic relationships using the IBM 7040, by RL. Bart chee, NIS6G/ere, A meron oh conten GA ie dat nee ou mE oly rs ik 0151 $1.00) 7. Computer applications in the earth sciences: Colloquium on classification procedures, edited by D.F. Merriam, 1966. = $1.00 8. Prediction of the performance of a solution gas drive reservoir by Muskat's equation, by” Apolonio Baca, 1967. = $1.00 9. FORTRAN IV program for mathematical simulation of marine sedimentation with IBM 7040 ‘or 7094 computers, by J.W. Harbaugh and W.J. Wahlstedt, 1967. = $1.00 10. Three-dimensional response surface program in FORTRAN II for the IBM 1620 computer, by R.J. Sampson and J.C. Davis, 1967. + $0.75 11, FORTRAN IV program for vector trend analyses of directional data, by W.T. Fox, 1967 | $1.00 » (continued on inside back cover) * Active Member, ° Associate Member, *Junior Member, American Association of Petroleum Geologists FORTRAN IV CDC 6400 COMPUTER PROGRAM FOR CONSTRUCTING ISOMETRIC DIAGRAMS by William B. Wray, Jr. INTRODUCTION Isometric pictorial representation has long been fovored by geologists as a means of displaying three~ dimensional surfaces and bodies. A principal advan~ tage over perspective represent that plotting cond measurement can be made readily anywhere on the diagram. Lobeck (1924, p. 120-121) lists the following properties of isometric diagrams, (1) "Measurements may be made to scale any~ where upon the upper surface of the block in the direction of either of the two coor~ dinates, which in the object itself are at right angles to each other. (2) Distances in other directions are not com mensurate with each other unless measured along lines parallel to each other, and they ‘re not commensurate with distances meas~ ured on the sides of the block. (3) All the lines parallel in the object itself are parallel in the isometric drawing. (4) All lines vertical in the object are vertical in the drawing. (5) If the vertical scale of the drawing is the same as its horizontal scale, then the meas~ urements made in the direction of any of the three coordinates are commensurate . (6) All-angles in an isometric drawing are dis torted, and even two angles lying in the same plane cannot be compared with each other unless they lie in exactly similar positions." The 13D subroutines included with this eontri~ bution provide an efficient ond fast method of dis~ playing @ surface ~ a single valued function of two variables ~ in isometric or similar pictorial repre~ sentation, Numerous options are available through the ISPECS and RSPECS parameter arrays. Among the most important options qi The diagrams can be seen from all theoret~ ically possible viewpoin The data can be viewed in an unlimited number of rectangular subblocks, oll auto~ matically spaced to avoid point overlap (x and y direction spacings are variable). Any rectangular subarea within the dat. array area may be considered for plotting cand any number and configuration of ree tangular subblocks wi be skipped if desired. Scale, line and point spacing, and density of lines and points to be plotted are variable. The vertical (z) scale may be expanded or contracted relative to the horizontal (x, y) scale without restriction. Distances in x and/or y directions can be stretched or fore shortened independently, with scale remain= ing constant. (¥) Surfaces may be plotted with or without the troditional block diagram frame, and major ‘and minor scale ticks are available. A stan- dard labelling routine con be used. in this subarea may Gai) (iv) (vi) Data input is flexible. Points can be arrang ed in north~south (y direction) or east-west (« direction) grid lines. Possible applications of isometric pictorial rep~ resentation can be considered within the framework of four general types of surfaces. (1) North-south, east-west, elevation surfaces, such as topographic surfaces, tops and bot~ toms of beds, buried bedrock surfaces, ete. (2) Northsouth, east-west, z surfaces, where z is any measureable quantity, such ‘as, for example, thickness or percent of sand in a sedimentary bed, or Bouguer anomalies. (3) X-y~z surfaces, for example equilibrium surfaces in chemical stability diagrams. (4) X-yf(x, y) surfaces, mathematical fune~ tions of two variables, including fun of many terms where the values at different points cannot be readily visualized. Mai preceeding papers in the Computer Contr butions series deal with functions of thi type. Examples are the double (two-dimen sional) polynomial and Fourier series current~ ly important in trend-surface and harmonic and spectral analysis. Because of wide interest in computer graphics, a number of algorithms have been written which have the copability of generating three-dimensional dia~ grams (e.g. Rohlf, 1969). Almost all of the algor- ithms produce perspective rather than isometric dia~ grams and most have more ~or ~less serious bugs and severe limitations in point ~array size due to rapid increase of execution time with increase in number of points ( A.R. Paradis, personal communication). Algorithms to construct isometric diagrams seeming| are less common, os | do not know of any, other” thon 13D. The [3D subroutines have been subjected to thor- cough testing, and numerous drawings have been obtained, but it is entirely possible that algor~ ithm defects afe present due to the complexity of the subroutines. Acknowledgments .~ Mr. Arthur R. Paradis, in charge oF computer graphics at the University of California, Berkeley, Computer Center, gave encour- ‘agement and arranged use of computer facilities during the program development. His methodology is evident in both the organization of the latter half of this paper cond in the subroutine structuring. The Anaconda Com~ pony provided some development computer time and permitted use of the view of the Berkeley open-pit mine in Example 2. Prof. Charles Meyer, Prof. Gar- niiss Curtis, and Mr. Paradis kindly reviewed the man~ useript. PROGRAM ALGORITHM I3DIGL, the subroutine which constructs the isometric projection, processes parallel rows of points on the surface to be represented. A visibility or hor~ izon line is constructed and is carried from the front to the rear of the surface. Each point on the surface need be tested only once to define visibility. Aso consequence, calculation time increases as the first power of the number of points defining the surface rather than the square of the number of points. T! is of gteat practical importance in large and detailed projections (see Example 2). ‘An obvious next step is the development of rou~ tines to process multiple-valued functions of two var~ jables. Both upper and lower visibility lines would be carried for each surface, so that the undersides of sur~ faces could be seen. In this manner, cutaway block diagrams, similar to those used to portray geology of underground mines, could be constructed . Another useful feature to incorporate is wide~ spaced surface gridding as an aid te rapid location of (x, y) positions. | have written a subroutine, I3D2GL, which permits this option, but it is not in a general Form so has not been included in this paper. The sub~ routine takes longer to execute and requires signifi cantly more core space, and at the present time con~ version has not been justified. I3DIGL and supporting subroutines were written to create projections at least possible cost so that, if desired, the program could be used on a routine ba~ sis. All 13D subroutines make use of a common work array BUFI and complete variable dimensioning to reduce central memory core storage requirements toa minimum. I3D1GL requires 3313g storage loca~ tions and the remaining subroutines tofal 3574, in~ dependent of work array requirements. To hold exe~ ution time for all subroutines to a minimum, some care was taken to make the FORTRAN coding of high efficiency. To reduce plotting cost, I3DIGL generates plotter construction codes in such @ manner as fo reduce as much as possible off paper pen travel. Execution data specifications are entered into the various subroutines from a main program vie two common parameter arrays, rather than via data cards. This considerably simplifies data input, because the need for variable card formats (for the completely general situation) is eliminated. Also, particular specifications are carried automatically between subroutines unless changed. RELATION OF VIEWPOINT TO BLOCK ORIENTATION It is possible to characterize the orientation of a block in isometric projection by means of an azi~ muth, or line-of-sight, value and an apparent angle of inclination (looking down from above). The re~ lation can be derived as follows. Consider a rectilinear isometric block, Figures lond 2, with the properties given by Lobeck and with the edges trending north=south and east-west. To permit construction of the projection, it is nee~ sary to solve for angles a7 and a2 in terms of Y ond Y Figure 1.- Normal view of isome! ram, with elements used to derive equations (12) ‘and (13). Figure 2.~ View of same diagram as in Figure 1, slightly rotated out of plane of paper to show hidden elements. rctan (a/b) tan (z/h) s defined as the angle to the N~S line from a horizontal line. ay is positive if clock~ wise (as shown), and negative otherwise. @2 is defined as the angle to the E-W line from a horizontal line. a is positive if count~ erclockwise (as shown), and negative otherwise. From Figure 2, ton y=2/h= 25080 a) ‘and from Figure 1, etd, z/b=e/b+4/b ; @ also. e/b=sinay, ) 4/9 = tan ay , and 9/b=cosay « So by multiplying the last two together, d/b =tanay cosa, « (4) Substituting (3) and (4) into (2) yields z/b=sinay+tanay cosa, - (5) Substituting (5) into (1) results in ton Y/eos/ =sinay+tanayeosay, (6) which can be rewritten as tan¥/ cos =sinay +S = =e sinag. *(7) Now / ® and . 2) thus (8) and (9) cor a/b=cosay/ cot ay - Because ¥ =arctan (a/b), ne to yield, after cancelling 9, Y = arctan (cosay/ cose). + (10) Equations (7) and (10) now can be combined ,and successively a) and 72 isolated. tony, cosy sina) +tansinay , ton) cosy where ton we, ( ) are numbers, call them A ‘and B respectively. So on substitution ond reordering, sinay =B-Asinay . (11) From (10), cos ay =A.cos ay , and squaring both equotions gives sin2a, = B2 ~ 2AB sinayt A? sin2ay 2 os2 cortay= AZ costay » ‘Adding them together gives Pay = A2 (sin2a5+ cos2ay) + B2 -2ABsina, . sin2ay+ cos Because sin? + cos? = 1, =A2 +82 ~ 2ABsin ap, and solving for a yields a 2 AZ +B2-1 Z 2AB Resubstituting for A and 8 results in se eesin( taney 29092 2 Ea i tony, cosy After shuffling and clearing of intemal fractions, sin2¥'+ ton2y ~ cost) = sing tan ‘Angle ay can now be obtained by substituting (12) into (TH). resin ( dv. =aresin ( +*(12) ay = arcsin ( Ss ~ tan sina) which, on rewriting, becomes ton ¥ ~ sinvvsina2 ). a) = aresin (2 PSOE (13) Because of the particular nonEuclidian pro- perties of isometric projection, it turns out that not all combinations of , ¥ will yield real waginary) diagrams. ‘Table I relates ay W and Y . Table | gives values for one quad~ int in 5° intervals of Yand ¥ , and values in 1° intervals are given in the Appendix. Note that a surface can be portrayed in unorthodox orientations. For instance, either aj or ay can be negative, re~ sulting in a skewed diagram. The other three quad~ rants are mirror images of the first, as shown in Fig ure 3. to If b= 4b, 1=1, 3, 5,7, thena)=ay ‘and equations (12) and (13) reduce to @ =arcsin ton). 14) (eter) t For the standard isometric projection which has a = 30°, ¥ = 35.2644. Table 1. Listing of ay and 20s a function of Wand ¥ , in five degree intervals for one quadrant. 13D SUBROUTINES ~ INTRODUCTION General Attributes The remainder of this paper can be considered manual on how to use the 13D subroutines, with ex~ amples. Each subroutine is treated in detail so as to make all execution alternatives as clear as possible, ‘and each section can be read independently of the others. 13D subroutines deal with points arranged in por allel equally spaced rows called grid lines. For in put into I3DIGL, the points must be evenly spaced along each line. I3DPTS may be used to calculate odditional lines. I3DPTA can calculate evenly spaced points from grid lines of irregularly spaced points. I3DCVT converts Hollerith card data to bi nary data suitable for input into I3DPTS, I3DPTA, or I3DIGL. Because Hollerith data must be arranged in a specific manner (see the section on Point Coordinate Data Structure), I3DCHK is available to catch gross keypunching errors and misplaced data cards. Execution times (CP) are printed for each subroutine called. Some typical timings are I3DCHK: 800-1400 points per second. I3DCVT: 1000-1600 points per second. I3DPTS: 800-1400 input points per second, less if many intermediate points are calculated. I3DPTA: 9000-10000 final points per second. I3D1GL: 1500-2600 points per second. For I3D1GL, a subequal amount of plotter post ot 6 Figure 3.-Plot of Y versus U showing area within whic 180 270" ‘360° metric diagrams can be drawn. processor Hime is needed in addition. I3DIGL and the other subroutines can, in prin= ciple, process an unlimited number of (x, y, 2) points, although the practical limit at Berkeley (due fo limitations of one-job disk storage capacity) is about 1,800, 000 points, Selection of the value for final point spacing (FPS) along the grid lines is of importance because the positioning of the end point of a visible line as it passes into a hidden line can be in error by an average of one-half the FPS. Spacing depends upon values of RSPECS(7), RSPECS(10), ISPECS(10). Sixty to 80 points per inch give pleasing results; a general purpose range might be 10 to 100 points per inch. Also, for best results the FPS should be less than the final row spacing (FRS), which depends on RSPECS(1), RSPECS(10), ISPECS(9). Common usage has FRS = (3to 4) FPS, or approximately 20 tines per inch, Terminology Some special terminology as used in this poper: (A) grid lines and points (Fig. 4 illustrates termin= ology) (8) viewing the surface. The attitude of the plotted surface is determined by the direction of sight (RSPECS(14), U7) and the ‘apparent angle of inclination (RSPECS(13),Y). can range from 0° (looking due north, or in the +y direction) through 90° (looking due east, or in the ‘+x direction) around to 359.94" . Note particularly the requirement that the positive y direction be due north. Gamma can range from 0° (horizontal) to approximately 54.7°. See Table 1 and Figure 3 for relation of a, and ay to W and y Program Specifications 13D subroutines require @ work array BUFI, di mensioned in the calling program, and fwo parameter arrays placed in labelled common as follows: COMMON /WSPECS/RSPECS (30), ISPECS(10) RSPECS and ISPECS are described below. Distances given in inches refer to the actual distances as they ‘appear when drawn on paper. Distances not so specified are data distances. Un on Dacrpin ofthe RSPECS Aray (eal (FP) numbers) Suggested Parameter Maemonic Subroutine: Detrpton SSPECS(I) SPACEL PIS Space between adocet atid lines NGL lou, ater clcuoton sf ntred= foe rere fan)- Valve maine the ‘ne tet a volun of SPECSE) RSPECS(Z) TSTART —IGL_—_Tromverw ale cootsnate of fint (eter if Ric, sare eat HES) Fn gid ne Int asrecsi) asrecsta) ISPECSIS) rsPEcs(6) sree asrecs(a) ssrecsi) ISPECS(10) rsPecs(t) srecs(12) asrECStI3) asecsti4) ssrecstis) AsPEcs(I8) wsrecsti7) wsrecstia) starr cH fet orale oxi eotinae of tt point (cotharmoys Gf Nos i ne on™ ferns EW grid fine) of any ee ZROTM—IGL__fference elevation or x-exdiote, perecly &voalesf. 2BOTM Si tion lark So popery orf Fees ee tobe crawn, SOTA wl Lethe sveoarnae of the boon of Tate SBC aac Paitin of fe neo carer fos 1 ZIOP —IGL_—_—Reference elevation ot 2-cotsnate, ferealy looet 2. ZTOP else onl bloc spacings if 2TOP = largest si then socing a enely ‘oneton SF RSPECS (28) ond SPECS), IWETOP Stars, then seeing Ineo: by Ht deren’ Deurac ris Ties 9 etna {uate oto ons DELFAC a of 9 my seed vate. Ses lv the arguloty losin vn 35 ction FS. val behecenajacent ret FENISH CHK Parallel ons coordinate of at pint (fester or sterol of ony si gi ie ZDIFF CHK Maximum differance inadigcent == (torainate pes slang bse gia line," Used to eaten gros rere ‘at preparation ana sing. scate GL Seale ofthe dogton, in reo (et) hit por ie on he paper Peper acocdinat, sven In inches, ‘Fite ear corar otha ft Bloc Patton tthe rctngulr wbotes Suldeed (ce Figure 7), whether or sort blocs osuslyploted oper y-coodinale, ox above. aK aL GAMMA ICL Ayre orale of vim in dere, cr brea Saad Tre sonible rnge cf veins. si GL Disctionof inerofsgh, in dapems, trsanel lene nt de ath oe hetero ble ora Si cenvenon ea ond a oo Sees a) (kN cr Sea ae Setar of Bord FRAME TGL_—Set=1, if ames are wanted, of =O, eames ee ot waste. If no ames are wanted, no nae to pacity RSPECS(I6) through (2) Incl TL Sep =, ifrick mas oe wanted, oF In tick mre are wanted, no ned 0 secify RSPECS(I7) ‘esugh (2) Inlsies MAINT 1GL Mejor ek interval ie. the distance (Gafvol ue wnt between accor! sojer tick mente MINIT IGL Minor ck interval, ies the distance Beteconasjacent nc ek mat (Catin: MINN mont vie evenly Seto MAINT. Moly ne sie ek sPECS(I9) rsPecs(zo) sPEcse2t) MALNT —16L MINIT 16L waa, Mojo tick ma length, given in inches. Minor tick mak length, given in inches Set = 1. ifthe standard expla Trou do ot vant an splantion). Sel Baonple 3 or he feat fe Stoniod! elon. SSRCStan ae SRE tage aN ce fred fo ISBIGL oe can be eed for new oF ISvEst2) YHOSL—IGL_ eres, ga in cay Peay fig Sad et ‘eri nthe mr a Sie Santee Baas sie ne (Sera tppeto Se or ISPECSIS) OSL IGL_—_Rrscenrtne, oan nce, of Teen aie Hest Pleo = Pett cere ey bend SSE cee Fle ch tthe ih ofthe Se pened on SIG, leon Pe et TENS inc aon se forte aiectteecs cai SPECS(24) VDATAP IG RSPECS(2S) XFRSVE —IGL_—_ (Rene from 1901GL). Paper xveor ey Sen In inh ASPECSQ6) CFC] GL ane e 9DIGL), Parl aorta ofthe not ce ce pshion ot nena he Block Sr) (Panes fom LDIGL). Tne ai smite ofthe nat Caer othe fia Soe pono wsrecs@7) crer 1G, SPECS(26) FLSEP —IGL_—_ Separation of black along palais Altetion, given in inches,” Onehall frck (5) crmenty wed, only oe Cleese be drwy t=, SPECSQ9) TLSEP ——1GL_—_Sepoaton of black olong transverse th rection, above SPECS(GO) ZFACTR —IGL Yericalsele wanted st 22, et. Tick (rt ore saled ccc List and Dacrption of the ISPECSAsroy (Inopee Numba) Suggested Foranter Masonic. Subroutines Deseription ISFCS() MAXBGP CHE Moma rar fb ifn dao GMT psinttpe i ne. ISPECS@)—NUMGL CVT Nona of orld nesta, nen inter Fis) edit Ines i ny. The ttl maer FIA Ballina fence [ogical econ) input nto TOL TapeeS oro by WICK. 1sPECs@) Nunber of intermediate lines between Wo INTUN ovr PIS) dajocon bare gr lines ISPS) MAKIGR —fT5. Moxon nur of elated leon ;A aint por internat gi insite Fins Se calculeted lng OPES, hon Rance S3s ireestie ISPECS(S)NUMFPT. PTA Namba of final ridin pins in any NGL Pal tne ISPECSI6) LNEDIR CHK ization of dat giles. Seb = 1 iF TGC NSS ms sat = 2 EW foe, ISPECS) BLOCKP —IGL_—_Nunbar of rows of lacs thet ore nating parla te Sata fines. LOCKE > ie {hesiz of CTC aroy (prt of BUF aay) See Figure. ISPECS(@)BLOCKT —1GL_—_ Nbr of ros af blocks rrming rns one o deta gi lines BLOCH 1 SOR one art BUH re. SPECS) LSKIP_——IGL_—_The abr pls one of gd ln in ile BSte dip of execution f13DIGLy eng, if hind tne nae tobe iy ‘Note that BSPEES(1) ‘rd ISPECS() rerain ha vome regres of Nelue of LSkibs Soe secon 8 SPRING ISPECS(IQ) FISKIP——1GL_—_ The nunbar alr one of dat (~cosnfinat) paint ine 8d fo kip of eecaton ts Erample on ohove; Nese sha RSPECS ond ISpeSfs tein te se reorles of whee SFPTSKIP, Seo vcton 3 DIGL: In addition, for ISDIGL, provision must be made for general plotting system parameters. At Berkeley, parameters are held in a special array, SPECS (30). SPECS(1~8), (11-12) are declared in the MAIN pro- ‘gram and define general plotting bounds, data scaling tand system constants. 13D1GL calculates projected data~point coordinates in groph=paper inches, so in your plotting system no data scaling should be used. SPECS(13~15), (17~23), (28) are calculated within I3D1GL and its subroutines, so you should not declare them in the MAIN program. The following det abstracted from the Berkeley Graphical Display Sy tem (GDS) manual, are given in order that appropri ate parameters may be substituted when I3DIGL is adapted to other computer systems. SPECS(I3) specifies the total number of data points to be plotted. SPECS(14) specifies the number plus one of X-array points to be skipped be~ tween adjacent plotted points. SPECS(15) specifies the number plus one of Y-orray points to be skipped. SPECS(I7) specifies the base dimension of the rectangle in which a plot symbol or character is defined. SPECS(18) specifies the height dimension of the rectangle. SPECS(19) ‘SPECS (20) SPECS(21) ‘SPECS (22) SPECS (23) SPECS(28) Basic specifies the additional separation distance between adjacent text characters. specifies the rotation in degrees of @ line of text. specifies the character set to be used for text. specifies the X distance to the lower left comer of the first char~ acter of text. specifies the Y distance to the lower left comer of the first chor- acter of text. specifies the number of decimal places to be used. Skeleton Figure 4.~ Types of grid lines and points. Three GDS subroutines are called from I3D1GL ‘and its subroutines, and these, similar to the SPECS ‘array, must be replaced by their counterparts if I3DIGL is used elsewhere than Berkeley. SLLILI serially connects a set of points with straight lines. TITLEG prints a Hollerith explanation. DECVAL prints a floating-point or integer number, GDSEND, Point Coordinate Data Structure Some details are given under subroutine headings, but on overview here is necessary. Points defini the surface in space ore described by (x, y, 2) co” ordinates. For purposes of the 13D subroutines, the points must be arranged in parallel rows called grid lines (ee Fig. 4 and 5). Grid lines may be north~ south trending (parallel to the y~axis) or east-west trending (parallel to the x-axis), as defined by ISPECS(6). Each grid line of points constitutes a logical record. Because of the regular (gridded) arrangement of data points, the 13D subroutines require only partial coordinate information, calculating the rest internal~ ly. I3DCHK, IS3DCVT, I3DPTS, and ISDPTA require for each grid line a sequence of point coordinate poirs (x, z) or (y,z) depending on line direction The points must be arranged (or calculated) in sequential ‘order so that (x or y}j +1 > (x of yj « Final, or Filled - out Grid lines must be considered sequentially as well. Figure 5 illustrates point and line relationships. I3D1GL re~ quires even less point coordinate information, because all points on grid lines are spaced equally. A logical record (one grid line) for use of I3DIGL consists of sequential 2= coordinates only, each 2~ coordinate representing one point. used in MAIN programs, terminates plotting records. North - South Grid Lines {Up (+z, dirdetion) Figure 5. Grid line and point conventions. East - West Grid Lines 13D SUBROUTINES ~ USAGE 19 Program The calling program, although variable in detail according to the needs of specifie subroutines, must contain the following nonexecutable elements. () JOB CARD, naming all input/output files equired by’ the subroutines to be called, as well as any other needed files. File com= binations required are given under each sub~ routine heading. There is no conflict of file names between subroutines. ) (c) COMMON/WSPECS/RSPECS(30), ISPECS(10) Work array BUFI (LNGTHB), where LNGTHB is the maximum array length required by in- dividual 13D subroutines. If LNGTHB is large, it is advantageous to place BUFI into unlabelled common where it will overlay the loader. “A maximum of about 1680} loca~ tions may be saved this way. Subroutine I3D1GL 13D1GL maps a three-dimensional surface, o single~valued function of two variables, into isomet= tic or other similar pictorial representation. One di rection of grid lines is used for shading and relief. Because of this subroutine's importance it is discussed first, although in the calling sequence it would be called after other 13D subroutines. It can also be used alone (see Fig. 6). ‘A, JOB CARD with possible file combinetions.. (1) PROGRAM MAIN (OUTPUT, TAPES3, TAPE99) For use when point data already exists on TAPEB3. Point data logical records must not be preceded on TAPES3 by other logi~ cal records. TAPE99 is the logical tope unit for recording construction codes generated by the plotting subroutines. (2) PROGRAM MAIN (INPUT, OUTPUT, TAPE = INPUT, TAPE83, TAPE99) For use when the logical records are punched cn binary cards (i.e. from I3DCVT, I3DPTA, or other routines). Your main program must read the records off the INPUT file (TAPEi) cond transfer them to TAPE83 prior to calling 13D1GL. B. Required specifications. These must be declared USER ENTRY He 1 13D CHK ec'T.0 TAPER? I3DPTA ecr.0 Taree 13D1GL USER EXIT Figure 6.~ User flowsheet guide to use of 13D subroutines. HC means Hollerith cards, BC means binary cards, T means magnetic tape, and D means disk storage. in the main program prior to calling IS3D1GL. RSPECS (1-5), (7), (10-23), (28-30) Depending on options chosen, some of these do not have to be declared. See RSPECS listing for details. RSPECS (24-27) are returned from 13D1GL ‘and may be used for labelling. ISPECS (2), (5-10) C. FORTRAN calling sequence. CALL I3D1GL (BUFI, LNGTHB, SPECS) LINGTHB must be set > 4+1SPECS(5) + ‘2x SPECS (7) SPECS(8) + ISPECS(7) + ISPECS(8) + larger of ISPECS(7), ISPECS(8) + DeISPECS(2) +3 D. ther information required. Certain information must be entered into portions of the array BUFI prior to calling I3DIGL. Array addresses in BUFI are tabu- lated as follows, Ax ISPECS(5) + 1 ‘AI + ISPECS (7) SPECS(8) ~ 1 AA2 + ISPECS (7) ISPECS(8) + 1 ‘AAS + ISPECS(7) Ag +1 ‘AS + ISPECS(8) (1) That portion of BUFI array from (AAI) to (AA2) inclusive is used to determine if a particular rectangular block of data points is to be plotted or skipped. Blocks are bounded by CPC and CTC coordinates (Gee Fig. 7). Block number 1 is always in the southwest corner of the subarea to ISPECS(7) = 3 (2) be considered for plotting, regardless of the angle~ of-sight, RSPECS(14), or di- rection of grid lines, ISPECS(6).” Block number 2 is always in the next position in the transverse direction, and so on as il= lustrated. “If block i is to be plotted, set BUFI (AAT «IF not, set it =0. Those portions of BUFI from (AA3) to (AAA) ‘and from (AA5) to (AAS) are used to de~ termine the bounds of blocks within the subarea considered for plotting. The first portion can be thought of as equivalent to a dummy array CTC of length ISPECS(7) +1, and the second portion can be thought of similarly os a dummy array CPC of length ISPECS(8) +1. CPC(1) is always the smallest parallel direction coordinate, ‘and s0 on in increasing order if grid lines are north-south. If grid lines are east= west, CTC(I) is the largest transverse di~ rection coordinate and s0 on in decreasing order. Figure 7 illustrates the situation for east-west grid lines. Some restrictions exist on possible valves for CTC and CPC. All CTC(i) must be equal to the transverse axis coordinate of grid line. Furthermore, if ISPECS(9) > 1, that is if lines are to be skipped at execution, ad= ditional caution is needed. The first block may start on any grid line, which thus be= comes the first line, but all succeeding block CCG) must lie on 6 drawn (not skipped) arid ine. An exactly parallel situation exists for CPC. ISPECS(8) = 4 Figure 7.~ Block diagram showing a possible relationship of input data points to drawn subareas. See text for explanation. AIL CPC(i) must be equal to the parallel oxis coordinate of a point on a grid line and if ISPECS(10) > 1, the same caution must be exercised. Subroutine I3DCHK I3DCHK is a small, independent subroutine which can be used to catch gross keypunching errors and data cards out of place in a Hollerith data deck. Basic and skeleton data points, in order to be accept~ able to ISDCVT, must satisfy the following relation~ ships. (1) Points are arranged in data grid lines. (2) All lines must begin and end by data points with parallel~oxis coordinates RSPECS(3) and RSPECS(8) respectively. (8) Each data point is represented by a pair of coordinates, (y, z) if north~south grid lines or (x, z) if east*west grid lines. The north (or east) coordinate must be monotonically increasing (e.g. xj + 1 > x; for all (4) Each grid line (logical record) must be ter~ minated by a user~ option special end of record (EOR) punch in the last north (or east) coordinate position on a data card. (5). The set of logical records is terminated by a 'double' EOR, the identical EOR punch in the z~coordinate position as welll. Any configuration of blank cards or spaces is allowed. This permits easy data change of update. Note that, because of this fea~ ture, ony point with a parallel~oxis coor dinate of 0. is ignored. A, JOB CARD with files required. (1) PROGRAM MAIN (INPUT, OUTPUT) B. Required specifications. RSPECS (3), (8-9) ISPECS (1), (6) C. FORTRAN calling sequence. CALL I3DCHK (BUFI, LNGTHB, NUMPTC, FMT, EOR) LNGTHB must be set > 2eNUMPTC NUMPTC is the number of data point pai data card. Maximum value is thus 40, FMT represents up to 25 Hollerith characters describing the format of the data on a cord. per 10 Example: 16H(1OX, 6(F6.3, F5.1)), 16 Hollerith characters. EOR is the special (and unique) number to be used 9s an end~of-record and end-of-file marker. The use of this is described above. Subroutine I3DCVT I3DCVT reads a Hollerith data deck, possibly w embedded blanks, and reduces the data to a set of nary logical records, on TAPES], TAPEB2, or TAPE83 15 specified in the calling list, suitable for direct in= put into I3DPTS, ISDPTA, or I3DIGL respectively. Remember to rewind or make certain the tape unit is at the load point prior to calling !3DCVT. Any of the units can be equivalenced te PUNCHB in the JOB CARD, thus permitting a binary deck to be punched. After calling I3DCVT, if I3DPTS or ISDPTA is to be called from this main program, you must rewind the tape unit to just before the first log- ical record written. A. JOB CARD with possible file combinations. Figure 6 also. a) See PROGRAM MAIN (INPUT, OUTPUT, TAPEI) i =81, of 82, o 3 For ute when 19DPTS, 19DPTA, or I3DIGL is called from the same main program, or when the data iia records are written onto mag- netic tape for later use. PROGRAM MAIN (INPUT, OUTPUT, PUNCHB , TAPEi =PUNCHB) For use if data are to be punched on binary cards for later use, B. Program specifications. ISPECS (1-3) C. FORTRAN calling sequence. CALL I3DCVT (BUFI, LNGTHB, NUMPTC, FMT, EOR, “GHTAPESI (guewcHor ) HTAPEB2| , [6HNOPNCH] ) GHTAPES3 LINGTHB must be set >> 4s ISPECS(1) + ISPECS(2) NUMPTC, FMT, EOR are described in the section on FORTRAN calling sequence of I3DCHK. The tape parameter, which must be one of the three given, must correspond to the tape unit declared on the JOB CARD. The punch parameter, which must be one of the two given, determines whether or not @ binary record, the array NUMPT, will be punched, each word of which contains in order the number of points on a single grid line. Word 1 corresponds to grid line 1, and soon. There are three possible situa tions which may arise. (1) I3DPTS, ISDPTA, or 13D1GL will be called from the same main program. No data bi~ nary cards are to be punched and the punch parameter chosen must be HNOPNCH. (2) No other 13D subroutine will be called now, TAPE’ is equivalenced to PUNCHB in the JOB CARD, and data binary cards are to be punched. If i is equal to 81 or 82, choose 6HPNCHOT as the punch parameter; the last logical record punched will be the orray NUMPT.. No other 13D subroutine will be called now. The data logical records are to be stored on magnetic tape equivalenced to the files TAPEBI, TAPE82, or TAPES3. If tape unit is 81 of'82, choose 6HPNCHOT as the punch parameter; the array NUMPT will be written as the last record on the tape. @) Subroutine I3DPTS ISDPTS reads an array of data points on basic gtid lines and calculates points on any number of intermediate lines, resulting in an array of points ‘on skeleton grid lines. Points on basic grid lines may be regularly or irregularly spaced, and the num= ber of points per line may range between the limits 2and ISPECS(1). Each line, however, must begin ‘and end with fixed parallel~axis coordinates RSPECS(3) and RSPECS(8) respectively, and each successive point parallel~axis coordinate must be reste than the preceding one, within a given arid line (e.g. %} interpolation between points ‘on adjacent basic grid lines to calculate points on intermediate lines. I3DPTS is unusual, however, in jes between horizontal and inclined ortions of the data surface are preserved in caleu~ [otion of intermediate line points, Ordinary lineor interpolation of irregularly spaced points would gen- erally result in intermediate lines showing rounded comers where they should be angular. This may be of some importance in the representation of arti cially created topography (see Example 2) and other surfaces. Dota points ideaily need only be entered at breaks in slope, thus minimizing the number of points needed to represent the surface fully. The algorithm for preserving angularities is not perfect, and certain extreme and generally unusual basic data point arrangements will cause aberrations. Perfection may be difficult to achieve, in part because of the problem of unintentional angulerity situations created by a normally rolling surface. As a guide to proper selection of data~point positions to minimize lot aberrations, the basic algorithm is given. Num~ rs and letters correspond to numbers and letters comment cards in ISDPTS listing. If you are not con cerned with angularities and wish a simple linear interpolation, there is little need to study the algor- ithm, except to note the importance of DELTAD, de~ rived from RSPECS(6), in Ziv. I3DPTS angularity algorithm (1) Consider a first grid line A and a second, adja- cent, grid line B. Consider a point i on'line A. (2) Consider the point j on line B last used for inter~ polation and the next point j + 1. (If both B; and B; 4 1 are of the same eleva~ tion (z~doordindte) as Ai, then use both with A; to form two new grid points for each intermediate line (linear interpolation). not at the same elevation as A; but s, then consider By + 2. i Bj + 2 is at the same Clevation os B; 4! and A;, and at least one of By 4 1, BI 2 is within DELTAD porallel-alis distance of A; (see RSPECS(6) descript~ ion), then use By 4 1, for linear inter~ polation, U If Bj 5 2 is not at the same elevation, and!if dt least one of Bj, B; «1 is within DELTAD of Aj, ltheh use Bj, B; 4. 1 for linear interpolation, If B; id at the same elevation as A;, but B; 411 is not, and if at least one of Bj , 8] 41 is within DELTAD of A;, then use 8;, B! | ] for linear interpolation. If neither B; nor B; 4} is at the same eleva f i tion as Aj: (@) Test additional B points to see if there care two consecutive B points, at least one of which is within DELTAD of Aj, that are both equal to the elevation of A,. If s0, use the two B points for linear interpolation, If not, go on to b. Starting with B;, consider, in order, up toa maximum df two B points for linear interpolation. Each B point so used must be within DELTAD of Aj. Cycle until all A points and all B points are exhausted. (ii) ) &) ™ If ISDPTS calculates erroneous points and these prove objectionable when plotted, they may be corrected as follows. Run I3DPTS'a second time, specifying a Hollerith format in the argument list. A complete skeleton~array data deck will be punched, and the point coordinates in error ean be readily corrected. Rerun the corrected deck, call~ ing ISDCVT, ISDPTA, and I3D1GL. I3DPTS ‘presents one general approach to the problem of calculating additional data lines. Other algorithms may prove equally or better suited your particular application. The 13D subroutines are structured so that substitution of one or several other subroutines as needed should be fairly simple and straightforward . ‘A. JOB CARD with possible file combinations. See Figure 6 also. (1) PROGRAM MAIN (QUTPUT, TAPESI, TAPE82) For use when basic point data to be read ore contai from I3DCVT, and I3DPTA will be called next from the current calculated skeleton point array logical records are to be written onto magnetic tape for later use. (2) PROGRAM MAIN (INPUT, OUTPUT, TAPESI=INPUT, TAPE82) For use when basic point data to be read cre contained in file INPUT, that is when a binary card deck is to be read. (2) PROGRAM MAIN ([igpoq | OUTPUT, TAPES! 5 PUNCHB,, ff APEat-iNruT] 1» TAPEB2= PUNCHB) For use when the skeleton point array eal~ culated by I3DPTS is to be output as punched binary cards, one logical record per grid (4) PROGRAM MAIN ((ixjpu7 |» OUTPUT punch [TAPES ) TAPES1=INPUT For use when the skeleton be output as punched Hollerith cards, according to the format specified in the CALL I3DPTS argument list. Terminating each set of cards whi dinate-pairs of all points on a single grid line is a blank card. (6) PROGRAM MAIN ([ixppq |» OUTPUT, PUNCH, PUNCHB Tapes ‘APES! nour] a .d on TAPEB1, generally direct jin program, or the int array is to contains the coor~ 2 TAPE82=PUNCHB) For use as number 4, but in addition at the end a binary logical record is punched, each word of which contains the number of points on a single grid line. Program specifications. RSPECS (1), (6) ISPECS (1-4) FORTRAN calling sequence. ‘HPNCHOT CALL ISDPTS (BUFI, LNGTHB, 7 (esnonoue p [sancenct) FMT, NUMPTC LINGTHB must be set > 4+ISPECS(1) + ISPECS(2) “+ Be SPECS (3) ISPECS(4) The punch parameter, which must be either SHNOPNCH or 6HPNCHOT, determines whether or not a binory record, the array NUMPT, will be punched, each word of which, in order, contains the number of points on single skeleton grid line. Word in the array corresponds to gi 1, and so on. There are four possible situa~ tions which may arise. (1) 130PTA will be called from the same main program. No data binary cards are to be punched and the punch parameter chosen must be HNOPNCH. (2) I3DPTA will not be called now, and the data logical records are to be stored on magnetic tape equivalenced to file TAPE82. Choose 6HPNCHOT as the punch parameter; the array NUMPT will be written as the last record on the tape. For later entry into IS3DPTA, this record must be read from tope into the work array BUFI at location SA3 prior to calling the subroutine. (8) 13DPTA will not be called now, TAPES? is equivalenced to PUNCHB in the JOB CARD, and data logical records are to be punched. Choose 6HPNCHOT as the punch parameter; the NUMPT array will be punched as the last logical record. Note that, for later entry into ISDPTA, this last record must be placed first and a single READ executed prior to calling the subroutine, to place the record into the work array BUFI begin~ ning at location SA3. (4) Hollerith skeleton~array data cards are to be punched according to the format speci~ fied in the subroutine argument list. (a) If NUMPT array is desired (note that it is not necessary for entry into I3DCVT), specify 6HPNCHOT. The record is written in binary at the end of the Hollerith deck. If NUMPT array is not desired, specify 6HNOPNCH. (b) The format parameter must be either SHNOHOLP or @ comb ‘of FMT and NUMPTC in the order given. If HHNOHOLP is specified, then no Hollerith data cards are punched. If a Hollerith format is given (see the section on FORTRAN calling sequence of I3DCHK for explanetion), then each grid=line logical record is punched in Hollerith mode on cards, with a blank card separating re~ cords. Note that all EOR punches must be added afterwards. A word of caution: Hol~ lerith output is punched with the decimal point included, so be certain to include the decimal point in the format declaration. Example: the number 32500. can be read in under format F5.0, but must be punched un~ der format F6.0. D. Other information required. If data point logical records are on binary cards or magnetic tape, and I3DCVT has not been called from this main program, then part of the work array BUFI must be filled with the array NUMPT as punched on cards or written fon magnetic tape from I3DCVT._ Location AA] within BUFI is equal to 4» ISPECS(1) +1. (@) If the data are on binary cards, toke the last logical record punched from |3DCVT and place it first in the data deck. NUMPT must be read into the work array BUFI beginning at location AAI, prior to calling ISDPTS. Because ISPECS(2) is, cand must be, greater than the number of basic grid lines, the words in this first logical record must be spaced in BUF accordingly. An example will make this clear. Example: Number of basic grid lines = 101 ISPECS(2) = final number of grid lines = 301 (ISPECS(3)=2) and say ISPECS(1) = 200 READ (81) (BUFI(I), 1=801, 1101, 3) CALL ISDPTS (BUFI, LNGTHB, . . (0) If the data are on magnetic tape, the procedure is identical except NUMPT will be read directly from the tape. Subroutine I3DPTA ISDPTA reads an array of data points on skele~ ton grid lines and calculates a final, or filled-out, orthogonal array of points suitable for direct input into I3DIGL. Points read are defined by two coor~ , wherecs points ISDPTA are defined by only one coordinate, elevation, because the other two may be calculated os needed. Linear interpolation is used to calculate final points. ‘A, JOB CARD with possible file combinations. (1) PROGRAM MAIN (OUTPUT, TAPES2, TAPES3) For use when skeleton point data to be read are contained on TAPES2, generally direct from ISDPTS, and |3D1GL will be called next from the current main program, or the calculated filled-out point array logical records are to be written onto magnetic tape for later use. (2) PROGRAM MAIN (INPUT, OUTPUT, TAPEB2=INPUT, TAPE83) For use when skeleton point data to be read are contained in file INPUT, that is when a binary card deck is to be read. |, ourrur, 1]. TAPESS= @) PROGRAM MAIN ((igpuT TAPES2 PON HBs LTAPES2=INPU PUNCHB) For use when the filled=out point array is to be output as punched binary cards, ‘one logical record per grid line. B. Program specifications. RSPECS(7) ISPECS(2), (4-5) C. FORTRAN calling sequence. CALL ISDPTA (BUFI, LNGTHB) LNGTHB must be set>> 2+ ISPECS(4) + ISPECS(2) + ISPECS(5) y Dr ther information reared. ‘As in the case with ISDPTS, if data point log- ical records are contained in binary cards oF 13 magnetic tape, and ISDPTS or ISDCVT has not been called from this main program, then part of the work array BUF! beginning at lo~ cation 2+ ISPECS (4) + 1 must be filled with the complete array NUMPT as punched on cards or written on magnetic tope from ISDCVT or I3DPTS. The procedure is exact ly analogous to that described in section D. of ISDPTS, except that the NUMPT array is complete so that, in the example given, the READ statement should be READ (82) (BUFI(I), 1=801, 1101). EXAMPLES, Three examples are included to illustrate use of 13 subroutines. The callling programs show the parameters used, Subroutine listings are given with Examples 1 ond 2 (see Appendix). Example 1 illustrates use of ISDCHK. Errors were introduced into the first seven grid lines of a data deck to show the types of diagnostic messages printed, Figure 8 reproduces the printed output, ond Figure 9 is a listing of the complete data deck. Example 2 illustrates use of ISDCVT, I3DPTS, I3DPTA, and I3D1GL called from the same main program. Seventy-six basic grid lines of dota points SUBRCUTINE 130CHK NURTH COORD. OF FIRST PulNT ON NORTH COORD: OF LAST. Pull ON N S LINE 1s LINE IS MAXIMUM ALLOMABLE NUMBEX UF PCINTS PER NS LINE IS TF SUCCEEDING ELevaTiuNo DIFFER BY ROKE THAN THE NORTH COORD. UF icy LINE NUMBER 34 CARD CHECK ALSU THE ELEVATION CLOROINATEs FIRST PCINT ON Ne> LINE NUMSER 4 1S INCORRECT THE NORTH COORD. UF f-S Line NUMBER 54 CARD CHECK ALSU THe cLEVATION COCRCINATE, Ay poLNT 2+ POLNT were read in, containing a total of approximately 4500 (north, ‘elevation) points taken at breaks in slope. From these initial points, 121,102. final points were calculated using IS3DPTS and I3DPTA, ‘and these points were transformed into the isometric diagram shown in Figure 10, by 13D1GL. Exe times (central processor) for the various subroutines ore: 13DCVT 3.9 seconds I3DPTS 4.4 seconds 13DPTA 13.3 seconds I3D1GL 61.0 seconds The plotted surface resembles the actual surface, and elevation variations of only a few feet (at this scale) can be seen easily. Attention is drawn to four east~ west streets in the southerly block. Example 3 (Appendix) illustrates use of I3D1GL lone in portraying a mathematical function. This particular function (ee the example main program isting) was chosen fo show the effect of sharp peaks in the data (Figure 11). I3DIGL execution time was 12.6 seconds. All examples were run on a Berkeley Computer Center CDC 6400 computer with disk storage unit. Plotting was done on a 31~inch CalComp plotter monitored by an 1BM 360/40. All plotter software were written at Berkeley. 32000-0000 22800..0000. 110 (67-0000, AN ERAUK MESSAGE 15 PRINTED 34 15 INCORRECT. Ly 1S INCORRECT. THe ELEVATION COOKDs UF n-S LINE AUKBER 5 CARD 2 POINT Ly 15 INCORRECT. Tie ELEVATION COOKUs UF Neo LINE NUMBER 54 CARD 34 POINT Ly 1S INCORRECT. Tae ELEVATION COORD. UF NS LINE NUMBER 5, CARD 3 POINT 24 15 INCORRECT. FOR NOS LINE NUMBER 6, No TEST I> Mave eLTHER CHECK THE FLAG ELEVATION CR THE PRECEEDING POINT ELEVATION 1s HISPUNCHEU. LAST IRFUT CINE NORTH COORDINATE. THE NORTH COORD. UF eS LINE NUMBER Ty CARE ChECK ALSO THE ELEVATION COORDINATE. 21 POINT 4, 1S INCORRECT. WAST PCINT ON NeS LIME NUMBER TIS INCCRRECT. NUMBER OF BASIC GAIU Lines = 26 NUMBER OF EASIC Galy PUINTS = 245 Figure 8.~ Printed output from I3DCHK, using data given in Figure 9. 4 32000 32000 32618 32000 32577 32477 32000 32000 32540 32000 32456 32000 32359 32000 32300 32000 32261 32000 32344 32000 32296 32000 32300 32000 32258 32000 32281 32000 32279 32000 32278 32730 32000 32339 32000 32359 32000 32357 32000 32340 32000 32322 32000 32300 32000 32280 32000 32482 32000 32558 32000 32613 Figure 9.~ Listing of data used for Example 1. 575032059 574532045 3633 574032039 360032750 '360032604 373532016 573032069, 576732600 572032048 556732520 571532071 556732420 570532033, 536732360 568032050 556732317 568032041 556732430 569032040 556732338 569532080 553332377 567532032 556732290 565532065, 553332340 564532058 553332338 564032037 553332338 546732760 563532016 553332360 563332050 550032435 363332039 550032430 563332022 550032431 563332018 550032439 563332010 550032440 363332008 550032459 363332018 550032540 562832016. 550032700 562832018 550032670 577032141 577032130 32800 576530180 560032800 560032640 576032090 571532121 556732800 570032150 556732800, 568032130 356732750 568032115, 356732684 569032106 556732655, 569032096 553332561 568032090 553332420 564532091 553332614 565532069 553332355 563832067 553332370 563532060 553332370 963532041 553332361 550032800 563332070 550032442 563332068 550032440 563332050 550032436 563332035, 550032453. 563332025 550032442 563332021 550032466 563332018 550032483 560032066 546732593 560032064 550032737 560032062 553332760 576032220 575632200 3633 575032180 5600 556732800 573032152 568032180 5567 566032179 5567 566032152 556732700 565732135 556732723 365332123, 556732700 365032117 553332601 564732104 553332660 563332121 550032760 564032080 553332379 563332106 550032590 563332091 550032500 563332082 550032451 5500 563332081 550032450 560032120 548532463, 560032102 549032459 5360032088 548032460 560032080 549632458 560032072 546732692 560032070 546732650 560032088 546732647 560032083 553332800 560032083 553332790 574032360 573439300 572032269 5567 570032210 566532208 363332240 563332200 5567 563332174 553332782 563332159 353332800 363332147 553332700 563332134 553332727 563332139 550032786 563332118 550032800 5363332120 550032800 563332109 550032558 563332100 550032478 560032130 547532478 5360032139 546732779 ‘560032120 547132463, 560032114 546732748 5360032101 546732726 560032093 546732728 560032089 546732695 556732157 550032742 556732160 5533 556732180 556732800 15 572032479 571532370 5369032338 568032240 563332311 563332260 363332208 563332208 553332800 563332180 5533 5363332163 553332800 563332150 553332800 560032178 553332800 563332130 5500 560032156 5500 560032143 546732630 560032141 547032482 560032156 346732761 5356732250 546732800 556732242 546732770 356732222 5346732780 556732190 546732769 556732162 550032800 556732157 550032779 556732186 550032781 556732200 556732220 5567 570032598 570332443 366232406 566232280 563332374 360332290 361232242 5362532212 5544 563032186 5360032210 5533 560032191 5533 560032200 5533 560032162 560032180 560032172 546732710 560032167 546732540 556732250 5346732782 956732279 5496 556732270 5346732800 556732249 5350032800 5356732220 550032800 556732198 5500 556732182 550032800 553332250 553332800 553332269 553332320 563332800 99999 567032520 99999 563332521 99999 99999 363332432 560032515 99999 5360032417 99999 360032323, 99999 360032270 99999 560032240 99999 560032237 99999 360032219 99999 556732266 99999 1560032192 99999 556732250 99999 556732250 550032800 99999 556732250 546732660 99999 556732280 550032800 99999 953332336 99999 553332322 550099999, 553332317 550099999 553332296 550099999 553332270 99999 953332251 552599999 553332278 553399999 553332290 99999 553332350 3035 3633 3633 3633 3600 3600 5367 3600 3600 3600 5567 5567 5567 5567 5567 5567 5500 5567 5467 5533 5500 5533 5533 5533 5533 5533, 5533 5500 5500 5500 9999999999 pupjuoy ‘ayng ‘ou 41d_uado Xojarpog ayy Jo Uolsod » Jo MOLA — "OL 9unBLy 16 *(6uy1s1] 298) uoryouny jooyoWsyou yo MLA —* || e1n614 7 REFERENCES Lobeck, A.K., 1924, Block diagrams: John Wiley & Sons, Inc., New York, 206 p. Rohlf, F.J., 1969, GRAFPAC, graphic output subroutines for the GE 635 computer: Kansas Geol. Survey Computer Contr. 36, 50 p. 18 APPENDIX Example 1 PROGRAM MAW (LWPUT/QUTPUTD CCHMON /WaPECa/ x>PELS(30) yISPECS (10) RSPECS (3) = 32000. RSPECS(B) = 32400. RSPECS (9) = of. ISPECS(L) = 110 ISPECS(8) = 1 CALL 130CHK (oy 8H(16F5409 4599596) STOP ENC SUBROUTINE 13U0HK (WP yFMTyEGR) COMMCN /WoPeLo/ K9PELS(30),ISPECS(10) COMMCN /TiMe/ tu REAL COURUNL G0) sLUURDZ(40) OIMENSION FMT (3) ,L0LK1(2)sLCTR2(2) EQUIVALENCE (KoPELS(3),START), (RSPECS(8),FINISH), (RSPELS(9) sELDL LFF), (1SPECS(1) wPULNT)y (SPECS (6) + 16) LOGICAL FRSTPT CATA TLBL /oHi3UCHKs CATA LOLRLUL) .vLKLC 2) LOIRZU1) pLCIRZ(Z) /3HN~Sy SHE~hy SHNURTH SHEA 1sts SUBRGUTING 13UCAK KEADS A BASIC GRID FCINT DATA DECK AND CHECKS. FOR GROSS EXKutS. [3DCHK MAKES CERTAIN THAT (1) EACH RECORD STARTS WITH #STAKT# CJUKDINATE AND ENDS WITH #FINISH#, (2) EACH NORTH (OR EAST) COOKUINATE UW A CERTAIN GRID LINE 1S GREATER THAN THE PRECEEDING COORDINATE Ju fre SAME LINE, (3) EACH GRID LINE ENDS WITH A SINGLE ECR ANO Te LAST Gkiv LINE ENOS WITH # COUBLE EOR, (4) THERE AKE NC MORE THaN #nPulwt# POINTS PER GRID LINE (A GOOD TEST FOR CATCHING MISSING Euk PUNCHES) + AND (5) EACH ELEVATIUN COORDINATE UN A CERTAIN GRID LINE 19 wiTHIN +/- #€LDIFF* OF ThE PRECEEDING ELEVATION ( A TEST TO Calo GkuSs ERRURS IN ELEVATICN PUNCHES). IF ERRUKS ARE FLUNO, APPKIPKIATE chROR MESSAGES ARE PRINTED. I3OCHK IGWUKES SLANKs ON CATA CARDS ANC USES VARIABLE CARD FORMAT, AS SPECIFicu BY USER. CALL SECOW (TUL PRINT 1 FORMAT (1H1y 4X, *3UsROUTINE I30CHK#/) & & INITIALIZE CUUNTERKS+ ICARD = NUMBER OF CARDS READ THIS GRID LINE. G IN = NUMBER UF THe PUINT ON THE CARO. NUMPT = NUMBER UF REAL « (NON-BLANK) PuiuTS iN THE GRIO LING. NUMTOT = TOTAL NUMBER OF DATA G PCINTS (EXCLUUANG FLAGS). IEAST = NUMEER OF THE GRIC LINE. © TEAST = 1 NUNTCT = ICAU = 1W = NUMPT = 0 FRSTPT = eTKUce 9 PRINT 4» LULKZ{ 10) sLUIRL (16) » START pLOIR2(16) sLDIRL( 16) pFINISHy LLDIRL (16) ynPuinT, cLul FF 4 FORMAT (LOX, Ad, * CUORD. CF FIRST PCINT ON *, A3y # LINE IS *, FL 12s4/10Xy AS, * CUURUe OF LAST PUIAT CK %, AB, * LINE IS #) F12.4/1 20Xy $MAXIMUM ALLUMADLE NUMBER OF POINTS PER *, A3, * LINE IS *, I5 3/10X» #1F SUCCEEUING ELEVATIONS CIFFER BY MORE THAN *, Fl2e¢, #) A 4N ERROR Hesoave 19 PRINTED*///) = ROUTINE Tu Cons ivek THE FIRST NCK-ZERC PUINT OF THE CARD. 5 READ FMTy (CUURDN CL), COURDZ(I) T=1)NPD TCARD = icaav + 1 IF (NOT. FROTPT) Gs TOT SIF (IN sit. wr Gu Tu 8 IN= 0 Gc To 5 €IN= IN@|L IF (CUORDNLIN) seve 06) GC TOD ROUTE OF THe FinST NJN-ZERO PCINT OF A GRID LINE IF (COOROMIN) sews START) GO TO 10 PRINT LL, wuiRilioly LEAST LL FORMAT (8X, ®FinSt PUINT CN #, Ay * LINE NUMBER #, 14, * 1S INCOR LRECT#/) 10 FRSTPT = sFALoce NUMPT = 1 PINS VE = Lusdun tind PTZSVE = Cuukvctind IF (IN seas WP) GU TUS INL = IN ¢ 1 Go To 12 THIS ROUTE, Laiu Has JUST BEEN READ, ELT PAST THE FIXST PUINT. INL = 1 NOTE THAT HeRey PINSAVE ETC CANNCT BE ZERO GR UNDEFINED. DG LCCP Tu PxJLko> BALANCE CF CARD. CO 13 [=IWLewe IF (COORUNII) seve 94) GO TC 13 NUMPT = NUMPT + 1 IF (COURDNIA1 «6Te PTNSVEI GU TO 15 PRINT 167 LUIK2( 101 ,L0IR1(16) LEAST» ICERDsE 16 FORMAT (BX, *1de #y Ady # CCOKDs CF #y A3y * LINE NUMBER *y I, *, 1 CARD #y LG, #y PUNT #) 12, 4» IS INCCRRECTo#/16X, *CHECK ALSO TH 2E ELEVATION GudnuiNal #/) 15 IF {ABS(Cuuaucia) - PTZSVE) «LE. ELOIFF) Gu TO 17 IF (1 EQ. WP Ane COORON(I) -E¢. EOR) GO TO 13 PRINT 1dy Luini(iods IEASTs ICARCy 1 18 FORMAT (8X) €Tde cLeVATICN CCCRO. OF *, A3y * LINE KUMBER *, 14, 1%, CARD %, 14, *, POINT fy 124 #y IS INCORRECT&#/) 17 PINSVE = CuukuN(i? PTZSVE = Cuuauctid 13 CCNTINUE c Co-- TESTS ON THe Last NUN-ZERC POINT GF ThE CARD. c IF (NUMPT «Les neuinT) GO TC 14 20 PRINT 194 LuiKl (16), LEAST sECR 19 FORMAT (8X) A3e # LINE NUMBER *, I4, * HAS TOO MANY POINTS, UR A * Ly Fl2e4y # PUNLH 15 MISSING. #/) 1A TF (CUORDNI VP) wu. COR) GU TO 5 NUMPT = NUMPT ~ 4 IF (PINSVe «Nee cURI GU TC 20 PRINT 21 r0iR1( Lo) sLEAST sLOIR2U1€) 21 FORMAT (8X4 Fuk *, A3y # LINE NUMBER 4, 14) *, EITHER THE FLAG EL LEVATIGN OX THE PkeLcEDING POINT ELEVATION IS HISPUNCHED.#/16Xx, *NO. 2 TEST IS Mase (U CHEEK LAST INPUT POINT *) ASy * CUGRDINATE.*/) Gc To 22 20 IF (PTNSVe seus FAWISHI GO TO 22 PRINT 23y LuIkL (ie), 1EAST 23 FORMAT (BX, #La5f PULNT ON %, A3y * LINE NUMBER *, 14, * 1S INCORK LECT. #/) 22 IF (CUORDLINP) seu. EOR) CO TO 24 ICARD = IW = 0 LEAST = Teast #1 FRSTPT = .TRUce NUMTOT = AUMTUT + WuMPT 6c To 5 24 NUMTOT = WuNTUI + NuAPT PRINT 254 Leasty wuMTOT 25 FORMAT (/axy S¥UMBen OF EASIC GRIC LINES = *, 14/8X, *NUMBER UF BA ASIC GRID PULNT> = % 16/0 CALL TYME (Tiau) RETURN ENO SUBROUTINE CYMc (TLL) COMMUN /TIME/ Tu TYME READS THe sY¥oTeMS CLOCK AND PRIATS GUT THE TIME SINCE THE FIRST CALL sels CALL SECOND (ad T = a-TO PRINT Ly Tidcai 1 FORMAT (//105Xy *TiMe IN 4) Ab, * =#, FB63/) RETURN END 2 Example 2 PROGRAM Maly (4NPUT, UUTPUT» TAPEG1»TAPEE2,TAPES3,TAPE99) DIMENSION SPev3 439) COMMUN BUFL (3316) COMMON /WoPcLo/ KoPELS(30),ISPECS (10) SPECS(L) = Le SPEC S42) SPEC S(3) SPECS(4) SPECS(5) SPECS(6) SPECS(7) SPEC S(8) SPECS(LL) SPECS (12) CALL PLIT30 (oPeus) ISPECS(L) = 119 ISPECS(2) = ial TSPECS(3) = 1 TSPECS(4) ISPEC3(5) ISPECS(9) ISPECS(7) ISPECS(3) ISPECS(9) ISPECSLLOD RSPECS(L) RSPECS(2) RSPECS(3) RSPECS(4) = 45905 RSPECSI5) = 0090. RSPECS(O) = 16/52 RSPECS(T) = oF RSPECS(10) = 4906 RSPECSULLI = 326 RSPECS(12) = de RSPECS(13) = 20 RSPECS(L4) RSPECS(15) RSPECSIL5) RSPECS(21) RSPECS(28) RSPECS(29) RSPECS(30) REWIND 81 REWIND 82 REWIND 83 CALL I3DCVE (bJF4y351848y8H(16F560) » 55999.» GHTAPEB 1» HNUPNCH D REWIND 81 CALL 130P1> (oJFi 1321.8, 6HNUPNCH ,6HNUHCLPD REWIND 82 CALL I3DPT4 (ovFiy 3218) BUFI (3205) = osFL(3206) = Le BUFI (3209) = 30000. BUFI (3210) = 33000. BUFI (3211) = 31200. 22 BUFI (3212) = 334206 BUFI (3213) = 33000. CALL I3D1UL (osr1 3918, SPECS) CALL GOSEND (9PeC9) stor END SUBROUTINE L3ULGL (3UFIyLNGTHB» SPECS) DIMENSION oJFL(1) ¢SPECS (30) CCNNGN /WsPeus/ KSPELS(30),ISPECS(10) CCHMON /TIME/TO CATA TLAL /SHiSuLUL/ EQUI VALENCE (19PEC9(5) 915) y (ISPECS(T 417) 4 ISPECS( 8) 418) 9 (LSPECSLZ Liszt I3D1GL MAPS A THKEE-DIMENSIGNAL SURFACE ~ A SINGLE-VALUED FUNCTIUN OF TWO VAKiAdLE> - INTO ISOMETRIC, CAVALIER, DIMETKIC, OK CABINET PICTORIAL iePKeSeNIALICNs CNE SET OF GRID LINES Id USED. CALL SECOND (Tu) Ll = 415 © 2eLTe18 + 17 + 18 + 3 4 MAXOCIT,18) + 2412 TE (LNGTHS 26be 11) GO TOL PRINT 2 2 FORMAT (6X,#LNeTHD AD SET BY USER IS TOO SMALL FOR SUBROUTINE 1301 1GLee) STOP Lanes.) N3 = N24 15 Ng = NB + 15 NS = NO +15 NO = NS + 17418 NT = NO + 17418 NO= AT + AT #1 NS = NB + 1a #1 NIO = NO #1 + MAXOLI7+I8) NLL = NLO + 12 CALL EXCLUL (GFL UL) + BUFI (NZ) ¢QUFI(NS) »BUFI (NG), BUFI(NS) -BUFI(NO) » LGUFE (NT) yBUFL (48) BUFT(ND) yBUFL(NLO) pBUFICNLL) sLNGTHBs SPECS) CALL TYME (TLBL) RETURN END SUBROUTING EXCLOL (PLOTZ»XPLOT + YPLCT sYPLSVE + BLOCK, BLOCKHsCEC #CNCy AUCH» BCTENDs TJPinus LNGTHB y SPECS) REAL PLOTLUL) sXPL ITLL)» YRLOT(L) » YPLSVE(1) ySLOCK( 1) »BLUCKH(L) + LCECCL) yCNCUL) pCHO Ly DOTEND (1) » TOPEND (1) pNSTARTs LABEL COMMON /WoPELa/ KOPCLS(30) pISPECS (10) EQUIVALENCE (1>PELS(O) 116) ) LCLSPECS (7) 9 7) 4 (4 9PELS(B) 918) pL TSPECS (5) 419) (ISPECS (10) 4110) EQUIVALENLE (x>PEUS(1) SL)» (RSPECS(2)sESTART) » (RSPECS (3) pNOTART) + LARSPECS (4) ov oTART) y (KSPECS(5) ¢VTOP) » (RSPECS (7 }¢PS) 4 (RSPECS(LO) » 2SCALE},(RoPecot LL) APX) » (RSPECS(12) APY) o(RSPECS(13) >GAMMA) BURSPECS( 14)» Poi Vike (RSPECS (15) p FRAME) » (RSPECS(16) TICKS) » 4 (RSPECS (21) ¢LASELI 41K SPECS(24) sVCATAP) y (RSPECS(25) » XFRSVE) + 5 (RSPECS( 20) oC 111) y (RSPECS (27) pCECLI1) y (RSPECS( 28} » PLSEP)y 6 (RSPECS (29) TL> cP) yl KSPECS (30) y ZFACTR) DIMENSION UNGu8 (4) 4 cCOK (4) SPECS (30) » XFRAME (4) » YF RAME (4) LOGICAL Evens SUUTH WEST »UU © Ust> CONVERT PSluddy TRUE LINE-UF-SIGHT, TC DUMMY PSI, WHICH DEPENDS c ALSU IN D1X=UTiun UF GRID LINES. © IF (116 seus 1) ou Tu 3 PSI = PSIUIa ~ 906 IF (PSE sot. 04) Gulu 4 PSI_= 300, + Pai Go To 4 3 PSI = PSlula DETERMINE >JJIH ANU WEST FOR USE IN IF STATEMENTS BELOW. 4 LF (PSI soks 90. wANe PSI LT. 2704) GO TO 66 SOUTH = FALSE. Gu To 67 66 SOUTH = .TkJee 67 IF (PSE sot. 130. sANDs PSI «LT. 360.1 GO TO 68 WEST = oFaLsee Go To 69 68 WEST = .Tkuee CONVERT GAMMA Anu Poi TO RADIAN MEASURE. CALCULATE ALPHA ANU ALPHAZ AS. FUNCTIONS UF Pal, GAMMAS 69 RGAMMA = GAMMAe.0174532525 IF (GAMMA ss Oo) KoAMMA = 00001 RPSI = 06 IF (PSI sus 06) KPS1 = 200001 IF (PST stds 906) RPST = 1.57081 IF (PSE scus 1600) RPSI = 3414161 IF (PSI sue 2706) RPST = 4471241 IF (RPSL stds Ded RP>T = PS1*.0174532525 ALPHAZ = aSLN((SAN(RPSID#S2 + TAN(RGARMAIE#2 ~ COS(RPSII®#2) /(204S LIN(RPSID#TAN(KGANMAD)) ALPHAL = ASLAC(TAN(RGAMMAD — SIN(RPSI)#SIN( ALPHA2) 1 /COS(RPSI II SET CONSTANTS Fux Use IN RESETTING #8LCCK#. Tee2 = 17*18 - 17 1883 = 17#18 + 1 Tee = 17 +1 16BJ = 2417 24 472 am ire 143 14s 150 144 154 155 SET VARIABLES FUR RESETTING #8LOCK® ACCORDING TU QUAUKANT OF PSI. IF (PSL soke 9s aus PSI LT. 1806) GC TO 170 IF (PSL ote 1306 eANDs PST eLT. 2706) GU TO 171 IF (PSI sot. 270. AND. PST «LT. 3606) Gu TO 172 IF (116 seus 2) eT ALPHAL = 3414139205 - ALPHAL ALPHA2 = 3.141>¥205 + ALPHAZ IF (116 sede 2) Gu TUT Ip = [834 Tel = -1 IBJMP = IdoJ Go To 173 18 el = 1 1auMP = 0 Go To 173 ALPHAL = ~ALP4aL ALPHA2 = ~aLPaad IF (116 sus 2) 04d ALPHAL = 4.i41o¥c05 + ALPHAL ALPHA2 = 3414129203 - ALPHAZ If (116 swe 2) va Tu 5 18 = 1882 el = 1 IBJMP = -ibay Go Tu 173 18 = 13B3 Ie. = =-1 TRUMP = 0 REORDER Cees Une Ho WECESSARY, 1a = 18 +1 IF (SuUTH) vu fu 143 IF (PSI sues 200+ ADs PSI LT. 3606) GU TO 144 Gc TO 145 00 149 [=1yLeL Id = I8l- 1 ea CHULA) = ened o 150 I=1yiel NCCI) = eta) IF (PSI suoce 130+ eANDe PSL eT. 2704) GO TO 146 GO TO 145 00 154 I=Lrisve TH = 1884-1 ¢ 1 CHUTH) = vec) DC 155 I=L+le4 CECT) = CHL) DEFINE SIv AND u> VARIABLES FUR USE LATER. SALPH2 = sIV(ALPHAZ) SALPHL = S1W(aLPHAL) CALPH2 = COSALPHAZ) CALPHL = COstaLPHal) REORDER ELucK AND PLACE INTC BLUCKH LSING VARIABLES SET PRIDK. © rc « c © G ¢ BLOCKH(L) ditt KeFeR TO THE DIAGRAM AT THE APEX, ETC. oe = 0 178 = I7#18 009 T=Lyifs 1B = 1B + dol ICE = IDE +1 IF (1UE at. 47) vu TO 10 IDE = 0 18 = 18 + 18H BLOCKH(T) = BLILKG io) CONT INUE INITIALT Ze 9YofeM avy CALCULATE EQUATICN CONSTANTS Tu BE USED IN MAIN DO LuuPS cc sne Il = 1942 19m = 19 - 1 EVEN = .FaLsce 110M = [10 - 1 fol = 1-110 CNCLLL = Une (Ld CECLLL = cecal) C= (VTOP-vaT ast) #crACTR/SCALE FEW = C/(CALPH2*TAN(ALPHAL) # SALPH2) * TLSEP HNS = C/(CALPHL#IAN(ALPHAZ) # SALPHLI ¢ PLSEP XHEW = CACPAZ#4En YhEW = SALP42#neW XHNS = CALPAL #49 YHNS = SALP4L#dW> XPART = CALPHL#P9/ aU ALE YPART = SALPHI#PS/ SALE XLINEP = oU#UaLPH2/3CALE YLINEP = aL em en2/oCALE XFRSVE = 1090. Ig = 0 IBCNT = 0 MAIN DU LuuPs Tu PRILESS ONE BLOCK DIAGRAM AT A TIMES OC 11 NI = Lyis 0G 12 WNL = Lyi? REWIND 83 Ie = 18 +1 IF (BLOCKH(i9) awee 1+) GO TO 12 TBCNT = [gent ¢ 1 CALCULATE C¥LUK KU LECUR ARRAYS FROM CURRENT CNC, CEC VALUES. CNCOR(L) = enUsKiG) = CNCONID NIL = NI +1 CNCOR(Z) = UNLIKI3) = CNCUNILD CECOR(L) = Secaki2) = CECINNL) NN2 = NNL #1 CECOR(3) = LELUKI4) = CECINN2) DETERMINE NJMBcKS UF FIRST PRIOR AND LAST NEEVED GRID LINES, INDEPENDENT JF Lines TO BE SKIPPED. IF (116 seus 1) wy Tu 13 26 TPL X((2 ST ART~C2LOR (10) /SL) ILAST = IFAX((ZaTART-CECOR(4ID/3L) + 1 6c Ta 14 13 IN = TFL X((CeCUK(L)~e START) /SL) LAST = [FIX ((ceUKU¢)-ESTARTI/SLI # 1 DETERMINE Finot (veAkEST TO VIEWER) ANC LAST NEEDED GRID LINE ARRAY SUBSCRIPT3+ iWJePenJENT OF POINTS TO BE SKIPPED. 14 [BGT = TFAX((NCUK(LI-NSTARTI/PS) + 1 1TOP = TFLX((CWCURK(ZI-NSTART)/PS) #1 1eoTTP = ibut + 1TuP CALCULATE o4ALceaT AND LARGEST ARRAY SUBSCRIPTS, IMIN AND LMAKe IF (SOUTH) Gu Tu 156 IMIN = [BUT IMAX = ITP 6c To 159 158 IMIN = ITuP Tmax = [UT SKIP FURWAKI (4nJUG4 FIRST #IN¢ GRID LINE AKKAYS TU GET TU FIRST NEEDED UNey LUAKESPUWDING TC DIAGRAM NEAR EDGES. 159 IF CIN seus 0) vu TU 44 00 112 T=Letw 112 READ (83) CALCULATE AND LNITJALIZE VARIABLES FOR USE IN HIDDEN LINE TEST. INITIALI Ze VARiAsLes TU CORRECT VIEW-LINE DKIFT FALTURS 44 SLI9 = SL¥L9 PSILO = Py¥ilo U= SLI9#CALPRe/CALPRL VEL = U/PSL10 = FLIATCINT(U/PSI100) LF (UDEL «Lz 245) 5u TO 45 ISHIFT = 4108(1 NI (U/PSILO) #1) IONE = ~110 UD = 160 = duce GO To 46 45 ISHIFT = 119¥iNT(U/PST10) ICNE = 110 uD = uDeL 46 UTEST = 0.5 UCUM = 0. UU = .FALoEe c (C--- CALCULATE VARiaoLes WHICH VARY CALY BETWEEN BLOCKS. © NM = NNL = 1 XAPEX = APX # NMKHEW + AES(CEC(ANL) ~ CEC(LIISCALPH2 /SCALE - (NI 1 = L)*XHNS - ABSCOASENT) = CNCCLIDECALPHL /SCALE YAPEX = APY® WA#YHLA # ABS(CEC(NNL) = CEC(1)I9SALPH2 /SCALE + (NI LI*YHNS + avs (LaCiNI) = CNC(LII*SALPRL /SCALE 1 SET OC LOUP RaNuE. IF (WEST) GU TJ 130 IM = IN 1 7 coe Go To 157 156 INL = ILAsT ILAST = In #2 = OUTER DU WOUP - PhueSS ALL GRID LINES, UNE AT A TIME. 157 DO 47 I1=inlyluast oly READ (83) (Puoicli)yT=1yI¥AX) IF (WEST) vu Tu 10d IF (19 eBay. 4) Gu Tu 162 oc 17 17 READ (83) GO Tu 162 160 00 16 I=1+i¥1 16 BACK SPACE 43 162 NCOUNT = 4191 TEST FOR S€21JJ> Vicw-LINE CRIFT, ANC CORRECT IF NECESSARY. IF (UCUM 46. Utes) GO To 70 IF (W0Ts Us) ou Tu 71 ISHLFT = LodiFT = LuWE UL = sFALsee Go to 71 TO UTEST = UlesT + 140 UL = .TRUEe ISHIFT = i34ake * Luwe UCUM = UCUM # Ju CALCULATE VAniaoLed AND SET LINE PLOT DIRECTIUN (FORWARD OX KEVEKSE)« X2X = XAPEX + (LL~iNL)#XLINEP Y2Y = YAPEX # (Ai-INLI*YLINEP IF (NOT. evew) Gu Tu 137 EVEN = .FaLs SPECS(14) = sPevot1a) = -FLOAT(I10) Go TO 138 137 EVEN = .TaUce SPECS(L4) = oPEvo(1>) = FLOAT(I10) 138 IF (II Eve Ink suxe ISHIFT 40. 0) GC TO 64 YPLOT(LMIn) = Y2¥ * (PLOTZ(IBUT) ~ VSTART)*ZFACTR/SCALE YYL = (YPLUT CiMn) = YPLSVE (TOT) 1/1 SHIFT INNER DO LOJP - PRULESS ALL PCINTS ON A GRID LINE, CNE POINT AT & Ties TEST FOR H1QUeW PUINTS AND CUNSTRUCT TFE CURRENT VISIBILITY (HURIZUN} LINE. ORAW Vioidue LINE SEGMENTS AS NEEUED. CO 48 INDEX=4muNy 1MAx 4110 IF (EVEN) ALL = LnveX IF (.NOTs evend 141 IF (SCUTH) Gu Tu lie [REV = TLL ISH = IREV - 1sHiFT 6C To 177 176 IREV = [BuITP - Lik ISH = IREV + IsHiFT 177 XPLOTCIIT) = x2X ~ APART#CILI-IMIND YPLOT(II1) = YZ¥ # YPART#(LII-IMIND + (PLOTZ(IREV) ~ VSTART)*ZFACT AR/SC ALE IF (II Eas iwi) Gu TO 50 IgotTP - INDEX 28

You might also like