An algorithm for hidden line ruled surface display using microprocessor

An algorithm for hidden line ruled surface display using microprocessor

Coraput. & Graphics Vol 6. No. 4, pp 141-157, 1982 Prinled in Greal Britain 1~9"-8493/82/04(1141-1750300/11 ~ 1082 Pergamon Pres~ t.~d AN ALGORITHM ...

626KB Sizes 2 Downloads 92 Views

Coraput. & Graphics Vol 6. No. 4, pp 141-157, 1982 Prinled in Greal Britain

1~9"-8493/82/04(1141-1750300/11 ~ 1082 Pergamon Pres~ t.~d

AN ALGORITHM FOR HIDDEN LINE RULED SURFACE DISPLAY USING MICROPROCESSOR M. PERIASAMY÷ Tata Institute of Fundamental Research, Bombay, India and D. K. RAVINDRA Raman Research Institute, Bangatore, India

(Received 9 July 1982) Abstract--A simple algorithm for hidden line Ruled Surface graphics, typically used in Radio Astronomy is discussed using low cost microcomputersystem built around Motorola6800 processor and Matrox 256**2 graphics module of raster size 256 × 256 points. Resolutionof the plot can be improvedby displayingon a biggerraster like 1024 x 1024 points. l. INTRODUCTION 1.1 In radio astronomy it is often necessary to display brightness distribution map of the sky with Right Ascension and declination as its coordinates. When the graphic technique is used for the above astrophysical interest, the methods chosen to present the data in pictorial form should have an important effect on the speed and efficacy with which the astronomer can extract the useful information.

1.6 If the SIN ratio per beam is only of order unity, extended sources remains invisible to the eye on ruled surface plots. Grey scale displays are better for detecting such features. The display is however generally not very adequate quantitatively. It also requires arbitrary zero level shifts in order to represent negative intensities. 1.7 Pseudo-colour display offers a method for obtaining higher dynamic range in the final representation than is possible with grey displays. Successive contours can be assigned colours which cycle through the spectrum effectively providing a high contrast display at every contour level. Furthermore, negative intensities can also easily be distinguished by making a judicious choice of intensity level colour coding around the zero level. But the visual impression created by a pseudo-coiour image sometimes be too strong, such as when large areas of pictures are filled with bright saturated colours.

1.2 The various displays used are: (i) Contour display: (ii) Ruled Surface display; (iii) Grey display; and (iv) Pseudo colour display. 1.3 In contour display diagrams have the great advantages of providing a method for quantitative display. But contour plots of high resolution images give a poor visual impression. By reducing the number of levels, the visual impression can be improved, but it results in a loss of information. 1.4 Ruled surface display provides a reasonable visual impression for high contrast features such as discrete sources and bright (SIN < 10) extended region. It is essential that the "hidden lines" be deleted from the display. Otherwise the impression of viewing a solid surface and the picture dissolves into a jumble of wiggly lines. An important shortcoming is that weaker features of objects can literally be hidden behind stronger ones. 1.5 Difficulties with contour and ruled surface display begin to appear when the area to be represented covers many telescope beams (103 or more). In this, grey shading and the use of colour can indeed be useful. tFormerly at: Raman Research Institute, Bangalore,India.

