ivan sutherland_characterization of ten hidden-surface algorithms [1974]

Upload: davor-kirin

Post on 03-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    1/55

    A C h a r a c t e r i z a t i o n o f T e n H i d d e n - S u r f a c e A l g o r i t h m s

    IVAN E. SUTHERLAN D*, ROBERT F. SPR OULL**, AND ROBERT A. SCHUM ACKER*

    T h i s p a p e r d i s c u s s e s t h e h ~ d d e n - s u r f ac e p r o b l e m f r o m t h e p o i n t o f v i e wo f s o r t i n g . T h e v a r i o u s s u r f a c e s o f a n o b j e c t t o b e s h o w n i n h i d d e n - s u r f a c eo r h ~ d d e n -l in e f o r m m u s t b e s o r t e d t o f i n d o u t w h i c h o n e s a r e v i s i b l e a tv a r i o u s p l a c e s o n t h e s c re e n . S u r f a c e s m a y b e s o r t e d b y l a t e r a l p o s i t i o n i n t h ep i c t u r e (XY), b y d e p t h ( Z ), o r b y o t h e r c r i t e r ia . T h e p a p e r s h o w s t h a t t h eo r d e r o f s o r t i n g a n d t h e t y p e s o f s o r t i n g u s e d f o r m d i f f e r e n c e s a m o n g t h ee x i s t i n g h i d d e n - s u r f a c e a l g o r i t h m s T o r e d u c e t h e w o r k o f s o r t i n g , e a c ha l g o r i t h m c a p l t a h z e s o n so m e c o h e r e n c e p r o p e r t y o f t h e o b j e c t s r e p r e s e n t e d ." S c a n - h n e c o h e r e n c e, " t h e f a c t t h a t o n e T V s c a n l i n e o f o u t p u t i s l i k e lyt o b e n e a r l y t h e s a m e a s t h e p r e v i o u s T V s c a n h n e , is o ne c o m m o n l y u s e dk i n d o f c o h e r e n c e . " F r a m e c o h e r e n c e , " t h e f a c t t h a t t h e e n t i r e p m t u r e d o e sn o t c h a n g e v e r y m u c h b e t w e e n s u c c es s iv e f r a m e s o f a m o t i o n p z c t ur e c a nb e v e r y h e l p f u l f f ~t i s a p p l i c a b l e .

    B y s y s t e m a t i c a l ly l o o k in g f or a d d l t m n a l k i n d s o f co h e r e n ce a n d u n t r m d s o r t i n go r d e r s a n d s o r t i n g t y p e s , t h e p a p e r i s a b l e t o s u g g e s t t w o p r o m t s i n g n e wa p p r o a c h e s t o th e h i d d e n - s u r f a c e p r o b l e m . T h e f ir s t , a c o m b i n a t i o n o f t h r e ee x i s t i n g a l g o m t h m s , ~s p r o m i s i n g b e c a u s e ~t w o u l d c a p i t a l iz e o n b o t h f r a m e a n ds c a n - h n e c o h e r e n c e T h e s e c o n d n e w a p p r o a c h w o u l d s o r t i n t h e o r d e r Y , Z , X , . . .t h e o n l y s o r t i n g o r d e r f o r w h i c h a n e x i s t in g a l g o m t h m c o u l d n o t b e f o u n dKey words a~d phrases h l d d e n - h n e e l i m i n a t i o n , h i d d e n - s u r f ac e e l i m i n a t i o n ,s o r t i n g , c o h e r e n c e , c o m p u t e r g r a p h i c s , r a s te r - s c a n , p e r s p e c t i v e t r a n s f o r m a t i o n ,a n a l y s i s o f a l g o m t h m sCR Categories: 8 2 , 5 31.

    ! . I N T R O D U C T I O NW h i l e i t is re l a t i v e l y e as y t o pr o du c e ap e r s p e c t i v e p i c t u r e o f a t r a n s p a r e n t o b j e c tm a d e u p o n l y o f l in e s , i t is r a t h e r m o r ed i f f i c u l t t o p r o d u c e a r e a l i s t i c r e n d e r i n g o f a no p a q u e o b j e c t . T h e o p a q u e o b j ec t i s m o r ed i f f i c u l t t o s h o w b e c au s e o n e m u s t de c id e n o to n l y w h e r e e a c h p a r t o f th e ob je c t w i ll a p p e a ro n t h e p i c t u r e , b u t a l s o w h e t h e r t o s h o w a n yp a r t a t a l l S o m e p a rt s o f a n o p a q ue o b je c tw i l l b e c o n ce a le d i n a n y v i e w o f it ; a c o m p u t e rp r o g r a m m e d t o m a k e p ic tu re s o f o p aq u eo b j e c t s m u s t b e a b l e t o d e c i d e w h i c h p a r t s a r e,> Evans and Sutherland Comp uter Corporation, Sa lt LakeC i t y , U t a h* * Stanford University , Palo Alto, Cal i fornia (formerly withEvan s and Suther land Computer Corpora t ion ) .

    v i s i b l e i n t h e c h o s e n v i e w a n d t h u s m u s t b es h o w n , a n d w h i c h p a r t s a r e h idden a n d thusm u s t b e o m i t t e d .

    T h e t as k o f d e c i d in g w h i c h p a rt s o f a no b j e c t s h o u l d b e s h o w n a n d w h i c h p a r t s s h o u ldb e o m i t te d w a s o r i g i n a l l y k n o w n a s t h e" H i d d e n - L i n e P r o b l e m , " b ec a us e i t a m o u nte dt o f i n d i n g a n d e l i m i n a t t n g . . o r m a k i n g d a s h e d - -a l l o f t h e l in e s in a n o u t p u t d r a w i n g w h i c hw e r e h i d d e n b y o t h e r o b je c ts . N o w t h a t s h a d edp i c t u r e s a r e b e i n g p r o d u ce d b y c o m p u t e r , av a r i a n t o f t h e p r o b l e m , t h e " H i d d e n . S u r f a c eP r o b l e m , " h a s b e c o m e im p o r t a n t , i n a s h a d edp i c t u r e o n e m u s t i n c l u d e o r o m i t e n t i r e s u r f a c ea r e a s r a t h e r t h a n j u s t t h e lin e s representinge d g e s . B e c a u s e t h e h i d d e n - l ,n e a n d h i d d en -s u r f a c e p r o b l e m s a r e v e r y s i m i l a r , w e havec h o s e n t o t r e a t t h e m t o g e t h e r i n t h i s p a p e r .

    C o m p u t i n g S u rv e y s , V o l . 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    2/55

    2 I . E . S u t h e r la n d , R . F . S p r o u l l , a n d R . . 4 . S c hu m a c l~ e rC O N T E N T S

    ABSTRACTI . INTRODUCTIONI1 BACKGROUND

    T h e E n v i r o n m e n tOb3ect Deser~ptwnsEnwronment Complexity Defin~twnsT h e P e r s p ec t iv e T r a n s f o r m a t i o nG e o m e t r i c C o m p u t a t i o n sMinimax TestsSurrounding PolygonsUses of Plane EquatwnsComputing the Plane EquationEdge IntersectwnsSegment ComparisonS o r t i n gC o h e r e n c eIII TAXONOMY OF THE ALGORITHMSO b j e c t - S p a c e A l g o r i t h m sL G Roberts (1963)Edge-lntersectwn AlgorzthmsA App el (I967)P. P Loutrel (1967)R. GaZ~mbert~and U Montanar~ (1069)I m a g e - S p a c e a n d L i s t -P r i o r i tyLIst-Przor~ty AlgorzthmsR A Schumacl~er, B Brand, M Gdhland,IV Sharp (196~)M. E NeweU, R G Newell, T L Sancha(1972)Depth-Prwr~ty AlgordhrnsJ E Warnock (1968)Scan-Zzne AlgorithmsC Wylie, G W Romney, D. C E~ans, A. CErdahl (I967)1V J Boukn~ght (I969)G. S [Vatkzns (I970)IV OBSERVATIONSU s e o f C o h e r e n c eEx2stmg Uses of CoherenceNew Uses of CoherenceFrame and Ob3ect CoherenceEdge CoherenceSean-L~ne CoherenceArea CoherenceDepth CoherenceS o r t i n g O r d e rAn Untried Sorting OzderOther Combznatwns of SortingSorting Order and Computing CostV CONCLUSIONSACKNOWLEDGMENTSBIBLIOGRAPHY

    T h is w or k ,s sponsor ed b y the In for ma t ion System Pr o -g r a m o f t h e O f f i c e o f N a v a l R e se arc h u n d e r N R 0 4 9 - 3 3 3C o p y r i g h t ( ~ ) 1 9 7 4 . A s s o c ia t io n f o r C o m p u t i n g M a c h i n e r y .lnc G ene r a l permtssJon to republish, but no for p rof i t , a l lo r par t o f th is mater ia l i s g r anted , p r ov ided that A C M ' sc o p y r i g h t n o t ic e i s g i v e n a n d that reference is made to thispub l i ca t ion , to i t s da te o f i ssue , and to the fac t tha tr epr in t ing pr iv i l eg es w er e g r an ted b y per miss ion o f theA s s o c i a ti o n f o r C o m p u t i n g M a c h i n e r y .

    APPEN DIX A STATISTICAL PROPERTIESOF THE RENDERINGD e f i n i t i o n s

    D e f i n i t io n o f E n v i r o n m e n t sDerw~ng the En~wonment StatisticsAnalysTs of the Algorzthrn~APPENDIX: B SOME STAT ISTI CAL ESTI-MATES OF COMPUTING COSTC o m p l e x i t y F a c t o r sS t a t i s t ic s f o r t h e V a r i o u s A l g o r i t h m sRobertsA ppel, Loutrel, Gal~mbertz and Montanar~Schumacker, et aZNewell, et al.WarnoclRo tuner, et alWatkznsBrute-Force Image-SpaceStatist ical R e s u l t s

    Sh ade d p ic tures a re produced b y record ingt h e s h a d e o f g r a y o r t h e c o l o r o f e a c h p o i n t i na t w o - d i m e n s i o n a l a r r a y B e c a us e m a n y s h ad e so f g r a y o r s h a d es o f c o lo r m a y a p p e a r i n s u c hpic tures , they a re correc t ly ca l led shadedpic tures , but the s l ight ly e r roneous te rm "ha l f -tone p ic tures" has a lso been appl ied Becauset h e l a r g e a r r a y o f p o i n t s u s e d b y a c o m p u t e r t ode f ine a shaded p ic ture is o f ten reproduced b ys c a n n i n g i t i n a r a s te r , m u c h a s d o es a T V s e t,these pic tures are a lso referred to as "raster-scan" p0c tures . T h e ras te r -scan processco nt ras ts w i th the random-scan process used byplot te rs and c a l l ig ra phic d isp lay sys tems tom a k e l i n e d r a w i ng s .

    T h e c o m p u t e r p r o g r a m s w h ic h p ro du c ep i c t u r e s o f o p a q u e o b je c ts a c c e p t a s i n p u t ad e s c r i p t i o n o f t h e o b j e c t t o b e s h o wn , a n d ad e s i r e d v i e w i n g p o s i ti o n a n d d ir e c t io n f o r ah y p o t h e t i c a l o b s e r v e r. F r o m t h i s b a s ic d a t at h e p r o g r a m t h e n c om p u te s w h a t s u c h a nob jec t wo uld look l ike to an observer sopos i t ioned, a process long known by a rch i tec tsa s " r e n d e r i n g . " A l t h o u g h i t is e as y t o c o m p u t e;he perspec t ive pro jec t ion th a t is usua l lyi n v o l v e d , i t is m u c h m o r e d i f f ic u l t t o s ol ve t h eh i d d e n - s u r f a c e p r o b l e m , i n l i g h t o f t h ed i f f i c u l t y o f t h e h i d d e n - s u rf a c e p r o b l e m i t isr e m a r k a b l e t h a t m a n y p eo ple h a v e

    Com puti ng Surveys, Vol 6, No 1, Mar ch 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    3/55

    A Charac terization of Ten Hidden-Surface Algorithms 3independent ly so lved i t , and natura l tha t the i rso lu t ion s have taken many d i f fe rent fo rms, i ti s the purpose o f th is paper to survey thepr inc ipa l pub l ished methods and to prov ide asbackg round s o m e unders tanding o f t hem athem at i ca l ope ra t ions common to a l l .The s tudy wh ich led to th is paper had afu r th er purpose, i t was our p lan to compareand categor ize the known a lgor i thms in thehope that such a categor izatmn of a l ternateso lu t ions to a prob lem might lead to somefundamen ta l i ns igh t i n to the na tu re o f t hepro b lem i tse l f. W e took th is taxonomicapp roach fo r reasons o f research ra ther thanteach ing, d iscover ing on ly la ter tha t a surveypap er l i ke th is cou ld a lso be usefu l.

    Two under l y ing p r inc ip les have emergedf ro m ou r s tudy . F i rs t , a l l o f the a lgor i thm ssor t or search through col lectmns of surfaces,edges, or objects according to v ar ious cr i ter ia,f i na l l y d i scove r ing the one v i s ib le i t em andd isp lay ing i t . A l though the o rde r and k ind o fso r t ing used d i f fe r , our suppos it ion tha t sort ingis the key to the task seems am ply jus t i f ied

    Th e second unde r l y ing p r inc ip le is coherence.The env i ronments rendered by the h ,dden-sur face a lgor i thms cons is t o f ob jec ts wi th moreor less f la t surfaces and s t ra igh t edges ra therthan random d iscon t inu i t i es . T h i s coherenceof the env i ronments be ing rendered l imi ts howdi f fe rent the p ic ture can be f rom p lace to p laceo r f ro m t ime to t ime . A l l o f t he a lgo ri thmscap i ta l ize on varmous fo rms o f coherence toreduce to manageable proport ions the work ofso r t i ng . Th e k inds o f coherence m os t he lp fu lt o pa r t i cu la r a lgo r i t hms a re eas i ly i den ti fi ed ;the exte nt to w hich useable coherence exists ina pa r t ic u la r so l id ob jec t seems to determine thespeed w i th wh ich the a lgo r i t hm w i l l rende r i t.

    l i . BACKGROUNDT h e E n v i r o n m e n tObject Desc r ip t ions

    Th er e are , o f course, as man y wa ys todescr ibe th ree-d imens iona l ob jec ts in acomputer memory as there are programmers to

    ass ign to the task . Th e a lgor i thms which wetre at in th is pape r operate on obJects wh ich arem ade up on ly o f f ia t faces , i .e . , p lane-facedobjects. C on ve x objects can be descr ibed byg iv ing the coef f loents o f the p lane equat ion o feach o f the i r faces , bu t i t i s o ften s imp ler touse th e coordinates of their ver t ices and thetop olo gy of the connections b etw een vertices.A l though the da ta requ i red by the va r iousa l g o r i t h ms ma y d i f f e r f r o m t h i s f o r m ,conve rs ion to the requ i red fo rm i ss t r a i g h t f o r wa r d .

    Each vertex, then, is descr ibed by giv ing i tscoord inates in th ree d imens ions in someconv en ien t coord inate sy s te m , the "objec tcoordinate system" Each face is descr ibed as apo lygon (presumed to be p lanar ) by l i s t ing i tsvert ices . Such a n object descr ipt ion is shownin F igu re ! . I f t he faces have more than th reevert ices each, the vertex posi t ions must berelated i f the surfaces are actual ly to be planar.Ea ch face m igh t a lso be assigned a color ,t ransparency, ref lectance, texture, or otherp rope r t i es .

    Because collections o f objects are oftenshown together, i t is convenient to bui ld aC

    H

    P O L Y G O N SA B CDD C G HE H G FB A E FA DHECBFG

    V E R T E X X Y ZA - I I IB - I I - IC I I -IO I I IE - I - I IF - I - I - IG I - I - IH I - I

    F i g u r e [ . P o i n t . p o l y g o n r e p re s e n ta t io n o fI= cube

    %C o m p u t i n g S u r v e y s , V o l . 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    4/55

    4 I . E . Sutherland, R. F . Sproul l , and R. A. Schumacker

    FIGURE 2A

    F,gure 9. The data f or computer.generatedpictures may bemeasured by hand a. ~ A mode l F. ,I and the resultingcomp uter output, c. d. e ..f: A Volkswagen and three formsof computer output.

    FIGURE 2B

    s t r uc tur e o f ob jec t re ferences . A s ing le ob jec td e f i n i t i o n , f o r e x a m p l e a s h i p , m i g h t b er e f e r e n c e d s e v e r a l t imes to make a f leet . Eachre f e l enc e wou ld , o f c ou rs e , c a r ry d i f f e ren tpos i t i on , s i z e , o r i en t a t i on and , pos s ib l y , c o lo ra n d t e x t u r e p a r a m e t e r s . Because o f t h eo b v i o u s a p p l i c a b i l i t y o f s u c h a presen ta t ion to

    s i m u l a t i n g n a t u r a l scenes, we have chosen toc a l l t he t o t a l i t y o f ob jec t s t o be s hown an" e n v i r o n m e n t . " T h e e n v i r o n m e n t I s n o t h i n gm ore t h an a des c r i p t i on , pos s ,b l y st ruc tu red , o fa l l o f t he s u r f ac es on wh i c h t he h i dden . s u r f ac ea l g o r i t h m m u s t o p e r a t e .

    A s t r u c t u r e d e n v i r o n m e n t r e q u i re s p r o g r a m s

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    5/55

    A Characterization of Ten Hidden-Surface Algorithms

    FIGURE 2c" .t /

    FIGURE 2D

    FIGURE 2E FIGURE 2Fto inte rpr et i ts st ructure. Th e hidden-surfacepar t o f t he compu ta t i on may make use o f t hes t ruc ture , de termin ing tha t a g iven ob jec t isent i re ly h idden by another ob jec t , ra ther thand o i n g t h e c o mp u t a ti o n i n d i v i d u a l l y f o r th efaces of the objects. O n the other hand, theh idden-sur face par t o f the computa t ion mayu l t i m a t e l y have to know the f ina l locat ion o f apa r t ic u la r sur face o f som e ob jec t in order tode te lm ine whe ther i t h ides some o ther surface.T hu s the p rog rams w h ich in te rp re t t heenv i ronmen t mus t be ab le to compu te theloca t ion o f any ver tex , and hence the locationo f any sur face, as i t f i na l ly appears th rough a l lo f t he s t ruc tu re o f th e environment. Moreimpor tan t , we o f ten choose to t reat th eenv i ronment as i f i t were made o f on ly a s ing leobject , speaking of the "object coordinatesys tem" when a more exact te rm would be the"env i ronment coord inate sys tem."

    The in i t ia l genera t ion o f env i ronments andobject descr ipt ions for use wi th h idden-surfacea lg or i th m s can i tse l f be a m ajor task . 1:or thea l g o r i t h ms s u r v e y e d here the object must f i rs t

    be approx imated by a se t o f p lanar faces .Eco nom y lns ,s ts tha t the num ber o f such facesbe min imized, wh i le qua l i ty o f representa t ionins i s t s tha t t he app rox ima t ion rema in fa i t h fu l .T h u s t h e f i r s t task is to choose a set ofap pr ox im at ing faces , a task wh ich remains anar t no t un l ike the ar t o f represent ing objectsw i th pa in t on canvas. O ne may, o f course,av o id th is s tep i f the ob jec t is a l ready p lane-faced or i f some natural representat ion isev iden t .

    Af te r hav ing chosen the set o f f aces w i thwhich to represent the object , one must obtainthe coo rd ina tes o f t he i r vertices. This processcan be done by hand, as shown in Figure 2, byd ig i t i z ing in th ree d imens ions wi th mechan ica lmeasur ing equ ipmen t (F igu re 3 ) ; by d ig i t i z i ngf ro m pa i rs o f two .d imens iona l d rawings orphotographs (F igure 4) ; o r as a d i rec t resu l t o fsome compu ta t i on

    Hav ing obta ined the coord inates o f thever t ices one must nex t connect them togetherin to faces. O m iss ion of a face description w i l lleav e a ho le in the f ina l resu lt . Invers ion o f

    C o m p u t i n g S u r v e y s , V o l. 6 , N o . 1 , M a r c h 1 9 7 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    6/55

    6 I . E . S u t h e r la n d , R . F . S p r o u l l , a n d R . A . S c h u m a c k e r

    Figure 3 Direc t d*gitizationof a three-dimensionalobject.

    the order in which two vert ices are referenced,or erroneous reference wi l l resul t in wi ldd is tor t ion o f the face. Such er rors , as we l l asany errors in vertex posi t ion, must belabor ious ly cor rec ted. T h e process o fde scr ib ing a reasonably complex object, such asthe au tom ob i le o r t he a i r c ra f t shown in F igu re2, can consume s e v e r a l man-days. The t a s k isn o t u n l i k e p r o g r a mmi n g .

    One should be aler t to d i f ferences in thetopo log ica l p rope r t i es o f d i f f e ren t env i ronmentde scr ip t ions Some hidden-surface algor i thm sneed to know wh ich surfaces m eet a t apa r t ,c u la r edge . wh i le o thers make no use o fsuch in fo rm a t ion . S im i la r l y , some make use o fgroupings of faces into objects or c lusters whi leo the rs s im p ly t rea t f aces as i f t hey wered ,s jo in t . Th e d , f f i cu l t y o f bu i l d ingenv i ronmen t mode ls fo r t he a lgo r i t hmsincreases w i th the am ount o f su ch topologicali n fo rma t ion requ i red by the a lgo r i t hm, bu t th ea lgo r i t hm may p ro f i t immense ly f rom the

    qu ic ke r refe rence tha t s u c h add i t iona li n f o r ma t i o n p r o v i d e s .

    T h e a lgo r i thm s surveyed here cap i ta l ize onva r ious p rope r t i es o f t he env i ronment , i f t h ee n v i r o n m e n t is s tat ionary, for example, and aser ies o f p ic tures is be ing made whichs imu la tes an obse rve r mov ing th rough i t . i t i sapp rop r ia te to i nves t a l a rge amoun t o fcom pu t ing i n p repa ra t i on o f t he env i ronmen tbefore star t ing the hidden-surface computat ion.O ne can a f fo rd to F ind , by exhaust ive search i fnecessary, a l l pen etrat ing surfaces, an d , byd i v i d i n g t h e m at the l ines of penetration,e l im ina te pene t ra t i ons f rom any la te rcons ide ra t ion , i f pa r ts o f t he env i ronmen tm o v e w i t h respect to eac h o ther , o r i f on ly asing le p ic ture is desired, su ch computationsm ay no t be wo r thwh i le i f t he env i ronmen t i skno wn to be made on ly o f convex po lygons, o ron ly o f po lygons sm al le r than a cer ta in s ize , o ron ly o f a s ing le s hee t o f connected po lygonsrepresent ing a s ing le va lued func t ion Z -

    C o m p u t i n g S u r v e y s , V o l 6 , N o . 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    7/55

    A C]~aracterization of T en H idden-Su rface Algo rithms 7

    Fig ure 4 Dig i t izat io n o f an obJect us ing two views Th e v iews may be (a) or thog raph ic , or(b) perspective

    Com put ing Surveys, Vol 6, No 1, Mar ch 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    8/55

    I . E . S u th e r la n d , R . F . S p r o u l l, a n d R . A . S c h u m a c k e rF(X ,Y ) , or has any o ther spec ia l p roper tykn ow n in advance , one can use th is p rope r ty toa d v a n t a g e i n s i m p l i f y i n g th e hidden-surfacec o m p u t a t i o n .Environment Complex i t y Def in i t ions

    In o rder to speak quantitatively aboutenvironments, we have developed a number ofs ta t i s t i ca l measu res o f env i ronm en ta lcom p lex i t y . These measu res say some th ingab ou t the nu m be r o f surfaces represented, the i rs ize , the i r o rgan iza t ion in to g roups , and sofo r th . T h e mos t common measu re o fe n v i r o n m e n t c o m p le x i t y is t he n u m b e r o f e dge sinc luded , a measu re wh ich un fo r tuna te ly i samb igu ous . By an edge do we mean thej unc t ion be tween two su r faces , o f wh ich a cubehas twe lve , o r the hne dehmi t ing a su r face , o fwh ich a cube has twen ty - fou r , fou r fo r each o fs ix faces~ W e choose the la t te r de f in i t ion asm o r e w id e l y a p p l ic a b le .

    A face i s a p o lygon, usu a l ly p lana r , boundedby s t ra igh t l ines . A back face is a face thatc a n n o t a p p e a r i n t h e p i c tu r e b y v i r t u e o f b e in gon the s ide o f an ob jec t away f rom theo b s e r v e r. A l g o r i t h m s w h i c h a c c e p t o pe npo ly hed ra ma y no t d is t ingu ish back faces.M os t au th o rs de f ine faces in te rms o f a l is t o ft h e i r vertices or corners , g iv ing each ver tex apo s i t io n in space by a coo rd ina te t r ip le (X,Y,Z).A face usually carries a color or shading rulethat is used to compute its appearance in therender ing should tt be visible. A face may alsocarry a plane equat ion defining the locationand ori ent ati on of the plane of the face. if thecoordinate triples for the vertices of a face andthe numbers describing its plane equationmatch, the face is planar. Some algorithmst o le ra te nonp lana r faces

    A n edge is a st l n ig ht l ine segment connect ingtw o ad jacen t ve rt ices o f a face . T h is de f in i t i onimpl ies tha t the jo in t be tween ad jacent facescon ta ins tw o edges , in some a lgo r i thms the twofaces share a comm on edg e representat ion fo rt h e j o i n t . A contour edge i s an edge tha t fo rmspa r t o f the ou t l i ne o f an object as seen by theobse rve r . A baclc edge i s one tha t cannot appearin the en v i ron m en t be ing rendered because i t

    l ies on the s ide o f an ob jec t away f rom theobse rve r .

    A sur face normal is an outward.pointingvector , normal to the sur face o f the ob jec t .T h e s u r f a c e n o r m a l f o r a f a c e , o r face normal,i s c lose ly re la ted to the p lane equat ion fo r tha tface . T h e su r face no rm a l a t a ve r tex , o r vertexnormal, is sometimes used to betterapproximate curved surfaces by polygonalfaces. Faces which are back faces arei den t i f i ed because the i r face no rma ls po in taw ay f ro m the observer. Back edges andc o n t o u r e d g e s a r e d e t er m in e d b y n o t i c in gwhe the r the faces that share the edge are back.f a c i n g .

    An edge or a face is releuant i f i t su rv ivesa n i n i t i a l c u l l i n g o p e r a ti o n. M o s t o f th ea lg o r i t h m s b e g in b y c u l l i n g o u t b ac k f a ce s o rbac k edg es as we l l as those face s and edges tha tare no t v is ib le because they l ie ou ts ide the areaof the picture or behind the observer.Whatever remains after such a clipping cull isr e l e v a n t .A cluster i s a co l lec t ion o f faces tha t can bet rea te d as a gr ou p fo r som e spec ia l reason.Of ten a c lus ter cons is ts o f a l l those facesbe lon g in g to a s ing le ob ject, bu t a c lus te r m ig h tcons is t o f severa l ob jec ts o r on ly a par t o f as ing le ob jec t . O ne m igh t a lso de f ine a c lus terbased on l im i ted la te ra l ex ten t , ob jec tc o n n e c t i v i t y , o r some othe r p roper ty . Clus terssimplify some of the sorting tasks because thefaces within a cluster need not be treatedsepa ra te ly . T w o c lus te rs a re l inearly separablei f a p lan e can be passed between them.

    An e n v i r o n m e n t i n c l u d e s penetration i f a n yo f th e faces intersect, in rend ering a l ine.d r aw in g image o f a scene w i th pene t ra t ion , thea l g o r i t h m m u s t c o m p u t e a n implied edgerep resen t ing the in te rsec t ion o f the two faces.in a shaded rende r ing o f two pene t ra t ing faces ,a d is co n t in u i t y o f shade w i l l appear to markt h e p e n e t r a t io n .T h e Perspective T r a n s f o r m a t i o n

    A t f i r s t g lance the perspective aspects o f thehidden.surface p rob lem seem ve ry d i f f i cu l t : wemus t cons ide r many " rays " leav ing the

    C o m p u t i n g S u r v e y s , V o l . 6 , N o . 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    9/55

    A C]~aractemzatwnobserve r 's eye a t var iou s ang les , and computew h i c h f a c e s the rays intersect. Such raycom pu ta t i ons m igh t eas il y depend oncom pl icate d t r igon om etr ic re lat ionships, i twould be much easier to do a h idden.surfacecomputa t ion fo r an or thograph ic pro jec t ioninstead of a perspective projection, for in ano r thog raph ic p ro jec t i on a l l o f t he v iewing raysare pa ra l le l , and i f we choose to p lace the Za x i s i n the v iew ing d i rec tion , then the X and Ycoo rdinate s can be those of the screen and th eZ coord inate can be tha t o f depth .

    Remarkably enough, there is a perspect ivepro je c t ion wh ich t rans forms a three.

    B.

    of Ten Hzdden-Surface Algorithms 9dim en sio na l object as v iewed in perspectivei n t o a n o t h e r three-dimensional object whichlooks the same when v iewed or thograph ica l ly ,as can be seen in F igure 5 . T h i st rans format ion , m e f fec t , moves a loca lobse rve r o f f t o i n f i n i t y , and d is to rt s the objectsapprop r ia te l y so tha t they st i l l look the same toh i m . T h e t ransformat ion preserves the f latnessof planes, the straightness of l ines, and theorder ing of objects in depth, so i t is a lwaysposs ib le to app ly the three.dimensionalperspec t i ve t rans fo rma t ion be fo re do ing th eh idden.sur face computa t ion , and thus do theh idden .sur face work w i th para l le l p ro jec tion .

    I I: :o I, . /

    v,

    " ~ X .

    Fi gu re .5 T he perspective transformataon a Th e eye coordinate system, showing' a cube.b T he screen coord inate system, showing the same cube An orth ogra phic pro jec t ion o fth e screen coo rdin ate system on to the display screen produces a correct perspective imageo f the cube (no t ,ce tha t the mo re distant face of the cube ts smaller In th e screencoord ina te sys tem)

    Com put ing Surveys , Vol. 6, No 1 , M arch 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    10/55

    1 0T h e ab i l i t y to use para l le l p rojec tion in the

    h idden-sur face computa t ion great ly s impl i f iesmany computa t ions wh ich wou ld o therwise bequ i te d i f f i c u l t . Because i t i s such a b ig he lp ,we summarize the three-dimensionalperspect ive pro jec t ion aga in here, a l though i thas been known to mathemat ic ians fo r a t leas tone hund red years an d. has be en reportedsevera l t imes in the recent computer l i te ra ture[14, 151 T h e essential idea, again, is to projectX and ) ' in to the i r f ina l Pos i t ions on the screen,and to adJ ust the va lues o f Z so tha t thef latness, s i t a lghtness, and depth orde r ing o f theob jec ts are p leserved.

    T h e comple te t rans form at ioo , f rom thecoord inate sys tem of the env i ronment , th e"obJect coordinate system," to the coordinatesystem in which hidden-surface computationsare done, the "scre en coordinate system," takesplace in two separate t ransformat ions. T h ef i rs t coord inate t rans format ion expresses theloc at io n o f objects r e la t ive to the observer 'seye, in the "eye coordinate system," accountingf o r t h e observer's pos i t ion and d i rec t ion o fv iew . Th e secon d coord inate t rans form at ionexpresses the locat ion of objects re lat ive to thescreen account ing for the ef fects of perspect ivepro jec tm n. Be cau se both t rans format ions arein m a t r i x f o rm they can be applieds imul taneous ly by us ing the product o f the i rm at t i ces.

    T he f i r s t t r ans fo rm a t ion p laces in fo rma t ionin the "eye coordinate system." We th ink of theeye coordinate system as a coordinate systemw i th X to the r igh t and ) ' up as the observersees them, and Z para l le l to the l ine o f s igh tf o r w a r d f r o m th e observer.

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    11/55

    A Character iza t ionim ag ina ry op t i ca l sys tem tha t m igh t be used togenera te the v iew.The t ran sfo rm at io n can also be expressed inte rms o f a coo rdina te sys tem based on thecenter o f the screen ra ther than the observer'seye, a fo rm ula t ion tha t reduces to an ident i tyt rans format ion as the observer 's eye is movedfu r th er and fu r the r f rom the screen, i e ., as thepro jec t ion contains less and less "perspective,"u l t ima te l y reduc ing to an o r thog raph icp ro jec t i on .

    (X s Ys Zs Ws) " (Xe Ye Ze 1) 1 o o0 1 IiiO 0 (4 )

    X s " xslws Ys " yslWs Zs " ZslWswhere d is the distance f rom the observer 's eyeto the screen.

    By representing t h r ee -d tmens iona lcoo rdinates w i th four-component vectors we aref ree to sca le arb i t ra r i l y the four componentsused. T h is nota t ion is called "homogeneouscoord inates" and is exp la ined fu r ther in [14]and [20] T he d iv is ions wh ich subsequentlyconver t f rom the homogeneous coord inates torea l coord inates , o f co urs e, remove anyar b i t ra ry sca le fac tor th a t m ay have been used.

    An or thograph ic pro jec t ion o f the screencoo rd inate sys tem onto a d isp lay screen w i l lno w produce an imag e (se e Figu re 5). inaddi t ion, the "perspect ive depth" Z s computedby the t ran s form at ion can be used by a h idden-su r face a lgo r i t hm to dec ide wh ich faces l i e infr o n t o f others, and hence to compute arend er ing w i th h idden s~rfaces removed.

    T h e v a lu e s o f X s and Ys are directly relatedto th e coordinates that must be given to d isplayha rdware to d i sp lay the po in t o r i g ina l l yrepresented in the object coordinate system as(X o Yo Zo)" By convent ion, we shal l assumet h a t v a l u e s o f X s a n d Y s l y ing be tween - I and*1 a r e t o be mapped on to t he d i sp l ay s c r een : - Ic o r r e s p o n d s t o t h e l ef t ( b o t t o m ) e dg e, a n d , I t othe r i gh t ( t op ) edge . I f . f o r examp le , ou rd i s p l a y r e q u i r e d c o o r d i n a t e s i n t h e r a n g e 0 t o1023 fo r bo th x and y va lues , we com pu te

    o f T e n H i d d e n - S u r f a c e A l g o r i t h m s 115 1 1 . 5 X s , 5 1 1 . 5 a n d 5 1 1 . 5 s, 5 1 1 .5 a s t h e o o r d m a t e s t o g i v e t h e d i s p l a y h a r d w a r e .

    H o w e v e r . t h e p e r s p e c t i v e t r a n s f o r m a t i o nd o e s n o t g u a ra n tee t h a t t h e v a l u e s o f X s an dYs wi l l i ndeed l i e w i th in t he r anges t ha t mapon to the s c re en sur face . The two-s tept ran s fo rm at io n process t rans forms a l l ob jec ts ,wh ethe r they w i l l l ie o f f the screen or beh indthe obs erve r. I t is essentia l that obje cts be"chpped" so those tha t l ie o f f the screen orbeh ind the observer are ehminated f ro mfu r th er considera tion . Th is c lipp ing processmay be per formed a f te r the perspect ivet rans format ion , bu t must be per formed beforethe d iv is ion , because the d iv is ion des troys someessent ia l in form at ion . Th e e ffec t o f thec l i p p i n g o p e r a t i o n i s t o i n s u r e t h a t . w s c x s (.+w s and -w s C Ys ~ +Ws' and thus that thev a l u e s o f X s and gs wi l l l ie wi th in acceptab ler a n g e s .

    T h e c h p p i n g o p e r a t i o n I n vo l ve s s im p l ec o m p u t a t i o n s o n e a c h f a c e ; i t s d i f f i c u l t y g r o w sl i n e a r l y w i t h t h e n u m b e r o f f ac e s. A r a t h e rs i m p l e , f o r m u l a t i o n o f t h e c l i p p i n g p r o c e s s f o rp l a n a r a n d n o n p l a n a r f a c es m a y b e f o u n d i n[203.An essent ia l feature of the perspect ivet rans format ion is tha t l ines and p lanes in theob jec t coord inate s ys tem must t rans form in tol ines and planes in the s cre en coordinatesystem. Th us , a l in e in screen coordinates canbe genera ted by in terpo la t ing l inear ly be tweenthe endpo in ts in scre en coord inates . Theh idden-sur face a lgor i thms make ex tens ive useo f th i s p rope r t y when compar ing the depths o fva r iou s edges or faces in the env ironment.in sum m ary , the screen coord inate systemth at we hav e established preserves the depthrelat ionsh zps o f objects as seen by the observerin th e object coold inate system. Furthermore,th e X s and Ys coordinate values already reflectthe pe lspe ct ive ef fect. F ig ure 6 i l lustrates theconve nience of the s creen coordinate system:The e f fec t ive locat ion o f the observer is a tZs=.Oo, t hus m ak ing a l l r ays f rom the eyep a r a l l e l t o t h e Z s axis.G e o me t r i c Co mp u t a t i o n s

    There a re a number o f geomet r i ccompu ta t i ons tha t appear i n many o f the

    Com puting Survey s, Vol 6, No. 1, M arch 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    12/55

    12 I . E . Su the rland , R . F . SprouU, and R . A . Sc hum ac ke rYs

    Z$

    Fmgure 6 T he hidden-surface computation in the screen coordinate system, Face 3 definesa "shado w b ox" (shown shad ed) Th e box has the same cross-section as the face $, andextend s behind $, away f rom the observer T h e face P, whol ly contained inside theshad ow b ox, is c lear ly h idden by face $

    h idden-su r face a lgor i thms. Th e purpose o fthese computations is to establish relat ionshipsamong po lygons or edges. For example , apar t icu lar tes t po lygon may be compared toothers to decide which, i f any, obscure i t .O bs cu r ing i nvo lves no t on l y l a te ra lcomputa t ions to d iscover i f pa i rs o f Po lygonsov e r la p on the s c ree n , bu t a lso depthcompu ta t i ons to d i scove r i f pa r t o r a l l o f onepo lygon l ies fu r ther f rom the observer thananothe r . Bo th the la tera l and depthcom puta t ions can conven ient ly be performed inscreen coordinates becau se the angu larquest ions which might otherwise compl icate theprocess have be en e l iminated by do ing theperspectwe pro jec t ion f i rs t

    G en era l ly the au thors o f h idden-surfacepapers fa l l to te l l how these computa tions aredone, leav ing the reader to invent h is ownmethods. In t h i s sect ion we out l ine several ofthese methods in the h op e o f a rm ing ourreaders wi th a "bag o f t r icks" wi th wh ich toa t t a c k t h e i r o wn p r o g r a mmi n g t a s k s . T h i sb r i e f co l lec t ion by no m ean s inc ludes a l l th eca lcu la t ions per formed by the h idden.sur facea lgo r i t hm s . M ore in fo rm a t ion can be found inthe sect ion that descr ibes the algor i thms, in th eor ig ina l pape rs , o r i n [ i , I ] .

    Minimax T e s t si f two po lygons do no t ove r lap i n X s or gs '

    then nei ther can possib ly obscure the other (seeF ig u re 7a ) . i f a fas t me thod i s ava i l ab le fo rdetec t ing no over lap , a great man y faces canqu ick l y be p roven i r re levan t to the v i s ib i l i t y o fa g i ve n tes t face. M in i m ax tests prov ide sucha qu ick re jec t ion tes t . i f t he max im um X scoord inate o f a face is less t han the min imumX s coo rd inate o f another face, the two cannotposs ib l y ove r lap i n X~. A s im i la r a rgumen tcan be a pp l ied in the Y s direct ion. Becausethese tes ts are equ iva lent to compar ing them i n i m u m b o u n d i n g r e c ta n g u la r b o x e s f o r t hetw o surfaces, th ey are somet imes calledm i n i m u m b o x t e s t s . T h e r e are, of course, casesw hic h m in im ax tes ts cannot re jec t in wh ich th efaces nevertheless do not over lap (see Figure7b ). A m in im ax test i n Z s can often select th efo rem ost o f tw o surfaces known to ove r lap inX s and Ys"S u r r o u n d i n g Polygons

    A technique that can establ ish there la t ionsh ip between a face and a po in t is thesur r ou nd er tes t (see F igu re 8) . We must de tec t

    C o m p u t i n g S u r v e y s, V o l 6 , N o 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    13/55

    8 ,

    [ . . . .

    III

    I

    A Charactemzatwn of

    b .

    ; - ; , ' 1I L

    i / / ,

    L _ _ _ 2

    C ,a I - -

    L ~ _ / _ _ ~ I

    Figu re 7: Min ,ma x tests for polygon over lap a. M in im axboxes do not overlap, indicat ing that the polygons do notove r lap b Polygons do not over lap even though th emi ni ma x boxes do c Polygons and boxes overlap

    wh ether the edges o f face F sur round the po in tB in X s - Y s in order to determine whether Fm ig h t obscure B. i f the polygon does surroundthe point , a depth compar ison of the point andthe po lygon wi l l te l l whether the po in t isv i s ib le .There are th ree methods fo r comput ings u r r o u n d e d n e s s . If th e p o l y g o n is k n o w n to b ec o n v e x , o n e c a n s u b s ti tu te th e p o i n t l o ca ti o n i nX s - s i n t o th e tw o - d l m e n s i o n a l h n e e q u a ti o n sf o r e a c h o f th e e d g e s , a n d i f th e s i g n s o f a ll

    Ten H~dden-Surface Algorithms 13such subs t i tu t ions are the sam e, the po in t is" ins ide" eve ry e dge, and is thus sur rounded.T h i s t e s t requ,res that the s igns of thecoe f f i c ien ts o f the hne equations be chosencor rec t ly , i f the po lygon is no t convex, twoo the r me thods may be used . T h e f i rs t d rawsany l i ne f rom the po in t t o i n f i n i t y , and coun tsthe num ber o f t ime s the l ine c rosses thepo lyg on b ounda ry , i f the c rossing count iseven, the po in t is ou ts ide the po lygon; i f odd,the Po in t is ins ide T o imp lement th is method,one compu tes whe the r e a ch edge o f t hepo lygo n crosses the seml.inf=ni te test l ine. T h ein te rsec t ion computa t ion is no t d i f f i cu l t , bu t i fa po lygo n ver tex l ies exact ly on the semi.i n f i n i t e test I ,ne, care is required to getconsistent results . T he sec ond method fornonconvex Polygons computes the sum of theangles subtended by eac h of the edges as seenin two-d imens iona l p ro jec t ion f rom the tes tpo in t . Th e sum o f t hes e ang les i s a lwayse i the r 0 o r a mu l t i p le o f 2n . i f t he sum is 0 ,the Po int is outside. I f the sum is 21"I, the pointis ins ide ; i f the sum is ' In or more , the po lygonove r laps i t se l f more than once . i f t he sum is-2n the Po lygon goes around the o ther way.No t i ce tha t t he add i t ion imphed need on ly bedone to 2 bits precision, and so this anglecom pu ta t i on need no t i nvo lve any comp licatedt r ,gono m et ry [ 18]Uses o f Pla ne Equations

    Fig ure 9 i l lus t ra tes a case in wh ich ne i therm i n i m a x n o r s u r r o u n d e r tests can determinethat face B obscures a part of face A.Ho we ver , i f we know the equa t ion o f t he p laneof `4, fo r example :

    a X s + b V s c Z s , d . 0 ( 5 )

    we can ca lcu la te tha t B l ies on th e same s ide o fthe plane ,4 as does the observer, and hencem ust obscure ,4. I f the poin t (Xs,Ys,Z s) is noton the plane ,4, then the s ign of the expressionaXs.bYs,CZs,d w i l l be pos it ive i f the point l ieson one s ide of ,4, and negat ive i f i t l ies on theot he r s ide. W hen we compute the planeequat ion coef f ic ients a, b, c , d, we arrange by

    C o m p u t i n g S u rv e y s , V ol 6 , N o . 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    14/55

    I . E . Su the r land , R . F . Sprou l l , and R . A . Sc humac ke rODD NUMBER (I) I I EVEN NUMBER (Z )OF INTERSECTION S I OF INTERSECTIONSSURROUNDED I I ::> NOT SURROUNDED

    Q ,

    14

    S O U N E O ; _A. T O ; u R R O U N O E D

    Fig ure 8 Su rrou nde r tests Point ,4 is surrounded by polygon F, point B is nm a Th enumber of in tersect ions of the polygon and a semi- in f in i te l ine f rom the point is countedb The sum of the angles subtended by directed &lges of the polygon determines thes u r r o u n d e r c o n d i ti o n

    con ven t ion tha t a p o in t ou ts ide the p lane ( i.e.ou ts ide the obJect o f wh ich the p lane is a face)g ives a pos i t i ve va lue when subs t i tu ted in to th ee q u a t i o n o f t h a t p l a n e .

    T h e p lane equa t ions have o the r impor tan tuses in the h idden-su r face a lgor i thms. Fo rexam p le , the dep th Z s o f a face can beca lcu la ted a t a g iven po in t (Xs,Vs). Thisc o m p u t a t i o n i s used to compare the depths o ftwo faces , and hence to dec ide wh ich one isc loser to the observer , in add i t ion , the vec toro f p lane equat ion coef f lc ,en ts [ a , b , c , d ] is anexpress ion fo r a homogeneous vec tor normal tothe p la n e a n d b y c o n v e n t i o n p o in t i n g o u t w a r df r o m i t. T h i s n o r m a l ca n b e u s e d t o i d e n t if yback faces because the do t p roduct o f then o r m a l a n d a v e c to r i n t h e v i e w in g d i re c t io n

    [ 0 0 I 0 ] is pos i t ive . S im i la r ly , conto ur edgesare ident i f ied because they separa te two faces ,on ly one o f w h ic h i s a back face . Eace no rma lsare a lso used to com pute sh ad ing parameterst 8 , 22 1Computing the Plane Equation

    Because the f i r s t th ree p lane equa t ioncoef f ic ien ts a , b and c represent a vec torno rm a l to the p lane , one can f ind them byk n o w a n g s u ch a n o r m a l . T h e f o u r t hcoe f f i c ien t , d , i s found by knowing a po in t onthe p lane , i f t h ree pomts on a po lygon a rekn ow n no t to be co lhnea r , then a , b and c canbe computed by tak ing the c rossproduct o f thetw o edges be tween such po in ts Because such a

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    15/55

    Z s

    A Characterization of Ten H~dden-Surface Algorzthms 15

    x ,

    OBSERVERFig ur e 9 Use of the p lane equatm n to compute vJstbd ity Face B lies closer to theobs erve r th an does face ,4 Th is is determined by not ic ing that a l l vertices of face B l ie onthe obse rver sade of p lane A Th e p lane equat ion for ,4 is used an th is ca lcu la t ion

    computa t ion requ i res detec t ion o f special cases,we p re fe r a me thod sugges ted by M ar t i nN ew el l . For ver t ices V - (X g i Z=) , thecomponents a, b and c are found as:

    j - ( i f i=n then ! e l se i , I )a - E (Y i - Y j ) ( Z i * Z )b = E ( z i - z J ) ( x C x J )c . 5" (X i -X J ) ( Y i , Y j ) ( 6 )

    Th is me thod requ i res on ly one mu l t i p l i ca t i onper coe f f ic ien t per edge. I f the po lygon is no tp lan ar , th is method w i l l p roduce a p laneequatmn related c losely to the polygon, but notthe bes t - f i t p lane equation .

    I f the equa t ion o f a p lane is known in ob jec tcoordinates, i t can be t ransformed into screencoord ina tes by t rans fo rma t ions ve ry s im i la r t othose used to t ransfo rm points. Th ehomogeneous coordinate notat ion is verycon ven ient in th is reg ard because both pointsand planes are represented wi th fourcomponents.

    intersect ions than wi th face re lat ionships.F ig ure I0 i l lus t ra tes a typ ica l case. a face isde f ine d by f ou r d i rected edges ( the direct ion isby conventton c lockwise when v iewed fromou tsid e an o bject), we a re testing the edge ,4Bto see whether Jt is h idden by th is object . SinceA B a n d C D intersect at I , we can have one ofthre e cases : ,4B m ay be nearer the observerthan the p lane inc lud ing C D (F igure IOa) , andhence be comp letely v is ib le; I can ma rk thed isappearance o f the edge f rom A to B (F igurelob) ; o r I can m ark the appearance o f the edge(F igu re iOc) Th e f i rs t case is ident i f ied byca lcu la t ing the depth o f the face conta in ingC D. by substitutang the X s, Ys coordinates of Iin to the p lane equat ion and compar ing theresul t to the depth at I of the l ine f rom ,4 to B.i f the dep th o f the l ine is less than the depth o fthe face. the l ine cannot be hidden by the face.Otherwise . i f the d i rec ted edge C D subtends ap os it i ve clockwise angle about ,4. the edgeappears , o therwise i t d isappears . Appe l [ I ]ca l l s t h i s the "v o r t i c i t y " o f t he edge C D wi threspect to the point ,4.S e g m e n t C o m p a r i s o n s

    Edge In t ersec t ionsT h e a l g o r i t h m s t h a t c o m p u t e hidden . l ine

    r e n d e r i n g s a r e m o r e c o n c er n ed w i t h e d ge

    The a lgor i thms tha t genera te render ings fo rraster-scan displays suc h as te levis ion moni torsof te n use a c lass of techniques cal led "segmentcompar isons" to solve the hidden.surface

    C o m p u t i n g S u r v e y s , V o l . 6 , N o . 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    16/55

    n ,

    b . A *

    ,

    I . E . Su the r land , R . F . Sprou l l , and R . A . Sc humac ke rD

    C

    A * C * B A *

    0

    C

    G

    D

    16

    o B

    * B

    Figure 10 Comput ing the v l s lb ih ty o f l i ne . The l i ne JiB interr,ec ts the e dge C D at thepo in t I . a Edge CD i s fa r the r f rom the eye than AB. b. C D marks the d isappearance orA B . c . C D marks the appearance of A B.

    prob lem , T he raster d isplays scan f rom top tobot tom, le f t to r igh t , in a f ixed pat te rn . Thealgorithms are designed to generate thecomputed image hne by l ine so that i t can bedisplayed in the same order the results aregenera ted Co m pu t ing the correct image forone scan l ine is considerably simpler thanconsider ing t i le whole image at once: the planeof the scan l ine defines "segments" where i tin tersects faces in the env ironme nt (see FigureI I ) . T h e hidden-surface problem then becomesa prob lem of dec id ing wh ich segments arevis ib le in w hich parts of the scan hne.

    T h e segment compar isons are al l performedin the X s - Z s plane (see Figure 12). T h e dottedl ines div ide the scan l ine into "spans." With ineach span, segment visibi l i ty can be determined

    by co m pa r ing the depths of the segments thatl ie w i th in the span. Depths of segments arecom puted f rom the p lane equation . T h esegment wi th min imum depth is v is ib leth roughou t the span .

    T h e strategy used to select spans Is one ofthe dist inct ive features of the var iousa lgo r it hms . Th e me thod we have shown InF ig ur e 12a uses each segment endp oint to starta ne w span. Fig ure 12b shows a betterdiv is ion of the scan l lne Into spans.S o r t i n g

    Many o f the h idden-sur face a lgor i thms tha twe discuss m ake extensive use of var ious formsof sort ing operat ions. Th is sect ion mentions

    C o m p u t i n g S u r v e y s , V ol 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    17/55

    A Ch a r a c te r iz a t io n o f T e n H id d e n - S u r fa c e A lg o m th m s 17

    / / / /

    P L A N E O F S C A N - L I N E

    " '~ x" ' -JFi gu re I I Segments are determined by the intersection of faces and scan l ines. T he dep thre la t i onsh ips among segments In Xs .Z s plane are used to compute v isibi l i ty

    zs IT I I Iz ,b. | =/ I

    F igu re 12 Compar i son o f segments in the X | - Z s plane, a .Do tted l ines d iv ide the scan l ine in to "spans W i th in eachspan, th e clo se st segme nt is visible b. k span.selectionst rategy that examines fewe r spans to solve the hidden.su r face p ro b lem fo r the scan hne

    br ie f ly the sor t ing techn iques tha t a re re levantto the fur ther d iscussion; for a completedescr ipt ion and analys is of sort ing andsearching methods, the reader is referred toK nu th 's exce l len t book [9 ].

    W he n use d in h idden-surface algor i thms , thesort ing and searching techniques operate onrecords whose "keys" are often geometricqua nt i t ies . For example , we m ight want to sortal l polygons; the k ey for e ac h polygon is them in im um va lue o f t he Z s coordina te o f Itsver t ices . O r we m ay wish to sort edges, usingas key the m i n i mu m v a l u e o f th e Vscoo rd ina tes o f th e two endpolnts.S o r t i n g is an operat ion that orders a set o frecords according to a selected ke y. Th e t im e

    Bu b b l e s o r tShe l l so r tQ u i c k s o r tT r e e s o r tRa d i x s o r t

    req u i red to pe r form the sort depends on thenu m be r o f records to be processed (N) , thea lgo r i t hm used to pe r fo rm the so rt, andvar ious s ta t is t ica l p roper t ies o f the in i t ia lo rd er in g o f th e records . W e sha l l be concernedpr im a r i l y w i th two in i t i a l o rde rings: random,and n ear ly in sor t. Th e fo l lowing tab lesum ma r i zes seve rM so r t i ng a lgo ri thms :N ame K nuth page Time Time(random) (ntarl~ ln sort)

    10 6 N 2 N8't N 312 N114 N log N N ~

    422,451 N log N N1 7 0 N N

    One va r ia t i on o f t he rad ix so r t . wh ich wesha l l ca l l a bucktt sort, chooses the r ad ix o f thesort to be the range of a l l possib le keys. Thus,i f we are sort ing elements on a 10-bi t key f ie ld,we may s imply a l locate 210 buckets: an elementw ith key I is p laced into bucket I . In order tofe tch an e lement f rom the sor ted output o f abucke t sor t , we mu st s can the buckets un t i l anon em pty bucket is found. Since th is searchope ra t i on can be qu i te expensive i f most o f thebuck ets are em pty, one should include the costo f a "p r io r i t y sea rch " ope ra t i on fo l l ow ing abucket sort .

    The prec ise proper t ies of sort ing techniquesm ay be of tremendous importance. So m ere qp ire m ore storage space than others; somelend themselves to fast hardwareimplementat ions more eas i ly than others .A l t h o u g h t h e s e propert ies impact th ep e r f o r ma n c e o f th e hidden-surface algorithms,we shal l not consider them here.

    C o m p u t i n g S u r v e y s , V o l . 6 , N o 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    18/55

    1 8 I . E . Su t he r land , R . F . Spr ou l l ,A search ope ra t i on i s us ed t o i den t i f y exac t ly

    on e e leme nt in a set o f records . For example,we m igh t c ons ide r t he s e t o f a l l po l y gons andwi s h t o s ea rc h f o r t he po l y gon whos e f u r t hes tv e r t ex i s neares t t he v i ewpo in t . I f we a researching f o r a r e c o r d w i t h a m i n i m u m o rm a x i m u m v a l u e o f s om e k ey, a n d i f therec o rds a re a l ready s o r t ed on t ha t k ey , t hen thes earc h m ay be ex t reme ly fas t. I f , on t he o t he rhand , we a re s ea rc h ing f o r a rec o rd w i t h ap a r t i c u l a r k e y ( o r a p a r t i c u l a r p r o p e r t y ) , a n dthe set o f records i s unordered on that key , wem us t ex am ine a l l r eco rds . I n genera l, the costo f s e a r c h i n g a l g o r i t h m s d ep e nd s o n th es t ruc ture o f the set o f records be ing searcheda n d o n t h e n a t u r e o f the key:

    Name Structure of KnutA Timerecords pageSequ ent ,a l un ordered 393 NSeq uent ia l ordered table 393 N I2Bin ary search o rdered tab le 406 log NBin ary t ree o rdered t ree 22 log N

    in some cases, a set of records that iso rde red on a k ey re l a ted t o the k ey we a res ea rc h in g f o r c an c u t t he s ea rch ing t ime .Suppos e po l y gons a re o rde red by dep t h o f t hev e r t ex c los est t o the obs erve r . Th en t he s earchf o r t he po l y g on whos e f u r t hes t v e r t ex isneares t t he obs erv e r need c ons ide r on l y t hef i rs t few Polygons- -as soon as we encounter apo l y gon whos e c l os es t v e r t ex i s f a r t he r f romt he obs erv e r t han t he f a r t hes t v e r t ex a l readylocated, the search may be terminated.

    A cull i s a pa r t i c u l a r f o rm o f s ea rc h : wewis h t o ex t rac t f rom a s e t o f rec o rds a l l t hos et ha t ha v e a g i v e n p ro per t y , e .g ., ex t rac t f rom al is t of edges those edges that intersect a givenedge on the sc reen, i f t he records are sor ted ins ome way t ha t i s re l ev an t t o t he p roper t y , wem a y b e a b l e t o a v o i d e x a m i n i n g a l l o f th erecords in the set .

    A merge adds a new record to some ex is t ingset o f records and preserves any (sor ted)s t ru c t u r e o f t he o r i g i na l se t o f rec ords . Thu s ,m e r g i n g 2 3 i n t o t h e o r d er e d l is t ( I $4 56)s h ou ld y i e l d a l i s t ( I 23 34 56) . Me rg in g iso f t e n a c o m p o n e n t o f s o r t in g a l go r it h m s . T h eper f o rmanc e o f merg ing s t eps i s re l a t ed t o t hes t r u c t u r e o f t h e r e c o r d s a n d t o t h e n u m b e r o f

    a n d R . A . S c h u m a c k e rrec o rds a l ready i n t ha t s t ruc t u re :Name Structure Knut/i page

    Lis t merg e L is t 15gT r e e i n s e r ti o n B i n a r y t re e 4 2 2

    TimeN I2k~N

    C o h e r e n c eT h r o u g h o u t t h i s p a pe r w e u se t he te r m

    c oherenc e t o des c r i be t he ex t en t t o wh i c h t hee n v i r o n m e n t o r t h e p i c t u r e o f i t i s l o ca l lyc ons t an t . J us t as l ase r l i gh t ex h ib i t s ac harac t e r i s t i c c oherenc e l eng t h , a dmanc ew h i c h t h e l i g h t m u s t t r a v e l b e fo r e it i s n olonger poss ib le to pred ic t i t s phase accurate ly ,s o e n v i r o n m e n t s a n d p i c t u r e s e x h i b i t ac oherenc e d i s t anc e , a d i s t anc e ov e r wh i c h onem u s t t r a v e l b e f o r e he can no longer pred ic tw i t h a c c u r a c y w h a t h e w i l l f in d . A ne n v i r o n m e n t i s coherent noc only because i tcons is ts of f lat faces but also because thosefaces re la te to each o ther to form ob jec ts .

    The coherence o f a set o f data can vas t l yinc rease the speed wi th which i t can be sor ted.I f an i n i t i a l l y s o r t ed dec k o f c a rds i s l i gh t l ys h u f f l e d , f o r e x a m p l e , t h e c o h e r e n c e r e m a i n i n gin t he dec k c an be o f g rea t us e i n res o r t i ng i t .S i m i l a r l y t he re l a t i v e l y s low c hanges t ha t t akep lac e i n t he appearanc e o f a p i c t u re f rom onep lac e t o t he nex t c an be o f g rea t he lp I nr e d u c i n g t h e n u m b e r o f s o r t i n g o p e r a t i o n s t h a tm u s t b e a p p l i e d .

    We wa l l l a t e r d i s t i ngu i s h s ev e ra l t y pes o fcoherence to see what proper t ies o f the ob jec tsb e i n g r e n d e r e d e n a b l e t h e r e n d e r i n g a l g o r i t h m st o s av e work . Fo r ex amp le , a rea c oherenc edes c r i bes t he f ac t t ha t many p i c t u res hav eareas i n wh i c h t he s hade does no t c hange v e rymu c h . F ram e- t o . f ram e c oherenc e desc ri bes thef ac t t ha t i n a s equenc e o f mov ie f rames t hesuccessive f ram es are l i ke ly to be c lose lyre l a t ed .

    ! ! i . T A X O N O M Y O F T H E A L G O R I T H M STaxon omy: orderly) classification ofpla nts an d animals according to thtlrpresumed natural relationships.T h e o b j e c t i v e o f t h e re s ea r ch fr o m w h i c h th i spaper g rew was t o c a t egor i z e , c ompare , and

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    19/55

    A Charac ter i za t ion o fcon trast th e m ethods used by ten authors fo rso lv i ng the hidden-surface problem and thus tolearn someth ing fundamenta l about theprob lem . Such a ca tegor iza tion , o r taxonomy,is eas i ly expressed as a t ree w ho se nodesr e p r e s e n t d i f f e r e n t c l a s s e s o f a l g o r i t h m s a n dw h o s e v a r i o u s b r a n c h e s r e p r e s e n t d i s t i n c t i o n sbetween those cl a s s e s. The pa r t i cu la rca tegor iza t ion we have chosen is shown inF igu re 13 .

    T h e root node o f the tree d iv ides thea lgo r i t hms in to th ree classes: t h o s e thatcompute a solut ion to the hidden-surfaceproblem in "object-space' ; those that performcalculat ions in " image-space' ; and those t ha two rk pa r t l y i n each , t he " l l s t -p r i o r it y "a lgo r i thm s. By ca lcu la tions in ob jec t space, wemean tha t computa t ions are per formed toarb i t ra ry prec is ion , usua l ly the prec is ionava i lab le in the computer execut ing thea l g o r i t h m . The a i m o f the solut ion is tocom pute "exa ct ly " wh at the image should be; i twi l l be correct even i f enlarged many t imes.The image-space solut ions are performed wi thless reso lut ion, us ua l ly the resolut,on o f thed isp lay sc reen tha t w i l l u l t ima te l y p resen t animage o f the so lu t ion . The goa l o f thesealgor i thms is s imply to calculate an intensi tyfo r each o f the 250,000 or 1,000,000 resolvabledots on the display screen.

    in oth er words, the obJect-space algor i thm sask wh ether each p otent ia l ly -v is ib le i tem in theenv i ronmen t i s v i s ib le ; the image-spacea lg or i th m s ask wh at is v is ib le w i th in a ras terdot on the screen Th is d i f fe rence in a t t , tude

    OPAQUE OBJECTALGORITHMS

    P . mz - ~

    F i g u r e 1 3. T h e t e n a lg o r i t h m s a r r a n g e d in a t ree .

    T e n H u t d e n - S u r f a c e A l g o r i th m s 1 9p r o d u c e s a c o r r e s p o n d i n g d if f e re n c e i np e r f o r m a n c e : t h e c o s t o f t h e o b j e c t . s p a c ea l g o r i t h m s g r o w s a s a f u n c t io n o f t h ec o m p l e x i t y o f t h e e n v i r o n m e n t , b u t t h e co s t o ft h e i m a g e - s p a c e a l g o r i t h m s i s l im i t ed becauset h e n u m b e r o f s c r e e n d o t s r e m a i n s c o n s t a n t ,i n d e p e n d e n t o f t h e e n v i r o n m e n t c o m p l ex it y .

    C o i n c i d e n t a l l y , t h e r o o t n o d e o f t h e t r e e a ls od i v i d e s t h e a l g o r i t h m s i n t o t h o s e t h a t a r ek i d d e n - l i n e a l g o r i t h m s a n d t h o s e t h a t a r eh i d d e n - s u r f a c e a lgo r i t hms . Th i s d i s t i nc t i on i si n c i d e n t a l t o t h e o b j e c t - s p a c e / i m a g e . s p a c ed i s t i n c t i o n ; o n e c a n i m a g i n e a n o b j e c t . s p a c eh i d d e n - s u r f a c e a l g o r it h m , a n d w e k n o w o f atl e a s t t w o i m a g e - s p a c e h i d d e n . l i n e a l g o r i t h m s ,b o t h d e r i v a t i v e s o f W a r n o c k [ 2 2 ].O b j e c t - S p a c e A l g o r i t h m s

    Among the object-space algor i thms, we canide n t i f y a fu r the r d i v i s ion . A l though a l l o fthese alg or i th m s test re levant edges todete rm ine wha t pa r ts o f the edges are v is ib le ,t he mv t s tb t l i t y c r i t e r i a a r e qu i t e d i f f e r en t , i nt h e R o b e r t s a l g o r it h m , a n e d ge m a y b eo b s c u r e d b y t h e v o l u m e o f a n o b j e c t t h a t l i e sb e t w e e n t h e e d g e a n d t h e v i ew p o i n t. T h ea l g o r i t h m t h u s c a p i t a l i z e s o n t h e s p a t i a lcohe rence o f ob j ec t s : i t t e s t s edges aga ins to b j e c t v o l u m e s .

    T h e a l g o r i t h m s o f A p p e l , L o u t r e l , a n dG a l i m b e r t l a n d M o n t a n a r i . h o w e v e r , te st e d g esa g a i n s t e d g e s . T h e y o b s e r v e t h a t t h e v i s i b i l i t yo f an edge i s cohe ren t , pa r t icu l a r l y a t t hev e r t i c e s t h a t t e r m i n a t e t h e ed g e T h u s , i f t h ev i s i b i l i t y o f one edge i s c a l cu l a t ed , i t c an beused to save calculat ions on other edges thatshare a ve r tex w i th the f i rs t edge. in th is way,most o f the v is ib i l i t y dec is ions becomeincremental calculat ions.

    L. G. Roberts (19 6 3) [15 ]Roberts devised the f i rs t known solut ion tothe h idden-hne prob lem. His a lgor i thm tes ts

    each re le va nt e dge to see i f i t is obstructed bythe vo lu m e occup ied by so m e ob jec t tn theenv i ronment Th is tes t is imp lemented bywr i t i ng a pa ramet r i c equa t ion fo r a l i ne f rom a

    C o mp ut i ng Sur veys , V o l . 6 , N o 1 , M ar c h 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    20/55

    20po in t on the edge to the v iewpo in t:

    P . ( I .c 0 E I ~ g 2 + O i l 0 0 . I 0 30 C e ~ C ! ; 0 c 1 3

    I . E . S u t h e r la n d , R . F . S p r o u l l , a n d R . A . S c h u m a c k e rdg, e.lnt tr$ ctio n Algorithms

    A . ] lppl (1967) [13P . P . L o u t r t l (1967) [10. II](7) R. Ga lOnb tr t i and U . Mon tanar i (1969) [5]

    T h e f i r s t two te rms a re s imp ly the pa ramet r i cequa t ion o f a po in t on the edge E I E 2 in thepersp ect ive coord inate sys tem ; the th i rd is avec to r po in t i ng toward the v iewpo in t i n thepe rsp ec tive space, (0,0,-on).

    This point , P, l ies ins ide a convex object , . f ,i f P is on the " ins ide" o f a l l p lanes tha tcom pr ise the ob jec t. T h is cond it ioncorresponds to:

    P . F i t c 0 fo r a l l l (8)wh e r e F i i i s the p lane equat ion o f the i th faceo f object " j. i f , fo r a g iven object j , values of ccand 13 can be foun d that sat is fy (8), the po inton the e dge corresponding to cc is hidden by theobject .

    T h is edge/object test m ay discover that: I )the edge is ent i re ly h idden by the object ; 2) nopo rt io n o f the edg e is obscured by the object , 3)one pa r t o f the ed ge is no t obscured, o r 4) twopor t i ons o f t he edge a re not obscu red . Anyunobscured port ions are then tested against therem a in in g ob jects .

    T h e a l g o r i t h m u se s a v a r i e t y o f techniquest o so l ve (8 ) f o r m in im um and m ax im um va luesof c~. Roberts made very ef fect ive use of themin imax tes t , e l iminat ing who le co l lec t ions o fobjects f rom compar ison against other objectswhen the i r bound ing boxes d id no t ove r lap , i ft h e s i mp l e m i n i ma x t e s t s f a i l, l in e a rprogramming techn iques are requ i red to so lve( 8 ) .

    The a lgor i thm severe ly res t r ic ts theenv i ronment : the volume test requires thatob jec ts be convex. A l tho ugh conca ve ob jec tscan be represented by a collection of convexones, comput ing a useful decomposi t ion is ad i f f i c u l t t ask. Th e compu ta t ion requ i red bythe Ro ber ts a lg or i th m grows rough ly as thesquare o f the number o f ob jec ts in the scene:each edge of a body m ust be tested againstev ery ob jec t in the scene.

    Th e a lgo r i t hm o f Appe l exemp l if ies a c lassof h idden- l ine a lgor i thms tha t compute l inedrawings. Appe l de f ines the quantitatlueinz, isibdity of a po in t as the number o fre lev an t faces tha t l ie be tween the po in t andt h e v i e wp o i n t . T h e solution to the hidden-l inep rob lem requ i res compu t ing the quan t i t a t i vei n v i s i b i l i t y o f e v e r y p o in t o n e a c h r e le v a n tedge.

    App e l 's a lg or i th m uses "edge coherence" tol imi t the comput ing requ i rement : thequ an t i t a t i v e i nv i s ib i l i t y o f a re levan t edge canchange on ly where the pro jec t ion o f tha t edgei n t o the pictu re p lane crosses the project ion ofsome contour edge. At such an intersect ion, thequ an t i t a t i v e i nv i s ib i l i t y i ncreases o r dec reasesby I . A f te r a l l con tou r edges have beenconsidered, the re leva nt edg e has been div idedby the in tersec t ions in to a number o f segments .i f t h e q u a n t i t a t iv e i n v i s i b i l i t y o f t he i n i t ia lve r tex o f t he edge i s known , the v i s ib i l i t y o feach segment can be calculated by summingthe qu an t i t a t i ve i nv i s ib i l i t y changes ( see F igu re14)T h e q u a n t i t a t i v e i n v i s i b i l i t y o f th e i n i t i a lve r tex is ca lcu la ted by an exh aust ive search o fa l l re lev an t faces to count how m any faces hidet h e v e r t e x . T h e hiding condi t ion has two parts:i ) the l ine o f s igh t to a ver tex intersec ts thep lane o f t he face be tween th e v iewpoin t andthe vertex, and 2) the po,nt of intersect ion l ies" ins ide " the po lygona l f ace.

    The ca lcu la t i ons o f t he i n i t i a l andinc rem en ta l l nv i s ib l l i t i es de te rmine th eq u a n t i t a t i v e i n v i s i b i l i t y o f t he f i n a l v e rt ex o fthe edge , wh ich can be used to determine thei n i t i a l i n v i s i b i l i t y o f o t h e r e d g e s e man atin gf ro m tha t ve r tex . Th is , t oo, i s a fo rm o fcoherence, fo r i t o f ten sav es the exhaust ivesea rch to de te rmine the quan t i ta t i ve i nv i s ib i l i t yo f an in i t ia l ver tex , in genera l , the exhaustivesea rch w i l l be pe r fo rmed on ly once fo r eachc lus ter . For these a lgor i thms we def ine a"c lus ter " as a co l lec t ion o f faces and edges that

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    21/55

    A Characterizat ion of Ten Hidden-Surface Algori thms

    J \ - - I

    /~.f = 0 ~

    Fmgure 14 C om puta t,on of the quantita tive lnvlsmbill ty (X) of a relevant edge Th emvis mbil,t y of the initmal ve rtex, ~'m' Js computed The quant i ta t ive Invisib ihty on the edgechanges only where images of contour edges intersect the image of the relev ant edge andthe contour edges are closer to the vRwpoint than the relevant edge The i nv is ib i l i ty o fthe fin al vertex , >,p is used as the Init ial Invisib i l i ty of other edges eman ating from thever tex.

    2 1

    requires only one exhaust ive search to computethe quant i ta t ive inv is ib i l i t y o f a s tar t ing po in tf ro m which inv is ib i l i t y may be promoted a longa network of edges.

    A correct ion must be appl ied to thequa nt i ta t iv e inv is ib i l i t y o f a ver tex todetermine the quant i ta t ive inv is ib i l i t y o f thestar t ing point of an edge beginning at th ever tex (see Fmgure 15). Th e compl ication arisesbecause faces that intersect the vertex may hidesome relevant edge emanat ing f rom the vertex.T h is "mnvis lb ihty correct ion" requires testingthe edge against only those faces that intersectth e ver tex .

    The implementat ion of these ideas var iesam on g the thre e edge-intersection algorithmswe studRd. Appel , who was the f i rs t to proposethis scheme, defined the terms quantitatiueinvisibility, con tour ed ge , and material edge( e q u w a l e n t t o o u r d e f i n i t io n o f r e le v a n t e d ge ).Hms method of intersecting relevant andcontour edges in object coordinates isnoteworthy: a contour edge wi l l change thevis ib i l i ty of a re levant edge i f i t p ierces thet r iang le fo rmed by the v iewpoin t and th evertmces of the releva nt edge as shown inFigure 16. The test which determines that th epie rc in g point l ies wi th in the t r iangle is calleduor t i c i t y , it measures the direction (clockwise orcoun ter-cloc kw ise) of the three directed edges ofthe t r iangle re lat ive to the pierc ing point , i f a l ld i rec t ions are the same , the pierc ing point l ies

    w ith in the t r ian gle and hence changes thequa nt i ta t iv e inv isab i l it y o f the re levant edge; i fnot , the contour edge has no ef fect on th ev is ibd i ty o f the re levant edge. I f anintersection is located, the change in thequ an t i ta t w e inv is ib i l i t y is e i ther *1 or - I ; thesign is determined f rom the s ign of the crossproduct of the contour edge vector and therelevant edge vector. Thas is a very quick testthat depends on al l faces being drawn in aconsisten t dire ction (e.g., clockwise) as viewedfrom outs ide the object .

    Loutre l 's approach is very s imi lar to that ofAppeh h is te rm "order o f inv is ib i l i t y " isequ iva lent to quant i ta t ive inv is ib i l i t y ; h is te rm"boundary edge" is equivalent to contour edge.Lo ut re l computes intersections of edge s byproject ing edges onto the picture p lane andcomput ing intersect ions in a two.dimensionalspace. If an intersection is found, the depths ofthe two edges are compared at that s p o t tOdecide which edge hides the other.*

    The app roach o f Ga l imber t i and Mon tana r iis s imi lar to Appel 's and Loutre l 's , but ratherthan comput ing the number o f faces h id ing apoint , they compute the set of faces hid ing apo in t , wh ich they ca l l the nature of the point .The methods o f de termin ing the nature o f anin i t ia l ver tex, the inv is ib i l i ty correct ion, and

    * Thes e calculataons would be greatly sim plif ied ifperf orm ed in the perspective coordinate system. None ofthe th ree algorith ms, how ever, did so.

    C omput i ng Sur veys , V o l . 6 , N o . 1 , M ar ch 1974

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    22/55

    22 I . E . S u t h e r la n d , R . F . S p r o u l l , a n d R . A . S c h u m a c k e r

    \

    ///

    w w B A C K E D G E S. . . . . H ID DE N R E L E V A N T E D G E S

    V I S IB L E R E L E V A N T E D G E SFigure 15 invlslbdl ty correct,on Two of the four e d g e s emanating from v e r t e x V a r ehidde n by a face of the polyhedron, even though ver tex V is not obscured.

    F igure 16 Appe l ' s tes t for in tersect ion of two edges is per formed by tes t ing one edgea g a i n s t t h e t r i ang le fo rmed by t h e e y e point and the other edge. i f the test edge piercest h i s t r i a n g l e , a s s h o w n , i t not only c r o s s e s the othe r edge In t h e v i e w i n g plane, but Is knownto obscure I t .

    t h e i n c r e m e n t a l i n v i s i b i l i t y c h a n g e s a r e s i m i l a rt o t h o s e o f L o u t r e l , w i t h t h e a d d e d c o m p l e x i tyo f c o m p u t i n g a s et o f o b s c u r i n g fa ce s. E a c he d g e h a s a n a s s o c i a t e d se t o f , a t m o s t , t w o

    r e l e v a n t f a c e s t h a t t h e e d g e se p a ra t es . F o re x a m p l e , i f t h e n a t u r e s et a t a p o i n t o f a n e d g eis { . . . cc .. . } , an d th e ed g e im ag e c r o sses an o th e red g e wh o s e fac e se t i s {c x,t3} , l e . , th e ed g e

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    23/55

    A Characterization ofbetween faces cx and /3, the nature of them o v in g po int changes to { ... 13 ... }. W heneverthe set is empty, the point is v is ib le.

    Each o f these th ree a lgor i thms locates a l lin terse ct ions along a re leva nt edge, and then,a l th ou gh none o f the papers mentions i t , mustsort the intersect ions in order of theiroccu rrence along the edge in orde r to establ ishthe qu an t i t a t i ve i n v i s ib i l i t y o f a l l poin ts on theedge . H ow ev er, in certa in instances, the sortcan be avo ided by not ic ing tha t theq u a n t i t a t i v e i n v i s i b i l i t y o f t h e i n i t i a l v e r t e x i sso high that there are not enough intersect ionsto m ake any p or t ion o f the edge v is ib le , in th iscase , t he quan t i t a t i ve i nv i s ib i l i t y o f t he f i na lver tex can be computed qu ick ly as the sum ofthe quan t i t a t i ve i nv i s ib i l i t y a t t he i n i t i a l ve r texand a l l the incremen ta l changes T he set no t iono f G ah m be r t i and Mo n tana r i does no t seem tobe amenable to omi t t ing the sor t wi th in anedge.

    A num be r o f unp leasant s ingu lar i ties canoccur w h ich requ i re care fu l a tten t ion tocomp u te the i n v i s ib i l i t y co rrec tl y (F igu re i ? ).G ah m be r t i and Mon tana r i have encounte redthese problems and report ad hoc solut ions inthe i r paper ; the o ther au thors make l i t t lem en t ion of them.

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    24/55

    24 I . E . S u th e r la n d , R . F . S p r o u l l ,commercially available in hardware from theEva ns and Su the r land Com pu te r Corpo ra ti on .

    T he most recent a lgor i thm, tha t o f N ewel l e ta l o f the Computer A ided Des ign Cent re ,C am br idg e, Eng land, resem bles m os t c lose lytha t o f $chum acker ; th~s e two are there foreclassed together in the t ree. i t appears that theNewel l g roup const ruc ted the i r a lgor i thmwi thout any knowledge o f the deta i ls o fSchum acker 's w ork . T he reasons fo r c lass ify ingthese tw o alg or i th m s together is, as we shal l seebe low, bas ed on a technica l s im i la r i ty ra therthan any detectable h istor ical inf luence.

    Th e d i s t i nc t ion be tw een image .space andhs t -p rm n ty a lgo r ,thms conce rns the way inwh ich the u l t ima te v i s ib i l i t y o f a su rface i scompu ted in the image.space algor i thms, thev i s i b i l i t y tes t is Postponed unti l last, and comesabout as a computa t ion o f the depth o f theva r io us surfaces tha t wou ld be Penetrated by av iewing ray a t a pa r t i cu la r po in t i n the image .Thus, these a lgor i thms can cap i ta l ize on thela te ra l separa t ,on o f the image to reduce thenu m be r o f depth computat ions requ ired. Thehs t -p r io r l t y a lgo r i t hms o f Schumacker andNewel l , on the o ther hand, precompute inob jec t-space a v is ,b ih ty order ing or "p r io r i ty "for a l l sur faces before generat ing the picture inimage-space. The pr io r i ty o f a sur face can beexpressed as a l inea r -order ing o f the surfacessuch tha t i f ever two surfaces need becompared fo r v i s ib i l i t y , t he one w i th the h ighe rp r io r i t y i s t he v i s ib le one.

    Th e l i s t -p r i o r i t y a lgo r i thms a re p lacedbetween the object-space algor i thms and theimage-space alg or i th m s because they func t ionpa r t l y i n each space . The a lgo ri thms haveobject-space charac ter be ca us e the depthove r lap ca l cu la t i ons a re pe r fo rmed w i th h ighprec is ion. T h e ir image-space character comesabo ut on ly because o f the f in i te reso lu tion o fthe ou tpu t me d ium ava i lab le . Were an ou tpu tdev ice ava i lab le wh ich cou ld pa in t a sequenceof po lygons to arb , t ra ry reso lu t ion , leav ingvis ib le at any place only the last paintedpo lygon, then these a lgor i thms cou ld beconsidered object-space algor i thms. Becausesuch a dev ice is no t ava i lab le , the output s tepof these a lgor i thms takes on much o f thecha rac ter o f the Image-space a lgor ithms.

    a n d R . A . S c h u m a c k e rL is t -Pr io r i ty / l lgor i t~ras

    T h e d i f fe rence between the $chumacker andthe N ew el l a lgo r , thms concerns the manner inwh i c h t h e l i s t - p r i o r i t y i s c o mp u t e d . T h eSchumacker a lgo r i t hm pe r fo rms mos t o f t hep r i o r i ty ca lcu la t ions "o f f - l ine , " occasiona lly w i thhuman in tervent ion . Schumacker 's p r io r i ty l i s ti s p r imar i l y a p rope r t y o f t he env i ronmen t anddoes not depend very much on the locat ion ofth e v i e wp o i n t .

    A l though the inves tmen t i n compu t ing th epr io r i ty hs t f rom the env i ronment descr ip t ionis q u i t e h i g h , v i r t u a l l y t he same hst can beused to generate many , m any frames. T hi sapp roach i s pa r t i cu la r l y conven ien t f o r f l i gh ts imu la t i on , where the env i ronmen t ra re l ychanges, a l thou gh the v iewp oin t changes qu i tef req ue nt ly . The Schumacker a lgor i thm takesadvan tage o f t he env i ronmen ts usua l lyemp loyed in f l i gh t s imu la t i on to l im i t t hetopo logy o f t he env ironmen t : on l yenv i ron m en ts w i th convex faces and li nea r l ysep arab le c lusters ' are a l lowed.

    The Newe l l a lgo r i t hm, on the o the r hand ,compu tes a p r io r i t y l i s t f r om the env i ronmen tdes cr ip t ion before processing each frame. T h i sapp roac h very conveme nt ly accommodateschang ing env i ronments . In add i t ion , Newel l ' spr io r i ty computa t ion makes no res t r ic t ions onthe topo log ica l complex i ty o f the env i ronment .

    An o the r imp or tan t d i ff e rence be tween th ea lgo r i t hms conce rns clustering. Schumackerobse rved that t he compu ta t i on o f p r i o r i t y needno t compare eve ry face in the env i ronmen twi th every o ther face to determine the order o ffaces in the pr io r i ty l i s t Rather , th eenv i ronmen t i s d i v ided in to c lus te rs . Wi th in aclus ter , each face is compared w i th ev ery otherface in the c lus ter to compute a face pr ior i ty .I f the image consists of only one c luster , thenthe pr io r i ty computa t ions are comple te , i f ,however , the env i ronment conta ins severa lc lus ters , the a lgor i thm computes th e re la t ivep r i o r i t i e s o f the clusters, the c l ,s ter pr ior i ty .Clus ter p r io r i ty thus re la tes ent i re ob jec ts - i fob jec t A is nearer to the v iewpoin t than ob jec tB, c lear ly a l l faces o f obJect A take pr io r i tyover a l l faces o f ob jec t B . Th is observat ionfa i ls whe n obJects A and B penetrate or

    C o m p u t i n g S u r v e y s , V o l 6 , N o 1 , M a r c h 1 9 74

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    25/55

    A Ch a r a c te r iz a ti o n o f T e n H id d e n - S u r fa c e A lg o r i t h m s 2 5in t e r tw in e i n a com plex f a sh io n , i. e ., when t heya r e n o t l i n e a r l y s e p a r a b l e .

    T h e r e m a r k a b l e t h i n g a b o u t t h es e c lu s te r s tst h a t w i t h i n a c l u st e r t h e p r i o r it y o f fa c e s c a nb e d e t e r m i n e d i n d e p e n d e n t o f t h e v ie w p o in t .T h u s t h e p r i o r , t y w i t h i n a c l u s t e r c a n b ed e t e r m i n e d o n c e f o r a l l t i m e a n d n e e d n o t b er e c o m p u t e d a s the v i e w p o i n t changes. P r i o r i t ywi th in a c lu s t e r c an be i ndependen t o fv i e w p o i n t b e c a u s e a d i f fe r e n t s et o f b a c k f ac e sw i ll b e r e m o v e d f r o m t h e p r i o r i ty l is t f o r e a c hv i e w p o i n t , a n d t h o s e w h i c h r e m a i n w i l l a s s u m et h e p r o p e r p r i o r i t y o r d e r ( e x p e r i m e n t w i t hF i g u r e 1 8 ) .

    i t .2

    2

    II

    II

    b , III2 1r /

    F i g u r e 1 8 F a c e p r i o r it y , a T o p v i e w o f a n o b je c t w i t h f a c ep r i o r i t y n u m b e r s a s s i g n e d ( t h e l o w e st n u m b e r correspondst o t h e h z g h e s t p r i o r i t y ) b T h e s a m e o b j e c t w i t h a s p e c i f icv i e w p o i n t l o c a te d T h e d a s h e d l i n es s h o w b a c k f ac e s. F a c eI t a k e s p r i o r i t y o v e r f a c e 2 .

    T he p r io r i t y i ndex compu ted by Schumackercan be v iewed as a number wi th in teger andf rac t i ona l pa r t s , cluster , face. The face .p r lo r i t yca lcu la t ion is a proper ty o f the topo logy o f thec lus ter and does not depend in any way on theloca t ion o f t he v iewpo in t . The c lus te r .p r lo r i t ycomputa t ion , on the o ther hand, i$ de terminedby i so l a t i ng c lu s t e r s w i th s epa ra t i ng p l anesd e f i n e d a s p a r t o f t h e d a t a b a s e . A s t h ev i e w p o i n t m o v e s , c l u s t e r p r i o r i t y d e p e n d s o nt h e l o c a t i o n o f t h e v i e w p o i n t r e l a ti v e t o t h es e p a r a t m g p l a n e s

    C a l c u l a t i n g c l u s te r a n d f a c e p r i or i ti e si n d e p e n d e n t l y d r a s t i c a l l y r e d u c e s t h e a m o u n t o fc o m p u t a t i o n . I n o t h e r w o r d s , t h e S c h u m a c k e ra lg or i th m cap i ta l izes on c lus ter coherence. T h eNewel l a lgor i thm puts fewer res t r ic t ions on theenv i ronmen t by no t t ak ing advan tage o f thiscoherence.

    R . A . Schumacker , B. B r a n d , M. Gl l l l land ,W . S h a rp (19 6 9 ) [6 , 7, 17, '24]

    T he m a jo r con t r ibu t i ons o f t he Schumackerwork, as we have already ment ioned, are th ep r i o r i t y c o mp u ta t io n s b a s e d l a rg e ly o ntopo log ica l p roper t ies o f the env i ronment , thusu t i l i z i ng f rame- to - f rame coherence , and theclu ste r coherence techniques, in this section, wesha l l descr ibe in more deta i l the face-pr io r i tycom puta t ion w i th in a c lus ter, the c lus ter -pr io r i ty computa t ions , and the ac tua lgen era t ion o f the =mage in rea l .t ime .

    The no t ion tha t f ace p r io r i t y w i th in acluster can be computed independent of thev ie w po in t is ex t rem ely im por tant . Cons=der thetop v ie w o f an ob jec t, as show n in F igure 18.i f , f o r any v iewpo in t , we e l im ina te the backfaces (re lat ive to that v=ewpoint) , the numbersassigned to each face in the f ig ur e are thep r io r i t y numbers. A cluster is a col lection offaces th at can be assigned a f ixe d set ofp r io r i t y numbers wh ich , a f te r back edges a reremoved , p rov ide co r rec t p r i o r i t y f rom anyv i e wp o i n t .

    The compu ta t i on o f f ace p r io r i t y requ i rescom pu t ing whe the r face R can , f rom anyv iewpoin t , h ide face B. I f so , face A hasp r i o r i ty ov er face B. These computa tions arepe r form ed for a l l fa ces o f a clus ter, and a

    C o m p u t i n g S u r v e y s , V o l 6 , N o . 1 , M a r c h 1 97 4

  • 7/28/2019 Ivan Sutherland_Characterization of Ten Hidden-Surface Algorithms [1974]

    26/55

    2 6 I . E . S u th e r la n d , R . F . S p r o u ll , a n d R . A . S c h u m a c k erpr ior i ty graph is constructed, i f there are anycircu i ts in the grap h (e.g. , face A has pr ior i tyover face B, and face B has pr ior i ty over faceA), the faces cannot be assigned priori t ies thatw il