1.8 When the area to be displayed contains only a moderate number of telescope beams (10'-103), the traditional representations as contour and ruled surface maps are generally adequate. A scheme for implementing Ruled Surface Display is discussed in the present paper. 2. HARDWARE

2.1 The block diagram of the display processor for the ruled surface display is shown in Fig. 1. 2,2. Display controller 2.2.1. MEK 6800 D2 micro computer kit with key board from M/s. Motorola. U.S.A. is used as the display controller. 6800 Microprocessor (p,p) is an 8 bit parallel processor with addressing capabilities of up to 65.536 words. Basically the jzp is having 72 executable instructions which can be used in different address modes. 141

42

M. PER[ASAMYand D. K. RA~'INDRA GRAPHIC MEMORY

VIOEO

RAM

T V MONITOR GENERATOR

MODULE

MT X 2 4 8 0

ECIL TM 9 5 6

MTX 2 5 6

MICRO COMPUTER MEK 6 8 0 0 I

Fig. I. Block diagram at the system.

Level

0 Level

5

(b)

(o)

Level

8 Level

(C}

(d)

//•

W MIAM

ME A

V,

Ml___r R

/,



\ \1S

//

.o

¢(

i

) E

I I I I I I

4 Level f o l l o w s 4 level

(e)

U T Level follows 4 level

(f)

Fig. 2.

8 A F 4 Level fOHO,aS 8l evel (g)

An algorithmfor hidden line ruled surface display 2.3 Display generators 2.3.1. The MATROX MTX 2480 Video Random Access Memory (VRAM) is a CRT controller designed for use in systems that require display of alphanumeric data. 2.3.2. The MATROX 256**2 is a graphic generator which looks like a 4 location by 8 bit random access memory on the input side and gives composite video signals in the output which directly drives CRT monitors to provide a 256× 256 dot raster with the facility of moving the cursor in nine directions. 2.4 Both the VRAM and graphic card are interfaced with the microcomputer and the video signal of VRAM is tied with graphic card to provide a fully graphic/alphanumeric display. 3. SOFTWAREDEVELOPMENT 3.1 Before discussing the software implementation the representation of individual plots in Ruled Surface is discussed briefly. The individual data point is represented by both vertical lines and 45° lines (Fig. 2). The individual level is differentiated from other level by its height. But the height of the plot is doubled (scaled) to have more resolution and also to plot odd level data points. The width of individual plot is constant for all levels. It is fixed to 4 dots. For example, in a 256 × 256 dots display, a 8 level plot is represented by 14 vertical dots (up), two 45° dots (up and down) and 14 vertical (down) dots (Fig. 2d). The 45o lines will be same for all the levels while the vertical lines will he varying according to the level of data points. Figure 2 shows the plot for some levels. 3.2 While developing software for the Ruled Surface Display, the following points have to be considered. 3.2.1. The data points can be at any level (intensity) which is not having order. Any level can occur at a place. The individual level should be differentiated from the other level. This can be achieved by representing different levels with different heights as mentioned previously. 3.2.2. If the data points belong to zeroth level and if the higher level data points occur in few places (not continuously) then the plot is simple. 3.2.3. If the data points having the same level occur successively the plot should be different as in Fig. 2(e). 3.2.4. If the lower level and higher level data points occur successively or vice versa the plot should be taken care of as shown in Fig. 2f and Fig. 2g. 3.2.5. The column counter and row counter (raster area) should be set accordingly to the numbers of data points to be plotted in a single row and number of rows respectively. 3.2.6. The line lying inside the higher level plot should be deleted immediately after the higher level plot is done in order to view a 3D information unambiguously. 3.2.7. By considering the above factors, the software is developed to fulfill the requirements. The algorithm can be analysed with the help of flow charts and Fig. 2

143

I

/ \~.@ / Fig. 3. The number shows the peak level.

and 3. The flow chart FC1 gives the complete schematic for the ruled surface display while FC 2, 3 and 4 give expansion of the subroutines titled MIAM, MEA, MIT, MR and DELETE. The first two blocks of the main flow chart FC 1 are for initialization, fixing raster area and skewing. If the first data is zero, the subroutine 'HAl' plots four horizontal dots to represent the zero level. Otherwise subroutine 'MR' is executed. The availability of raster area is checked after plotting every data point and proceeds normally to get the next data point if the raster area is available, otherwise the program ends. 4. DETAILSOFSUBROUTINES 4.1 Subroutine 'MR' 4.1.1. This routine takes care of plotting all the higher level data points other than zero. It is important to fix the peak of individual plot where the corresponding data point occurs, i.e. the peak of current plot should occur where the previous plot ends. To do so, the cursor is moved back twice, since the width of plot is 4 dots. 4.1.2. If the data point belongs to one level, the plot is represented only by 45° dots, two upwards and two downwards, because the height of one level plot is just two dots (Fig. 2b) Both vertical and 450 lines are required to plot data exceeding one level, so the routine checks the vertical line counter which is present with a number depending upon the level of the data point. The number is calculated as shown below: Number of Vertical dots Total height _ height of (height of Vertical = of plot 450 line. line) The total height of plot is twice the level of data point. The height of 45° line is always fixed to two dots, since the width of plot is always four dots. So, height of Vertical = 2(level of data print)- 2 -line (dots) For example, the height of 10 level data point is 18 dots. 4.1.3. By following the above rules, the routine plots vertical line (up), 45° line (up), 45° line (down) and

144

M. PERIASAMYand D. K. RAVINDRA

START)

t

t

INITIALISE 1

OATA LOCATtON

t

= ~ASTER LOCATIONI SET ~O* COUNTER I

-

I

SKEWING SET COLLIMN COUNTER. l GET DATA I

NO Ib

I ZERO LEVEL PLOT {HAl}

I OTHERLEVEL I PLOTS(MR)

I

-

NO

@." .'° I"'i

l''TI

m,

A

t Flow chart 1.

vertical line (down). The subroutine 'DELETE' explained later, is executed immediately after the higher level plot to delete the inner lines of the higher level plot. 4.1.4. After checking the raster area availability, the next data is picked up and checked for zero. If it is zero, it follows the routine 'HAl' as explained earlier, otherwise the current data point is compared with the previous data point. If both data points are in the same level, the subroutine 'MIT' is executed. If the current data point is greater than the previous one, the subroutine 'MIAM' is executed, otherwise the subroutine 'MEA' is performed. After executing any one of these

routines, the subroutine 'DELETE' is called, the availability of raster area is checked up and the program continues. 4.2 Subroutine ' MIT" 4.2.1. Figure 2(e) shows the plot of two consecutive data points of same level while the flow chart FC (3b) shows the flow of this subroutine. This routine is called to plot the second data point of the two consecutive data points of the same level. To fix the peak of this plot at the right place, the cursor is moved back twice as mentioned earlier. As shown in Fig. 2(e), the vertical (up) and

An algorithm for hidden line ruled surface display

SET COUNTERSFOR NECESSARYPLOTS

I

MOVECURSOR TWICE

I

MOVECURSOR~I 2(prelevel)_2TlMES

I PLO,VER''O'LL' I 2 (C?. levOI)-i 2 (pre)eVql,I)--2 TIMES/

i

PLOT F TWICE PLOT ~ TWICE

I 2(¢? tllvel)-PLOT2 TIMES

Flow chart 2.

the first dot of 45 ° line (up) (dotted line) should not be visible to have 3D view. So the routine pulls the cursor above vertically without any intensity. The height of the vertical line (up) is calculated by the same logic given before which is (2 current level-2) dots. 4.2.2. In the 45° line (up) plot, the routine leaves the first dot blank and plots the second dot. The rest of the plot is the 45 ° line (down) and vertical line (down). The above formula holds good for the height of vertical line (down) also. The vertical line (down) and the second dot 45 c line (down) of the previous data point should be wiped out to have 3D effect which is done by the 'DELETE' subroutine. 4.3 Subroutine 'MIAM' 4.3.1. When the current data point is greater than the previous one, this routine (FC 2) is executed. Figure (2f) shows the plot of higher level data point following the lower level data point. The previous plot ends at the point 'T' (Fig. 2f). To fix the peak of this current plot at the point 'W', the cursor is moved back two points to 'U' and it starts plotting. In the vertical line (up), 'UV', the first portion ' UR" should not be visible, so the cursor is drawn blank up to 'R'. The length of 'UR' is equal to

145

twice the previous level. The second portion of vertical line 'RV' is intensly plotted. The length of RV is given by (2(current level)---2(previous level)---2)) dots. The vertical line (down) is plotted to the height of two short to twice the current level. The inner lines RS & ST are deleted by the 'DELETE' routine. 4.4 Subroutine ' MEA' 4.4.1. When the current data point is less than the previous data point, the program jumps to this routine FC 3(a). As usual the peak of the plot should be fixed at the end of the previous plot. So the cursor is moved back to the position 'B' from 'A' (Fig. 2g). The vertical line (up) 'BC" and the 45 o line (up) 'CD' should not be present. So the cursor is drawn blank up to that point. The length of line 'BC' is equal to two short to twice the current level. The 45 ° line (down) 'DE' and vertical line (down) 'EF' are intensity plotted. The length of vertical line (down) is equal to the vertical line (up). The 'DELETE' routines wipes out the line 'AD'. 4.5 'DELETE' 4.5 1. This subroutine is used to delete the inner lines of higher level plots. This should be executed every time immediately after the higher level plot irrespective of the presence of inner lines. Since the width of individual plot is fixed to four dots, the inner lines of higher level plot lie only on the columns with various heights. If the cursor is drawn blank inside the higher level plot with some order, the inner lines can be deleted out. A four level plot and the movement of cursor inside the plot is shown in Fig. 4. The flow chart FC 4(b) helps to study the flow of routine. 4.5.2. At the end of higher level plot, the cursor is left at the point Z. The cursor is moved back once and so on as shown in Fig. 4. The line PQ and UV are having the same length, whereas the length of centre line ST is more than PQ by one dot. The routine takes care of this height variation and deletes the inner lines. After deleting, the cursor is pulled back to position 'Z', where it was at the beginning of this routine. The 'Return from subroutine' statement puts the main program into further action. 4.6 A plot of different data points given inside parentheses in a row is shown in Fig. 3.

i o

s

p

Fig. 4. Delete scheme.

46

M. PERIASAMYand D. K. RAVINDRA

MIT

MEA

I SET COUNTER FOR I NECESSARY PLOTS

f SET COUNTERS I

I

MOVE CURSOR TWICE

MOVE TWICCURSOR E"q"-" I

+

f

.eve oo~o~, I

MOVE CURSOR ~(ct. level)--2TIMES

2( Ct, level)--2 TIMES

f

MOVE CURSOR,,4 TWICE

MOVEoNcECU RSOR'4 1

PLOT ~ TWICE

PLOT / ONCE 1 PLOT ~ TVRCE

+

PLOT 2(c t. level ) - - 2

f TI

PLOT 1~ ME4 2 (¢?. level) --2 TI

MES

Flow chart 3.

An algorithm for hidden line ruled surface display

147

DELETE~

+ SET COUNTERS FOR I NECESSARY PLOTS

+

I

WI • W 2 = 2

I

l

I

I

H = 2 Col Ilvll) --2 4

MOVE CURSOR ONCE 1

MOVE CURSOR TWICE]

MOVE CURSOR H TIMES

,o

t

s

MOVE CURSOR ~ I H TIMES

H=H+I

I PLOT VERTICAL LiNE ~' 2 ct level)--2 TIMES. J

+

NO

PLOT 45 ° LINE ,4 (UP) T,WICE

MOVE CURSOR •,i--- ONCE

MOVE CURSOR ~' I H TIMES

PLOT 45 ° LINE ~ (DOWN) TWICE

I

MOVE CURSOR H T,MES

H=H--i

J

NO

2(et

level)--2 TIMES

I MOVE CURSOR TO I WHERE IT STARTS

Flow chart 4.

M. PERIASAMYand D. K. RAVINDRA

148

4.7 Complete listing of the programme along with the comments is given in the Appendix.

5. CONCLUSION

5.1 Since the movement of hardware cursor is limited to 45 ° steps, the resolution of display depends mainly on the raster size. The individual plot can be represented either by 45° line alone or by both vertical and 45 ° line. If the plot is of 45 ° line alone, it takes more raster area for individual plot, because the width of plot also varies with the level of individual data point. Also, if we are interested in displaying all the data points, the peak of individual plot should be fixed in such a way the weaker data points are not merged with the stronger. But the disadvantage is that there is position distortion, i.e. the data point cannot be displayed where it occurs since the width of the plot for each data point depends on its level. So it is decided to plot with both vertical and 45° lines by keeping the width constant for all levels. This display avoids the position distortion as well as it saves raster area. So it is possible to display more data points.

5.2 The system fails to give proper resolution because of limited raster size (256 x 256 dots only). The display can be removed by having a higher resolution monitor and Graphic Generator (say 1024 × 1024 dots) using the same algorithm. 5.3 Apart from radio astronomy field, the same display is used in so many other fields. In medical field this technique helps to study the relationship of blood flow turbulence to the pathogenesis of atherosclerosis and to the sites of predilection of atherosclerotic lesion formation. Similarly the population density of a country at various cities can also be plotted by the same ruled technique. REFERENCES

I. Cornelis Van Schooneveld (Ed.), Image Formation .from Coherence Functions in Astronomy. p. 1%26. Reidel (1979). 2. R. D. Parslow and R. Elliot Green, Computer Graphics in Medical Research and Hospital Administration. Plenum, New York 1971. 3. Wolfgang K. Giloi, Interactive Computer Graphics, PrenticeHall Inc, 1978. 4. Motorola, M 6800 Microprocessor Application Manual. 5. Matrox, CRT Controller Family Application Notes.

0002

0003 0004 0005 0006 o007 9 O00B 10 0 0 0 9 11 oOOA 12 o00[~ 13 O00C I~ O 0 0 P 15 16 0 0 2 0 17 ! R 6000 I0 600) 20 6002 21 22 21 2 2 0 0 24 2 2 0 3 25 2 2 0 5 26 220R 27 2 2 0 A 28 2 2 0 D 29 220F 30 2212 31 2 2 1 4 32 2 2 1 7 3) 2219 34 2 2 1 C 35 2 2 1 P 36 7 2 1 F

4 5 6 7

]

3 ? 5 2 ~ 7 5 2 ~ ? f, 7 4 ?

5 T . N Q L3Ct! MF I 2 0001

Fr P6 P7 P6 P7 r6 F7 C6 F7 c6 7c ~A 96 F6 FA 02

OA

03

04

OA

09 COBS(E) X'O8" ROOF(E)

ROWS(E) X'?O"

A'DALD ° X'80"

X'O001 X'O0" X'O0" X'O0" X'O0" X'O0" X'O0 ° X'O0" X'O0" X'00" X'O0" X'O0" X'O0" X'n0" X'O020 X'O0" X'6000 X'O0 ° X'O0" X'O0 ° X'2200

X'04" STAB NROW(F)

I,OC PN LDX BDAA STAA I,DAA 5TAA LDAB STAB I,DAB

l,OC

I,OC

LOC

ONE(R) LDAB X ' 0 2 "

BNE

TOPI I,DAB X ' 0 2 " ONE INC CDLS(E) PECB

~RS0 GRS1 CRS2

OO no 00

20

DALO

O0

NROW

LR RR ROOF HL HR NCOL ERA ROW~ COL5 nLP HbB HRI

O0 £0 OO 70 00 OH OO 04 OO n2 OO

SOURCF COPE

I,ABI,E MNEM nPERAND

O0 (~0 CO O0 O0 O0 OO O0 00 OU 0o

OO

O0

OBJECT CPDE opFnDv 9t,ERANP

PRO.SR~M~,ER-PEF I S

LOCATIUN*

OF D A T A *

*SKEWING*

*STARTINC ADDBESS OF PROGRAM*

*GPAPHICS

LOCATION

FO~ RULE9 SURFACE PLOT THE NIuTH CONSTANT FOR ALL LEVELS*

*STARTING

*PpOGRA~ *KEEPING

11:24

COMMENT

PROGRAM ******************************** TITLF-RRI 7-dul-81

M-6BOO ASSEMBLY LANGUAGE

CL

8.

E

=I

aT.N'] LDC~' ~'C 37 222! 6 38 ?224 ? 3q 2225 : 4~) 2227 4 41 222~, ~ 42 222P ~ 43 2230 ~ 4~ 2233 ? 45 2235 5 46 2238 5 47 7 2 3 A ? 4~ 2 2 3 ~ ~ 4 9 223F' ? 50 223F ? 5t 52 2241 r 53 2244 2 54 2245 4 55 2247 6 56 224A 4 57 224C 6 59 2 2 4 F 4 59 225~ 3 69 2 2 ~ 4 4 61 2255 3 62 2258 ~ 6] 225~ 2 64 2 2 f i c 4 65 2 2 5 F 5 66 2 2 6 2 5 67 2265 2 68 2 2 6 6 5 69 2 2 6 9 5 70 226C 5 71 2 2 6 f ? 72

~ ~A ?6 "A 26 7A ~6 ~E 08 "E B7 48 F6 r~ V7 10 P7 P7 P7 96 B6 38 OR 04 ~2 Ol 05 06 08

22 OO oo O0 00 0(; O0 O0 DO

03

07

O0

FA 0(; n8 O0 ?b 22

~u

C)RJE(""~ C D D ~ OpCODV DI)VPAND "A O0 Og ~A ?6 FA ~6 0o 09 F7 6o O] P6 O0 nA r? 6U 02 c6 OH F7 OO 07 ~6 n() "~ ?6 !t~ c6 n4 £6 11

PRO SR~.E:;C R - P E P I,£

ASSEMBLY

DECB BNE I.DAA STAA I=DAA STAA [,DAB STAB I,DAA TSTA BNE I,DAB I,DAA

DEC

STAA DECB BNE MINE DEC BNE DEC BNE JMP ME INX JMP MR STAA ASLA LDAB STAB STAB SBA STAA STAA STAA I,DAA

THE

HAI

LOOP

TWO

~ZFRO

EPA(E) X'P0 °

HE(F)

HL(E)

RP(E) LR(E)

ROnF(E)

LOOP(E) OLD(E) ~HIGHER

N~OL(E) ME(R) ~RASTER NORM(E) TOPI(R) HALT(E)

THE(R)

GPS0(~)

MP(P) X'04" X'II"

GPSt(E) COLS(E) GPS2(E) X'08" NCDL(E) +0(X)

ROWS(E)

TWOfR)

ROWS(E)

PLf)TTiNG~

LEVEL

PLOT~

AREA CHECK~D~

LEVEL

11:24

COMMENT

PROGRAM

7"JUl-81

LANGUAGE

SOIIPCV C O D E I,ABLE M N E M ()PERAND

TITLE-HRI

M-6800

<

(D.

.<

>

22C5 22C7 22C~ 22CP

22C4

22C1

22BB 22Br 22BF

115 22D2 116 22D4

113 114 22VF

109 110 ill 112

105 106 107 108

tO4 22BA

101 22B6 102 22B7 103 22B8

2271 2274 2275 2277 227A 227C 227F 2281 2284 22R6 2288 228F 228E 2290 2292 2295 2298 229A 229P 229F 22A1 22A4 22A7 22Ag 22AC 22AF 9o 2281 10o 22B4

73 74 75 76 77 78 7g 80 81 82 8] 84 85 86 87 88 89 90 91 92 93 9~ 95 96 97 98

3

4

4 3

4

3

4

2 2 5 2

4

5 2

4

2 5 6 4 2 5 6 4 6 4 2 5 6 ,I q 6 4 6 4

6

4 6 4 2

r, ?

7F, PC 7E

P6

26 ?E nl

FA

7~. 76 ~6 r'7 7A ?6 7D P7 ~6 P,7 ~,A 26 P,p 7A 76 7~, ?6 3F 08 A6 4D 26 C6 ~6 D7

77 86 P7 ~A 76 ~6

,'7 ~A ?6

FA 22 OU 03 23 Ob 23

6O

OD 02 DO

O0

FH P1 60 O0 VH 31 60 O0 FH O0 OA 21 6U 00 FH 23 00 Oh O0 21

Of)

FA OU OA AI 6O

6O

38

RC

OB

3D

00

03

NEX

EE 07

EGT(R) DEL(E)

BNE JSR

BNE MAMI(P) DEC NPOW(E) RNE TOP(R) HALl SWI MAMI INX *NEXT DATAe LDAA +O(X) TSTA BNE BOB(R) I,DAB X'02" LDAA X ' D 0 " VAS STAA GRS0(E) DECB BNE VAS(R) JMP HAI(E) BOB CMPA OLD(E) *COMPARISION BNE POP(R) JMP MIT(E) POP BGE MIAM(R) JMP MFA(E)

NCOL(E)

HE(E)

DEC

BACK DEC

EGT

SEV

FOUR(R) X'Ai" CPSO(E) IlL(E) FIVE(R) X°RI" GPSO(E) DEC LP(E) BNE SIX(R) I,DAA X'31 o STAA GR3OCE) DEC RP(E) BNE SEV(R) TST HP(E) BEQ NFX(R) L D A A X'21" STAA GPS0(E)

HI,(E)

PIP(R)

STAA GPSO(E) DECB

BNE TST BEG I,DAA FIVE STAA I)EC BNE F O U R I,DAA SIX STAA

PIP

00 O6

O6

OO 02

00 01

O0 05

05

O0

WITH

pREVIOUS

DATA

POINTm

6-

~3

&

m

-=3.

=> g

148 149 150 151 152

I~7

ST,NO 117 118 119 120 121 122 123 12~ 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146

OBJECT CODF bDCN MC OPCODE OPFRA~ID 22D7 3 7E 22 17 22DA 4 F6 O0 0B 22DD 2 5R 22DE 5 F7 00 OC 22EI 5 ~7 00 0B 22E4 2 48 22E5 4 F6 00 04 22Eg 5 F7 OO 01 22E~ 5 F7 00 02 22EE 2 10 22EF 5 E7 O0 08 22F2 5 P7 O0 OD 22F5 4 BO CO OC 22F8 5 ~7 00 05 22FB 2 86 DO 22FP 5 ~7 60 00 2300 2 5A 2301 4 26 FA 2303 2 ~6 AO 2305 5 ~7 60 O0 2308 6 7A OO 0C 230B 4 P6 F8 230D 2 ~6 A1 230F 5 ~7 60 O0 2312 6 7A O0 05 2315 4 26 F8 2317 2 ~6 81 2319 5 ~7 60 O0 231C 6 ~A 00 01 231F 4 26 F8 2321 2 ~6 31 2323 5 B7 60 00 2326 6 ~A O0 02 2329 4 26 F8 232B 2 86 21 232D 5 B7 60 O0

PROGRAMMER-PEPI$ 11:24

SOURCE CODE LABLE MNEM OPEEAND COMMENT TOP JMP T O P I ( E ) MIAM LDAB OLD(E) * I F CURRENT DATA bEVEL I S GRATER * ASLB *THE PREVIOUS b ~ V E b * STAB H[,B(E) STAA OLD(E) ASLA LDAB ROOF(E) STAB LR(E) STAB R ~ ( E ) SBA STAA E P A ( E ) STAA H P I ( E ) SUBA HLB(E) STAA HL(E) I,DAA X'D0" NIN STAA GPS0(E) DECB BNE N I N ( R ) LDAA X ' A 0 " TEN STAA GPS0(E) DEC HLB(E) BNE TEN(R) LDAA X'A1" ELE STAA GPSO(E) DEC HL(K) BNE E L E ( R ) LDAA X'BI ° THE STAA GPS0(E) DEC LP(E) BNE TNE(R) I,DAA X'31" THI STAA G~SO(E) DEC RE(E) BNE THI(R) LDAA X°21 ° FRT STAA GPS0(E)

H - 6 8 0 0 ASSEMBLY I,ANGUAGE ['~0GPAH ******************************** TITLE-RRI 7-dui-81

>

<

-<

2342

2330 2333 2335 2338 233U 233C 233F

188 189 190 191 19~ 19] 194 195 196

2300 2393 239f 239 ° 23gA

238V

2387 2389 238C

180 2372 181 2375 182 2378 183 237A 18{ 237P 185 237F 186 2381 187 2384

175 2366 176 2368 177 236F 178 236F 179 2370

2345 2346 2349 234C 234F 235J 2354 2355 2357 235A 1 7 t 235C 172 235F 173 2361 174 2364

153 154 155 156 157 158 159 160 161 162 163 16t 165 166 167 168 16') 170

B~ 48 "F6 F7 F,7 ~0 D7

7A ~6 7E P~ 48 F6 r7 F7 ~o B7 P,7 P,7 e6 ~7 £A ~.6 7D 77 R6 n7 7A P6 n6 B7 ~A 76 P6 B7 7A ?.6 VD ~7 n6 P7 7A ?6

O4 OC OD 05

OO

A9 on

O0 06

MAK MIT

IRA

PIA

O0 02 06

IAR

KAM

RAI

AIR

HEA

00 01

O0 05

05

O0

08

05 06

02

04 01

A9 0B

0D

OO oo 00

FA OO OA A0 60 O0 FB 80 60 OO FA 31 60 OO F8 O0 OA 21 6o O0 F8 22 oo

60

DO

00 OO O0

O0 0O 00

00 F8 22 00

KAM(R)

BEQ

IS SAME

AS P R E V I O U S

~CURRENT I,EVEL IS LESS THAN* *PRP;VIOUS LEVEL*

DEC RP(E) ~NE RIA(R) TST HP(F) BEO MAK(R) I,DAA X'21" STAA GPSO(E) DEC HP(F) BNE IRA(R) JMP NEX(E) S T A A OID(E) *C,UPRE~fT LEVEL ASI,A I,DAB ROOF(E) STAB H L B ( E ) ~TAB IIPI(E) SRA STAA III,(F)

BNE IAR(R) I, DAA X ' 3 1 " STAA GPSO(E)

STAA G P S O ( E ) DEC LP(E)

LDAA X'BO"

L D A A X'AO ° STAA GRSO(F) DEC HL(E) BNE RAI(R)

TST

AIR(P) HL(E)

HP(E) EPA(E) X°DO" GPSO(E)

HL(E)

ROOF(E) L~(E) RR(E)

HRI(E) FRT(R) NEX(E) OLD(X)

BNE

DECB

DEC BNE JMP 5TAA ASLA bDAB STAB STAB SBA STAA STAA STAA LDAA STAA

I,EVEL.

:h

3

=>

LOCF HC 23qP 5 23A0 5 23A3 2 23A4 5 23A7 2 23A9 5 23AC 6 23AF 4 23B1 6 23B4 4 23B6 2 23B~ 5 23B~ 6 23BF 4 23C0 2 23C2 F 23C5 2 23C6 4 23C8 2 23C~ 5 23CD 6 23D0 4 23D2 2 23D4 5 23D7 6 23DA 4 23DC 6 23OF 4 23E1 2 226 23E3 5 227 23E6 6 228 23E9 4 229 23EP 3 23 0 23EF 4 231 23F1 5 23 2 2 3 F 4 5

ST.NO 197 198 19~ 209 201 202 203 204 205 206 207 203 209 210 211 212 21] 214 215 216 217 218 219 220 22! 222 223 224 225

OBJECT CODE OPVNDE OPFRAND F7 OO 06 ~7 O0 08 ~4 F7 O0 02 R6 DO D~ 60 00" ~A O0 OC 26 F8 ~D O0 05 2~ OA P6 AO P7 60 O0 ?A O0 05 ~6 F8 86 ~O B7 60 00 ~A 26 FA ~6 B1 ~7 60 O0 7A 00 02 76 F8 ~6 31 F7 60 00 7A 00 OD ?6 F8 7D O0 06 ?7 OA R6 21 E7 60 O0 ~A O0 06 26 F8 "E 22 A9 V6 00 04 F7 00 05 F7 ,00 06

PROGRAMMER-PEPIS

ASSEMBLY 11:24

eDELETE SUBPOUTLNE~

COMMENT

PROGRAM

7-JUI-81

LANGUAGE

SOURCE CODE LABLE MNEM OPEPAND STAA HP(E) STAA EPA(E) LSRB STAB RPCE) LDAA X°DO" MTI STAA GPSO(~) DEC HLB(E) BNE HTI(R) TST IIL(E) BEO RAK(R) LDAA X ' A 0 ° IMT STAA G P S 0 ( E ) DEC H L ( E ) BNE IVT(R) RAK LDAA X ' B 0 ° ITM STAA G P S 0 ( E ) DECB BNE ITM(R) LDAA X ' B I " TIM STAA GPS0(E) DEC RP(E) BNE TIM(R) LDAA X°31 " TMI STAA GPSO(E) DEC H P I ( E ) RNE TMI(R) TST He(E) BEO APK(R) LDAA X ' 2 1 o KIN STAA GPS0(E) DEC H~(E) BNE KIN(R) ARK JMP NEX(E) DEL I,DAB R O O F ( E ) STAB HL(E) STAB HR(E)

TITLF-RR]

M-6800

>

z

_.<

-<

"13

Z P

g

<

> C~

23FF 23FU

2413 2416 2417 2419

246 247 248 249

251 25? 25] 254 255 25~ 257 25;~ 259 26') 26t 26[! 26] 26~ 265 265 267 26~ 263 27) 271 272 273 27~ 275 276

2452 2454 2457 245/ 245C

244f

24~[ 2421 ?424 24?7 242£ 242C 242£ 2asr 2432 2434 2437 243£ 243~ 243F 243;' 2442 2444 ?447 244~ 244C

25'o 241C

240F 2411

244 245

237 2400 238 2403 239 2404 240 2406 241 2408 242 240P 243 240C

235 236

233 23F7 234 23F~

"A ?6 ~q

"F "A P6 p?

"A C6 r-7 "D

P6 pc; 26 "A 2v

"A ?6 r-6

v6 £6 F'7

26 7A 27 nc

~A

27 ~6 P7 5A ?6 F6 A6 By

5P r7 n6 B7 F6

24 OC

24 OU IO O0 Or

OO OP.

6,O 0o

60 00 F8

08

06

O0 IU ,0

FA

oO

0R

O0

{O FA 0(; 2O ~o

08 FB 0£

FA O0 06 oo :;3 OO 05

00

08

O0

13 AO 60

FA 00 20 60

00 08

OC

00 Do 60 00

CC

RTQ

B~U

BB

AA

BET

GEl!

ELD

LED

HIGH

REO LDAA STAA DECB BNE I,DAB LDAA STAA DECB BNE DEC BEQ INC JMP I,DAB I,DAA STAA DVCB BNE I,DAB I,DAA STAA DECB BNE DEC RFO DEC LDAB STAB TST BEQ JMP DEC LDAA STAA DEC BNE RTS END

ASLB STAB LDAA STAA I,DAB TSTB

BB(R) HR(E) RTQ(R) EPAfE) X'DO ° GPSO(E) ERA(E) BRU(R) BET(E) HLB(E) X'10" GRS0(E) HLB(E) CCCR)

X'20" GRSO(E)

EPA(E)

AA(R)

HL(E) PET(R) EPA(E) HIGH(E ERA(E) X'A0" GPSO(E)

EI,D(R)

LED(R) EPA(E) X'20 ° GPSO(E)

GRU(R) X°AO ° GPSO(E)

HLB(E) X°D0 ° GPS0(F) EPA(E)

D-

cD

i

:n

g

156

M. PERIASAMYand D. K. RAVINDRA '~-6800 A S S E Y B L Y

LANGUAC, E F'RO6P,AM

41,,II. "If. ,~".I(, 'l- 'm"'W"45 ,I(.,If- ,~. ~I, ,M.,M.,W-,I(,¢(, 4l. ~- ~ ~ ~ ~ ~ W ~ ~ ~ ~ ~ ~

PROGRAMMER-PE~IS

TTTI,F-RPI

7-Jul-8 ! SYMBOL

{ 2 3 4 5 6 7 F n !0 I~ 12 13 14 1F IF 17 1P 19 20 2J 72 23 24 25 2~ 27 28 20 30 91 32 33 34 35 36 37 38 39 40 4{ 42 43 44 45 46 47 48 49 50 ~I 52 53 54 55 56 ~7 58 59 60 61 62 63

AA AlP AhK BACK BB BOF BkU CC COLS DALD DEI, EGT ELD ELT ERA FIVE FU/;R FRT GRSO GI~SI CRS2 GRII HAI HALT HIgH HL HL~ H~ H~ IAR IM~ Ih A ITM KAM KIN LED LOOP LR MAK MANI ME MEA MIAM MINE MIT MR MTI NCOL NEX NIN N~W OLD nNE PIP POP PAI RAK RET RIA ROOF ROWS R~ RTQ

TABLE

9257 9041 9195 8876 9268 8906 9274 9300 10 32 9198 8865 9235 8975 8 8830 8838 9005 2457& 24577 24578 9241 8765 8886 9211 5 12 6 13 9064 9144 9080 9154 9062 9187 9224 8760 I 9097 8887 8788 9016 8922 8775 9100 8792 912 o 7 8873 8957 3 11 8729 8R17 8914 9054 9152 9252 9074 4 9 2 9205

2429 2351 23EB 22AC 2434 22CA 243A 2454 00OA 0020 23EE 22A1 2413 230F 0008 227E 2286 232D 6000 6001 6002 2419 223D 22B6 23FB 0005 000C 0006 OOOD 2368 23B8 2381 23C2 2366 23E3 2408 2238 0001 2389 2287 2254 2338 22DA

2247 238C 2258 23A9 0007 22A9 22FD 0003 0OOB 2219 2271 221'2 235E 23C0 2424 2372 0004 0009 0002 244F

11:24

An algorithm for hidden line ruled surface display

M-6800 PP 0 ,~P A l' I.'F R - P F F I Z,

ASSEMBLY

LANGUAGE

TITI, F-RRI

PRDGRAM 11:24

7-JUi-81 SY~BDL

64 SEV 65 SIX 66 TEN 67 THI 68 THR 69 TIV 70 TMI 71 TOP 72 TUPI 73 TwF 74 T~ 75 VAS ASSEMB! Y E ~ R O R S

157

TABLE

8850 8840 8965 8995 876q 9162 917~ 8919 8727 8q85 8737 8897 0

2292 2288 2305 2323 2241 23CA 23[74 22D7 2217 2319 2221 22CI