Sol Mod 2

You might also like

Download as pdf
Download as pdf
You are on page 1of 58
MODULE 1 What is Computer Graphics? Explain the application of Computer Graphics. > Explain the operation of video monitors based on standard CRT design->'5 Differentiate raster scan displays and random scan displays. -5 = Explain the following > 38 a) Color CRT Monitors b) Flat panel Displays Explain the Architecture of a simple raster graphics system and a raster graphics system with a display processor. > th Explain the input devices. > 16 Explain the display window management using GLUT. —> 20 What is coordinate reference frames, screen coordinates, absolute and relative coordinates? >2 | 9. Explain the OpenGL functions for point and line. —» 22 10.Explain the DDA line drawing algorithm. —> 26 11. Explain the Bresenham’s Line drawing algorithm. —y 27 12. Explain the Bresenham's Midpoint circle drawing algorithm 73 3 13, Explain the Point attribute functions. » 35 14.List the OpenGL line attribute functions -» 36 15. List and explain OpenGL point and line primitive with example —> 38 16.Explain Cathode Ray Tube with diagram. — 40 17.With a neat diagram, explain Refresh Cathode Ray tubes 3 42 48. Implement an OpenGL program for Bresenham's line drawing algorithm. —> 44 19. Write short note on basic OpenGL syntax >) 5! 20.Explain properties of circle —> SQ 21.Implement midpoint circle draw in OpenGL —> 93 22.lmplement an OpenGL program to display points and lines along with its attribute functions included. —> 55° 23.Write Bresenham's line drawing Algorithm for |m| < 1.0 .Digitalize the line with endpoints (20,10) (3018) Fe oid. 24,Given a circle with radius=10 demonstrate the midpoint circle algorithm by determining positions along circle octant with first Quadrant from x=0 to x=y(Assume circle center is positioned at origin). 54 25.Apply Bresenham’s Line drawing algorithm for the given end points a)(20,20) and (40, 28) b)(0,0) to (5,4) ) (0,0) to (5,6) > el ReENS a exe MODULE 2 26.With neat diagram, explain the two commonly used algorithms for identifying interior areas of a plane figure. > 63 27. Explain two dimensional viewing transformation pipeline. —> 66 28. Show that successive scaling is muttipiicative. —» 64 29. Show that successive translations are additive. —> -\ 30. Design a polygon ABC ~ A(3,2), B(6,2) & C(6,6) rotate in anticlockwise direction by 30 degree by keeping C fixed. -» 43 31.What are world coordinates and view port coordinates? Explain 2D viewing transformation pipeline. —> 7! 32. Explain the scar-line polygon fill algorithm. 5 4 5” 33.Demonstrate Reflection of an object w.r:t the straight ine y=x > 44 34. Explain the reflection and shearing. —) @0 35.Explain with example vector method for splitting a polygon > 2h 36. Describe OpenGL polygon fill area function with example —» 93 37.Write a note on a. fill style b. color blended fill region —> 24 38.Write a OpenGL program to rotate a triangle using composite matrix calculation. —> 4! 39.What are homogeneous coordinates? Write the matrix representation for translation, rotation and scaling. 342 40.What is raster operation? Explain the raster methods for geometric transformation. —) 9 4 41.Write a note on a. OpenGL fillpattern function. b. OpenGL texture and interpolation pattern. c. OpenGL wire frame methods. d. OpenGL front face function. > 16 42. Explain the composite 2D translation, Rotation and scaling. —) 48 43.Explain the 2D OpenGL geometric transformations. —> 100 44. Write the steps for rotation about pivot point and scaling about fixed point. —> 10 > 45. Briefly explain Inverse transformation, composite transformation. —5 (0} 46.Explain the OpenGL matrix operations and Matrix stacks. > 19 8 47.Explain the OpenGL 2D viewing functions. —> 104 48. Translate a square with the following coordinate by 2units in both directions > 4 11 A(0,0),B(2,0),C(2,2),D(0,2) 49. Rotate a triangle at A(0,0),8(6,0),C(3,3) by 90degrre about origin and fixed point (3,3) both —> 142 Anticlockwise and clockwise direction. 50. What are the polygon classifications? How to identify a convex polygon? Illustrate how to split a Concave polygon. arers 51.What is stitching effect? How does OpenGL deals with it. 3 21 4 MODULE 3 52.Imagine a 3 D cube object with rotation axis projected onto the Z-axis defined by the vector u. Rotate it and find the final rotation matrix R. Show all the 5 steps involved in it with 7 series of operations. 5 114 53.Demonstrate the 3D Translation and Reflection with Homogenous coordinates. —> | 22 54.Demonstrate the 3D Scaling and Shearing with Homogenous coordinates. > 124 55.Explain the ambient light, diffuse reflection and specular reflection with equations. > 126 56.Explain OpenGL 3D Viewing Functions. -> \24 57.Imagine you have a 3D object in front of you. Illustrate how to Normalize the transformation for an Orthogonal Projection? —5 131 58.What is clipping and clipping window. > 133 59. Map the clipping window into a normalized viewport. —> 138 60.Explain specular refection. > 142 61. Explain the 3D coordinate axis-Rotation —> 443 62. Map the clipping window into a Normalized square. —> 14S” 63. Explain the Cohen-Sutherland line-clipping algorithm. —> 144 64. With neat diagram, illustrate Sutherland-Hodgeman polygon clipping algorithm. —> 15 2 65.What is quaternion? Explain the quaternion methods for 3D rotations. —> 156 ‘Shankar R Asst Prior, CSE BST B® ath weak crags ,explain Hu. $80 tommandy ted orton fer Hedendilping ake Guar Sf plore fqn = Dhar ar hoo dep of bak D Grosseng bot) eda Coen beh WW Wendiing Rinmber Luk. 4) Odd- boa chub: SS ee eS The hut us most Leeda rad Yor Mrarpng Until ~ Bubscde deucscont . ; > Darousing o uine fron Petibtion “PT oo ar cuirtont port oubtide Ha le-erdinak exbods te ose Potylins = Count Hie nunbu of ding - Segrnunt bcossengs akong thin dint dy He wombu of Ataneartls teatscd. by tthes Liv ua Odd RP wa Lonkidvud cho be untucict point DOMsinia PU Cri. lave, P, crrocser Pedats, lunw eubctde Or- exterior Py Gwtsu J edge hener uinkenis [lade Q Winding Waunmbe dk [Non- Tino Senduing number SuLJ Phir Leak Jil Bu Complete Abas dathurttou atin Pavion dlok ‘Jo umbenuct ches hud, Wwe — Housing te eh en m 4& he “a ae ey dix cubcon . ee Cany wrth Wt Suadh the Abossbing pork Lobdlbing ee dau, Rumbs vu bck ko 30. = Winding huumbu ,Lsrich Loud He numbey of a portivular point uin Leura Wotkurice disection p> Cote chalks, OS tut Bt add 4 to tuindowing Wumbu Ushin ut ontoueds o degree thot vroces de dine un Chockwise direction Conk Counker axhi- Nokusicee as -t nagohive . my windowing Ruumbu da Ron-2er0, Pra dnteniek 4 Lxtind saveng Rumbu a 20s, Pa Sxtouet, $A points musk (Seas s fg act vodtus, fa 1: Pr DP Uo 9 echges, (ek wa porn Ma hk to def Pye ettle 9 (dace) rom vakes Py bo Uae Pye -(-1 2-9 Learide from Cuber P, to Aight. 3Py = brogser 1 tdige Ypom right to Jue Pye tt Citic) DP, = Nosu 3 edges - a e~lelel Pex | Lermrdy) : i. i ae Cimrnional Seane Had vis Pay vo albedo Uppeng window eoetaue obb park of the dens cube the (liked Bertisn ay “chipped "off. Jue mapping | a clivo-dinenAional weld to.obiat Avan Auiodsgtion fo dure, Lo-stdhinaty da Calls & tuo. dimerional Liaving arora) oriratbion , fomeims Hi dronjermation is Stupiy Auf esid to O4 Khe Lindos to Lleopat hronspotumactin, o4 window cKrosnalorrnochion Onu ute Weld - Loerdineta Slane has dour Const tee Leuld doh wb a sports 2D ewsing Woetding, Paforence oars {er Sprrifying He Apping Lktndoi | Urturtng Ceerdiraty yer on appliccdiv aus the Aame OL weld Werdinatze Jo mate the iting Protus Unde pendent of the Nay tents a any sukput duuics , Qaphics dysteny torouk det ect dusuripbion do netumatiad Wicinatr wh dhe Range from Oto l,and Shou We Mange pom Clo |. Pepencting upon the graphic Libres sin tur, He OLooport du dufirad eittr in Roumalived to-adinak phin Lown Leordc acky Step of He rewing hranijounation, the wondent of {ou Uleaspout aur thors}oud fo petition within the duaploy Window - 2B. > Show that —gucconte Aang Sa a MLSS To alten tte she 4 an object , we opty a toliveg trounstewation. A abwple hoo dimenstonal Sealing obersctlon Dn performed by maddiplitng- object pottery (x,y) by Atodinng. jpetors In and gy fy produce the trandormed — coordinates C2x1,4")s Ws Tbe, ys Yy Seding — fpotoh ay,» ender ain object th the 7 abled while fy Aaler in y divection, Bote two -dumentional dealing equations ar. written de LG] a) Pe se where Sj ana soalng modi, * Any postive valuss can be autiynel ty calling Jocks fx ond Sy. # Values fon Bron 1 sade te che of objecta. x» Voluws thon 4 produce entas A * Spocibying 0 volt of 4 ten both fr and fy fear the tie ca objects unchanged. # When “gx gad Sry 990 ONtlgned Jawa value + Unitoinn Fook Fret values hf 9nd Ay > ditt obi ¥ Tn foe syttiws, negetione Vous aun also be Ape cifted te Abe scaling — posownetimss This not Sepizer on ebject, % Seftec Me lot ole ot mote GH co-ordtinala axes. Riyae bio Manhole setig of a Sina by airing vale OS ty bath ke and A¢ a Kt oe F Plead edits coteling the tecbton che tel ae choosing o position. for a coendinali. pottion(nxsy) , soled coord hate (n'y) ed RN ap (Hm Hp) fog 7 Y-ye= dey We mn gawrte — eval as, a a by + 494 - bn) pe and via y' = hy We b-ky) ane (a steed pit tohese og. AdMHve terms %¢ (1~-$ne) & qelt-Ag) ore comforts — deh ol polis Sn Me olyect. G4. Show Fok — AvcceaeTve chroncltiong are — additive, >We perfoern o roudlution er Bogle co-oradtrake potad 4 He condinat, 80 at to eae on the origi sdraight- fine path # Se na Saoton: 8% — teandlate «a huo-imenaianal partion, we odd tyounstodton stamens ky and ty + ths. artzfacl co-orlimotes Cay) de oe ee coordinole postition (x! yt) ax shawn belors: x tronletion — volar 4 xt oond yo belted og ateatta , y's yety x tromalation —diutance pote (tau ty) do called 0 sromilotion vette? —@ aft _veetst . column veckt Sepresentation we gfven au: ae ("] [al » Ths lows ut fo rte. Arenidstiiow enpattors el motto form: Fea Auge Sireonibral ew » Teomilation io a pt bal drarorostion Heat —wvaver ola pear dst. 3p Design o polygon ABC ~ A399, 806.2% 6. wietake rn aitdeckwotee dinecbion bY 30 by Keeptrg c \fted. Sede i ' Poet Gg +2 (O)*T(-%, “ps Psy Lee ide Pl = Te, Ox* RL30°)¥ TC-6, -) #P WD Pp =o 6 \x(Cor ad -Sma0 © a ee pee cen a8 tt 1 “a oo} oo = BE 0.5 © a oO. OG © ett nt 3\ \ © =30 oo- 0 eek -o5 o 76 a * x! oF o-86 6 ° Negce: | t ° oe 6 ° oO 4 V et feet oe erat (3) * os 0-86 26 t ° ° & i‘ Qi ls & [ose “ors 384), a) _( S4e 0-5 O86 “BNE oa 7s \- 06 ° ° 7 1 6 @®- feed efose OS Ban 6 - oS 0-86 9-16 2|* 3 ° ° é \ 6 ae(s.9 6(e.? e=(3,3 ZL . 7 g 3y What ane toosdd Ccomsdindkes & views posk Coord nckes 2 Explain 2D viewin Some Losumabton pipeline. ¢ Wes. % We Com deline ane shapes F Tdrutduat ects sud Om Trees on vitae » vsrtntn a sepasate steperonce prowe each ole These releneuce ea, ome cated modeling Coondindkes 0% Soca) coosdindtes on waster Coondinadts . ence Ae Mdtvidual daject ajrapes have been specified, we Com cousbuick CmodelS a Btene by Pacing we Oly de whe appropstate Jocations, pottiin a lene SE ence frome © woo ald coosndin X Tre LUtpptyy wtadoto is mopped tte o viewoposck - N tewt wOsald has, Tk Ov cousidinokts voWidn le a nen- want bese scaling 3, Dboatd Coos dtnokes dan area on a dial deytte do witch aA window J, weabp Us cated Oo viewopest : veer poly were ye _- - Lt pang votedoue ' 1G | ' a“\ } \ ae \ j | | : l | | ‘ ! iach tee \ Fe ( = Fj 1 fo i legen a | ace way. Lwin “Dae ve OWA (ooadivates eis Viewposd. Cooadtnates, Relyr we Question 27 2D vrew*tn draudormatton fipelte. d @2) Explory the sean Line petygen fl ol gorithn Ans ; Basie sola : For each acon Line veecsinng a pety gor , this wolgotittun decals tte inteneetiow pow 5 ee with die polygon edges These fnctisection pornts art borted fren eft de night . Then, we fie the pixels btwn each intosectiow por L Obtain untuurcciion penb g Seonlyine wth pogon edges g. Sort Umtus ection fem eft te veight > Foun pots sf dntoreced ons fom the List le Fall wsettunr por > dutuizection petuts are updated FO Louk Lconline | | | Some seam-tine intersection at polygon. Vertices segite spretat drancl Ling « A keam Lure passing trough Oa Vertet as unterweeting the pe .- 9 ey gon a4 the vertex is a Local extrema , comuidr Cot add) fuse vntuseetions for the scour Lu Corrcuperreling up such a shored verter: — => 2 intusection peinb = | y a | ~ D) White Cebit" ow nenr-heizenrtal C r) ona ge a aug Order cheek Te | thee condition monetoni cally chomping aa ov devunsing) erdpoint % , Shorten the tower to ensure ovely ene Anterseetion point at te verter | | Celuarrn ce aot won be arsed iw mop 4 to seduce poroerssing, Aa Profits Ow LN dacrmenttol el akevg a sungle soow tine eo below Ave stow Lines CA, Yer) S@nuine Yictl Stan Line Yk Mepe a>m-= Yee af et 7 Ne the @ iw COmdinatis between, Awo scon Lines 4s Yeti -Ye =! eo dl) “m Along the edge with slope w ,cthe intursecti or A Vorue +e" sean ine k above tntfial stan Une wow be taluulated as Rhee em Fe icly «en din a sertedl e Aobhle thet covdains OM ke information de press the dean kine Cf enetly (7 Proceeding around dre edges iw ether a whore "0% Counter checkisiin Cider, We Cow use a bucket sort to store dhe edges , dotted | ew the swallect Y Velug 4 Coy edge , iw She AWA Stom- Line pocttion, > Oaly men dorizental edges are entered unto cthe gated edge Aahte Scanline Nunber, arch dhe abeyia Foal a ee EE ict anal fa Aramformation seypuenee CD Cockusite seotation by 45° (2) Ryeection abouct w arcs (Z) Counterclorkusise Aotation og 45° The suuulting Aramaifor maction matin 1g O70 2 4h mimnated rolatiot 2 am ows 4) Halon ty wat the ced 10" aout ts *pladion AW + Oe ee ton anakrrn ' ae Aranohsomellion | © Relation 1 0 0 (oan Oo Oot Ms b im nhoiny Auakue | dat “yw” the q values gq co-ddimales © Relation leat Got ven (yt) 3 mee with the Arariggoraion mahrion: ee age Oo + 5 0 | Giojmal Rey dnd a 4pasilion forilion 9) Tronmndawation Aloiny y Is any co-ddimatin omd ify % a. | w-ddinalir . i ve uw 3 3! % © Paylin alevt She Blain Cretate afew ay lame) t OO Oo -l 0 © 01 Fp beh 1 & y w-Bdlinadu 7 ye theionk cog atptecting ralatina | . / di om onin that in papamdicular r do my plane dave hak “posits a trough thy co-P dive Agi, Ce © Y ee chr Sian rfluhion, oncis os Aisaoral Dine y=%, She aapluckion omaltin Ms we zh oO ran ee 106 fay oe yr fo To obtain alow maltine a Aeyteclion , could voncedemoht malvern 3X ralion Aroyweres : a) dnkwir rctalion by H5°. 2) Rafadion atm x= ann (Ie q=%) A eupleliom sobok yan (ga y= 4): 6) tata clakuine arctalion dog HSS @ pe diagonal yer% 5 Ae riflilion ovabrion iy oom scp Sheas* 2A ‘or tak dusters ee adobe 4 am Audr frak the shape ppc oy te Spt ot jel tt Lap tg FD Ts oleh ein ol 3 Tuo tonmnen W on don Dod sft e-aeioah aha sod at at alt ela An %- diedion i. % ans 10 pod cacl with He malin. 1 aby 0 oO { 0 0 0 | eb co Adinade Joritins ao ote nt shay, 94 3 Aang Mok oumber won be auignud thy Ht wea Ao. Getting fadanalr sha sh the valus 2, jr ome, the sapiore Jacl 0 fosallulntarn 4 shawor, eeow vals Gh ah abigt toddtionts Jolin % the Qi) 6.) 0,1) Cy!) a RE wr) i (0,0) (,0) BS. Enfulain wie cotambley wir raethed a pli ftiog & holygen? eck _satflred 9 abut wud Po Bien the dap wel. > Cin tun «conmutioe wlen portion, Vy dnd Very 5 we daze Ih sdag weed bthusum Hhten a0 Ex = Ven ~ Ye : t dha Cueik - radu Materiel Mucermine dat wickets ion odin around dhe julywon puimal 7 Y the 7 comport a while on Row - Product howe a Megalioe 2 Component dhs pabiygon dy corcauut, > tm aly He wl mata yeti veda am counbindockuine Ader 2p dwg chews - product Fax 0 regalliut 2 comboront , se futyaom ts LEV COME amd ot come ALE dhe along At Ling my Ses uk eae vacksh an the Cro - plodud pair Shankar R- ‘ast Profesoe, CSE BMSTTEM Meo, Cosdinalt orition osn Lawhirnudl a1 mle xt Aref) 9 yey > A 4 -dintio Neng ralate tr Ae dine He HAY ds quvcafed with the ton Mabein | ° 0 Nhy | ~ Aly. Mog a 0 \ tohich gprialr Ate Sronotsirud co-Bdinake vous Wet, yle yt My (a- 2) Ey = (1,9) > (1,-4.0) Ey = (0, 2,0 Ey = (-3,0,0) ee 8 C26) > Mra the 2 compporunt 10, awe oll tye sae tm x pan d 2 The vader pr oboe fq ts cr Ppllows E,xE, = (0,0,1) Esxeg = (0,0, EyxE, = (0,0,-2) Eexé = (0,0,y Fax Ey = (0102) Ey, x Es = (0,0, 6) 3 Lime sta Go product E2%£3 hon 0 ‘ , wot aid the Hetzer oleng dha Ling yl P > te Ras eyolion pr Ain ele on 0 Mepe 4 \ avd ay slot 4 -t. No ahr thot ool -pleduds ae ragaliog | 20 Ye tum nus debpom ar Leth conn. Shen at Polygon, [Ul eae. perches,” — BRS Cr 417 42) dise One Comer d\) Redooe uatcorckiot fos : mye 4S “ Os © Oh pot tor. | wtese at wrk oe Satin cock food ect ehucbis ty roobicde Ate Poke 2 cehdln Coodiide, aw G fst ap - Dre Dems cy Csa2se) Caso ,250) S= hed b Pod A= dakh vs belles of Rack ul 26000 ,S0/2.s a CE p90) (sno) Polysow af Begin (OL-POLy gow ) GL Uenkin U7 CPt) 5 ok Wei iY CP); ot Unde 220 Les) 5 ge debir 2 ier LP), teh 20 EPs), geno ly, Fox lot gnu Vodca pe obtain nfs -] qr labo, proved | al N24, Tan bun fost qpontin oi \in bat ay bree Afi" oaks CPP 2 BPS) Th sa : 3° we Vustes erclen (Pus PsP Pe} ede OI Ft EF ad GCM Pe p p. 2 fe GL CTR LANGLE FAN GL —- POLY GOW ee st Not. Wo, Stake R ) Misty + : CSE neestrine <7 & = Pa\tons- Sou ee We cor cali, GME sehr Voqen, NY scare vod, bruv Style) han blr. conbi mby 2 peli . postin in be ome Lp pall Vote be Shijic bb army ed moticch toloct - Velakias portion an te be obs phupol & SH Me celeebds to lor My Pacgone) flebch Pisgooas vw hatel, pe froren 4 pes MON ysekl Veckangh bm tle colle Fi wo gz petlans Yefreree an Hles, fe i 2») Meo ae wate ae pil wo. oe vad : 1) Te Sef OBE ne ae . ot) ete oe zayrwitk a Ornhl Pio to viak otvi : > Compgti vnabita. Colleulatin? “eft wang Avsi asinclade includ < Stdfo-h> id wy; lod akong’ =O) Vad ttonglelind tg) RL fdo2t(Lad gBequnloL POL Y6OND) avers 24 (2, 4)? gf Vethn24 (24k0 0, qt3e0), GWeilcat (2 4300, 4 40); Ed), void display A fChan( GL-Color -BUFFER-BrD); Glob dete 3 fdertlv iy, deeesxpees® “scloht_anfe t=) gale { (iolahe—omgle 0.0/1) Tiangl Co, 0); get FoutRadivply (2: Swap! Ce ean ved Tat (> {Uta (oler(0,0,0-1)! Metric Med (GL —PROSECT| On), LoodTdealiyCy; uO 1th0D (-800,800;800, 800) iebiMel CL ModELViE wy 5 Jt yon Cid ang, Che **arg ui) t gat Dad (Largcargy )/ feat Dust Whrderoledion ( 8 00,300)" (id botDseloy Made GLUT _DooBLE| LUT-RGB), ork Court wi (Cees cand) Ribs Trronglt) wat; led Dihay Func Cciselay); gfe Main Looe); j BI Wrd henepruns ceMlivabs? rch mabia vepremlalion 4 Tromelion, xetibion oinal Scaling. Ass A Stawdard teclaniqne for otcomplishing 2d 03D Tromso sto Expand tach two-dimensional Coerlaah -Pesiteon wePreulake Cy) bo & thre - chmind veprevmnbalion O64) bh), Colbed! P= T Cxty) P w Scaling > ou Sx O O7 Sx i =lo Sy 43 ' oo | : p=SCsx, $4)? 2D - Reladional mothrint x (se -SInO O01 Cx gfe [Sin® Gee o]- | i ° Oe ! p= R(8)-P Shankar R ‘Aas Professe, (CSE, BMSITEM 40) What is master operation } txptain tuanagermation . 4 Rasen syoterns Atole pictne injoimabion a8 color pastound in the fame buffer. Thenefore , 4ome Aimple oljeck trangormabions can be casmied out mapiclty vul n ona inek values by : - . i Ok Pn adi, 10 the purel inet values fom one iti v block transter,a bith’ ot pitbe, | 5 ify! ) | (6) yO! Ts v an oljeck JA Acreen ition (a) nanatating on Ole een ie ip the Aevum inl b) bi ing a mectangular plock pixel vatues. ( ordinate positions” Pmin Pmax oe block te be moved. and Pp the destination reference positron. in 40 - degree increments ane accomplished i the elements a pirel ant costly by neaunangu : Bom °d ft ttt o NG cimmensionel Blyeck ot pattern 40° countrrclockusise by nesersing- the pixel vadues in each Cr of the vay, then (nkvcharging, Mews or columns x4 \20° is otto a aversiry- the oder ef the ehments in cach mow % ody then reversing the o1cur vce demonstrates the aay manipulation’ tee aoiaie opined ptock by ao’ and by 180 be 26 9 12 aoe 4 186 [235] Pe io Wl ya a oe ae Ca) ; & For stations that ane not multiples of 40°, we ned te de 4 entan ah i. toch destination poet ame TET orto the anny a destination pixelcan be | } a et et clare colo 2 OE svertapp! ee els ,-wergfted by [= _ nen. overlap. Ratotid Destination ve the ouginal bteck ane Annoy Aauos a acoled , wing specified values fot ox and ay, and ten ¢ wu el onde a Atk Of ee ee Or 7 sn yo destination pe ae pl pe Se aL Ty Destination i TT ~ 7 TO Plael denay Acaled 4 eae oo i assy I 4 op) a uy) Waite a note on: d) Open aL fitpatiern 1) OpenGl toltune and inttryefation poten, } OpenGL wire methed> a) Open&rl fort 4a qduncien . aGlubut 4 Pattern lt J=loxFr,0x00, OxFF, Oxo0~-}. a : 5 alan in OpenAl , we ae a 32 bit ge bet mk Value | in mark indscakes the conrespendi be stk to the aunt color. a oo ~ tu : @rwotve “the poly en fill poutine op Petagen. Tape bu ato = ned ~ to enable the pull seautined before ave peutfy vertices the peeygone that ave to be {lect Wilh, te cw tiie nce @we activate the on~ditl 4onkure of OpenGL tnabte (GL Citaon stab 2 ave twin ot patttur felling with Duoable ( @L- POLYGON srxvrrle)y oe @ Desoube the potygeone +o be efted.. eure totune pastouns to fle gons. Aimar simulate tp the 2 oppearances Toad, bruce, brushed Atte) xL clarion eh Of a polygon indinies tb used to podnast a aisplays of ahoded auspace Ander various At conditions AhopeModet (GiL_ smoory): Begin COL TetANGLES). gf coeoi3¢ (0.0,0.0,1.0), Vertex de ts, 50) ’ gf et24(0,0, 1.0.0.0). Prerter ails, 50). Coler 34 1.0, 0.0 0.0) of Verte di (15, 150); oo -with ene celo% and * G@L-FLAT gus the gg GL-sMootw + default acting ©) OpenGit whe frome motfipds. To- shour ony polygon edges gf Polygpnrt ade { face, ais play Mode); + fandiaid!Ypce ahich fue a polygon ut wank 4p Phour edges: GLFRONT , BL_BACK. k Display mode: @L-LINE, (iL my eee a cael & Atthning: diy u e a {Qe eats pag ep ff polygon. may predute gape along the ed eo Acontine fill. To ebimminale the ~shife the clap Calewated boy GU noutine 20 that tag de net overlap avith depth ales 404 Viak polygon gtcotor, (0, 0,1.0,0.0); op Enabte (G\L_POLY GON_ OFFSET_ FILL); p Offsetl 1.0, 1.0); ge Droate C@L- POLY GON _ OFPSEL FILL); oe Potygon Offset ( actor, factor a); depth Ofpeet = ation! emnanddepe 4 qacerd. Const d)Afthough the oiclering vertins Controls tro ceri tion of fuont and. cin et fd indepenotunthy. Q ba Ned 2 ON penetra (hen den): The os beng, avhen seb te GL-cw levose wine oioning) 401 ths vettizes will be conoldered. to ace . « Tf the verter “oides tn OpenGL , Git .ccw leoundtr, clockusvse oudaning) ef p vertices 08 rent facing which vs se tek te 4 AS. Explotw the Componite aD toaumlation , Potattou and Ac oliner. * Cormporite Hus0- Dimeuntonal Ytaurdattouy > Ib Ao ouccemetve eraumlation vectors (t4e, 44) ond (tar, tay) Ore opplitd £0 0 two dimensioual coorduate position Pp, tne Huot tnounformed Jomtien P' 9 qgtouteted an Pe T (tae stay) © (Teese toy). PY © ST (towstay) + T Users tuydteP ashese P ont PI one Bepcrenented Ob thoee—elernent, homoggueov” - Cootdivate celamu Leetwsn, SAlno, Eke componite ttaunlesrmotten mototx fot toto ANQGS EMC of tsaunlotiou Sp 4.0 tan 4.0 bse 40 fet tax Gye) ot bo tay ttoy OF oe O20: t eo 4 T (Ceaxs boy). T Claes tupd= T Ltys+ tox tryrtoey) ® Componite “uoo-Dirmenmouad Potattoun ="fuvo uccenrtve aotatioun arpptied & a potut P produce the trountos rod poxitieo. Pie RC(esd. [RO PF = $R Ws) BlosyeP conse Pond P! ase cpepaenented am three -etement , homeqentoun -coondivote cxluron —yeckorn . ar BY roultipleing the two totation Maboteem, we Cou vestty Hook tuso Aurcematue Toraktou Ase addiittve: Roa). Bl - BlOL.+ os) — ho thot sue fuot aotated coendivatem Of 0 potut cau be coferwtared stl ane Conoponite rotation Wotat, On Pleptos+ oa). P * — Cornpuntte Nuse-Dirneuntoual Aealtuasm tdawntoarnotion enpéieerm (lors use mucceneive =~ — Coucatenatty manaisnn poo duce peaittuay Crperabiows sn tuso di tne fottoastng, componite rpeattug mate hax 0 O mc O 0 wAaenact OO 0 6 oe Ol) 0 eo Oe Ce Of Oat Cos © o ‘4 5 (bar/toy) Seat sesy)= Slbse Aes ag sno) Aa Exploin the oD OpenGs greometnic, t-vowoamnasion cea. pestosm @ rraunlation, we tuvoke the £6010 lation, Bovetne ond wet he coOmpovents fot the thoee- Aetrmenrtonal EDounlatiou vector, + Tr she coorathon FUMRON 5 uve mrectty the ovale and ene @otentation tos a gotatior axin Luteoet the coosdinate obtain. —~ TW addition, q arotivg, tuuction rad. to ret the gnee coosdiuate Acoleug factory seative 49 ta eoordinate ostxin . to! each COM 4 AL LpQWHfersrration outiue Hey 4b o AKA motdle eat bo Apptied #9 the consdlinaten Of Ob{ecke enot are ee fesenced ates Aine ‘€xoUmtosmnatton Roll. OpenGt Gromebske “oounfosmattons. — 8 Arr tranptatton mote am conetaucted sith ene Yettoustng qoutine: QU tanstate * (tx ,tystz); © SLaoumbostoo Powomneten” tx, cyond tz Con be Gwmigqued Avy Bol UsMbes Value, Ord she mingle ulfir code 9 be Offreed © Chim Kuwcteor om etthes Ec fsat) os A Cdovbte) - FR Sos e909 Aimeunigual crppteatione, eon te 45-005 And a tus- dimenrionod porttion 4% Bepvereutad On oO Yous eterment column moeste wit ghe\z compouest: Lapa 99 0.0 @ brorople : A “rountatoe (36-0,-40-0, 0.05 =r Airvitoster, OAL A SOLBHtOD MMHBEe so Beussoted woeery giPotake * (theta , ve.vys Vz) % cobene ere ectos veCva Vek v2) Cou hove ue pleating - POE VosULem foo ten Com pove rt. * Cube W35chos efter the OGteNtoEtOn fos a worOLiy act Shoe AoADen eroougr the Coosdirate Satine © Th vam not *mecitied Gm O wUit Leoto~s, then GE 4 nowoatensd outomotiect Sefowe Ate clerrentyy OF ere tortor motor oe ted. P the subs osde can be eenet ¢ ws dy and pawrocter, trek Br to be ouxigred @ aotatten onge kn Cengoee. «hos exomple , Ae atovernout s g’Rotatep (90,0, 0:0, 0:0,408 =r 01% @btalh A ALA Caer noptoiKe vith Tenpert Fo he coodinate @aigen sito Ke foctousiug Tourn, Gt eee % (9%, wy ZY, * “he oulltc code 4p tu eteres fee dy ond Are mating qorormeees com be Growigued ong Geal- uembes worn F Acatiuy (Nn A wor Mémenatoual byYotemD snverw om Cnovarm § the » and 4 Airnehrtonn, ro a plead £190 direNni0 ral eating Opesation how a Zz oa foctos of 4.0 Exompte t Aooatel (3-0, -3-0, 4.0); Hh. Wade the Sts for station about Prvot potad ond Scaling about teaad pote ANS $ ¥ Two ~ Dimunsfonal Pivot ~ Pott Rotatfon ¢ ee Ontaferol postron (b? ©, : Transat () 4 wbject anol Pivot ol tot harris ee powat ice Pint (te Ae) oi oan 9, B raspert fo te woordinale owigin 5 ator Pivot pot Ole, 4,9 ba paupoanieg the poratfon abut omy gollacky Aayunner 4 oma” want operahions « LeTranslate Se Beet So BOE pivel- ord to Da won dicalt ovdgin . 2. Rota te doeor obbout wordlinalr 0 949i . 3, Wanslotr wa et g thor prot potat Sx setued fo Qo oxiginad poston » The (wrapo Si tranajpnation mrolxin for thls Sepuence 2 oblaind. woth Ba concatenation. poia posfrion 3a we -cho Oo @o8 WOO O o ‘filo Suse sae %r(i-tse) +4 soe |s*n8 wae -Y (1-tehe)—x sino o 0) t which cn be expsenied En Du form T(r 4 RU) > TE Ay, YY) = Ray, 4, .) whos TY) = Tey), ¥& Two-Demuntional Fe nod —Potat S cabling [4s AK L Ae i] Ori ac Poston © : cd? 4, ‘objet ord fe ee oi sranstode objet tad. Pott ge enak Pind. with Reapet en thak tha Flak pote Cy, dy) 3a 40 sain Pofak GX Rabuanad ak Ostiata 5% position (ae, Ye ) gangtien tok ton Scat, valakfne Sto the Whin we hone & (o- ondiod. ost gin onby. hos Segpenct $s 46. Boekel explain Tavoue +anrhoumation , Comperile toon sfeumakon . ANSS Fn wre Transprmakion ¢ fox tHondbohion , We obkoin the fare erode by romping . 4 on dst thas, 3 howe 00- dimentionall Luonalation Aetons +2 ond by, Be ee : An inno otakion 3a accomplished by replace De gstochion ange by “ss t ' Coe wre ae oO S08 ype oO © O 1 hegptve vals for sotation angles gst eed a a packisva diuction, $0 AM Sasol malls 23 panded “henry, sektkino, atte Ss ouitited by 1 mene, Becom only She sin Mncive Si offyeted by them changl station avo, Bee Iwout mobile an also qtecchanairg sa.08 and wlymns an an uy the be dbtauud PY qe Rae R® ony gotahOn modula. S.Toarsteb tu defect Go thar Me Rud gold Wiackdas with the toodinak osdifn, Sear the object oth surpt to dhe toordicale onfgine , Be wr the Sovone g the Avanilien Sn étip 0) fo sudan the Ko 36 onigioal porthin . Hy ealodas dor Hox Hour op esahions produce the ee mapa etn. Soobiog Mabelx + cS i: = 2 2 1 9 -ay{ [se 0 aCi-s, de] elo Sy o|. oot XM “0 Sy 84C-S5) \ oo \ © oO oo | oo | a Ty 742) “3 (8% Sy5-TC- 4, -4) 2 S (Xt, 4% Sx sy) Thi, toansfosmation Sa quate custo matically. Ayling thot provide a Seb function that occerpls loosdinals for thi Hod point, x x Fom wo0o- Borwntfonal Seabln weth pasomelvs Ca anal Sy applied selotine fo wetdlinale sigin, Be Sour trorafermation robe 3a gh | hx The fowl mod nix apes d 30 go mlsipication | omy Seauicy inves produces Ma idenkiig moll . lomposte Crranyjormabion ¢ a tomposte jus0- Diewntionol tyonslotions aucenaive srronslation Vectors Cre, tug anal Coos’ 4 Qinunttonal cootdinalis Potton Py Ce hee, Gl Avance dee fiat brory| pl:T (teat) FT (bi, ty )-P3 =F (lan, baa * Tbe tug)f P hale a ale! aoe maprininked an Fhrt—eliment, homogn ous ~ wordinale, wlumn victors. 1 0 tex NO ca: V0 tit box Oo te alo eee aa] o ot oot 2 . Vkax, yd Tbr tg) = Tbe t tiny ty tty), ushich damonstrata that thee hoo Suceersi ve dyonsahons, Compost Two-Dimantonal Rotations + Two ductnatye sotatons applied to a port P produce tke transpoxmed positon PR ld -fe(o, >. P? *] Re.) “R64 .P by (ual plying, du fwo Kotalion makius, we tan Vedfy Gok two Sucoustve sotations axe odoliive? R(o, )- R(8,) = R (8, +0,) So that Be Kral stated coondfnalen 4, @ pofat tan be Cobtulored Sith th composite srotah’on makita as P=R(0,46.)-P, Lomposibh. Two ~ pimentenal scablngs 2 toncatenoliira, Aransyprunaion enol! a for two Mache Seal&eg opembions Sn hwo dimentional olinuntiors produces ds tollew'keg Lompotds Scabig mrotutin. t Sa, 0 ° : gO Oo Sythe 0 0 : Soy O/T Oo Sy 9 {lo SigSay 0 oo! 6 6 4 : \ o a $ (Sau, Say) SCSia. 1 Sig) = SCS “San 7 Sty De The Sesubtiog moti, “Ln Hs case Sn dicate, thot Saucers’ Ceaticg, eporatdvy, ome mubtplialve . hee : ahok da 1k We WL to TEP eye g on objeck twee Sn Qyecnwton, Sat Rook tie weuld be nine Hows thak go + Oscioting! , Bue té Lnplade the OpenGL mabe Spe ation aud Get) Palvin Slacks - 1 | hele) aes frwolate ! Se ede) (eee ete a Lf Poitasusbers C a ‘somal trod] ontgdual — the uss _ taco hraualabe fer vec dat - oltatare to tev ce) sy scale i s duct seater + akes A Wrkvia , 2 Porassutbenr ! i ty wea Y nigel Phe et wads a wart fo scale i yec3 seeds - tHe Laclers $e Seale % (e relate. “fakes 9. unetatae Revelator Th anrocuol arm wis aud volun Parameters z ry wad ovtge — wat ain a te a0 thesakte - duige a yen bond ac) aa Veo 3 Awa -— aul ee by wot te Lay Explaim ths oPinGL 2D viewrng, function, We Con AAR these 490 Amendional robin + with the opmgh view pot function , Ok the Vieng. operations txt ued. Sren Gt Prajectinn Mace : | Bore we wick © Wering dns ond a viewer fn Spm GiL. , we mud to extablish the Sppropudte mak As conan she mabatn 49 Lramdjorn from darth Coorctinata <8 Attn to ordinety , gamadtrix Node ( GiL- PROTECT ION) 3 es tas gna the Prajectim matin 0d the cafrunk motrin, whith we siiginally at Le the Uuntiy, mabrix. Glu Cepping.— Win alow Fumetisn 3 Wo dupne 0 tip - dimensional tying window , We Can use the b Opn Gt wbilthy, fun ctign Aha Drthe rn CAumin ,rroman, yumin, Yurmands Spun @L View Port Function 3- Ah View Port (HUmin , ayomin, Upwstdtth » vp Helge) » 5 Cowake a Ghat Dioylay Un dot Slut Inck (A argc, ory ov)? We Aare thie functor a GLUT A . oma theo, Benson ana ae a glk Frick vinden Patton Cop hat 5 yTop Lugt) $ quad mud Wind sire Coliaien , daa Hedge)” uk Create Winder (te Ete of Airplay Winches 4)? | sting the GLoT Aiaplay -Windgy Mode & Colgrt Vokious org cwindlons Povamdtien ot Seek ustth the GLOT \unction 3- Gah yg Hod . qtuck IrADisplay Mook ( GLUT-¢ IN@LE | GLUT_R ee): Jean Color Cees giv » blut »dtpha)? QL sore 9rilrn Cineten) ? hut Aisplog in thy Ldn’ oor win deg TD = pak ruse Windey (A airplan. Winday'ye DUding a quot Dinplay Win doo $- glut Aurboy Window (wirleut p)? Convent Git Deoplaay, Window ¢- Ghuk Set Winder (ustrdey-T dD)? Redkircering tnd Rutiaing 0 dat Doyloy Win dary +. "Hack Roaitison Winders (ANE TORLAE » ery Tap uf)! Qld Rushope Windy (dudes oth » dines gps)? Jouk Pune Sense 2 Momagin MuLePR GLA Dolo Wincor QU 9 toniy tain bona (04 WE Scbistnelny Ute CEN Httntlou Manne 29)? see netate a sopione util Phe Following werdinake Jy > uncy pr both Rinedvow Aloo) -B(2,0) ,c672), Dla”, ee Je trometate a 2-D portion, we oh prowlation ty te the miginal cer denotes 6% ” fo sbbatre the wo v oe seer dinate gouton Oey) wa atle 7 g's yt ty mig lad és) . Po Rites browbabion. BI C4)>2 For L(2,2) uw oO ae . arr) 4 vye [5 ThE) Apt) 1 eee \ 4a t ee 1 5 amebedton C' L114): oo Bye be im Scanned by CamScanner Relate a brazmgle ab e003, (4-0) 6039 ty a0 alouh oxtgin 4 honed jpetnk Up») Joothe anteWokuocre 4 Mekuten Direcbion. EE 2 ah ° ° L ph = RtBd-P Fou BGs oF ol ° ae ° C33) # ele : all Ee [: ° \ 2D netabior about pov fod: sien. 1. Tramlate dhe objet oe re piveb-yoork pe : eo evel) be we a one = a tet aleout Hu scordinabe or7gie ae ge thab the powk io mbersnald to Ks cert, 3, Trandate ie ths prpnal got Dow Lee : aca Wes Scanned by CamScanner <6 Xa SP -aeyo ° MD nay ' lela ee : oa. Oy 4 1 a0 4 Oo) a us0 vate a CI ete) + tn eeu so won Pet wide, 400 ° ° 4 whit Cam be vaprtied Gv the foam, Ae a ye? 2 RL). [-2,, “Hed =R tay, Am 59) volun Threaded = T' Ca, qe): waro=o 52.20, oe Mie i a! ° sli opeadsd na : *C0,0) + [| ey ° screy-aeo |e] ) ° } ' : a 6 > | Fou 2 = < © & oe \ ere Geog ae a — - on co Scanned by CamScanner ee wo nko oe A 2 1H | fae wo offo oy bo oO 1 oO ° ( : . au 1 AP MALI W010) - anno eis C lace) ay ven . 1 ey ar) -) o BLI-O)t Bx] °| ° v0 1 ) or . & lt] For BC 6,0) — ides cae " Pal o { o 4 3 aes | eta oO ie 3 =] -d+o ) = i Co | ‘ bel hcoe OD eh se. > tbo) => «hc 970) € 3,29 — 03,20 eo is Scanned by CamScanner So polrat ace Tuer PAYen “lacs: Fearions ] How : A. Sern te Ldeawey A conver Polygon ) Jiusteate Kor ko spre O& Corcare PdWaga, feed Polygons Con be Class bed Varo te ees ate: 4 ‘N\lrsexr- SP all \avexion aggtes oF H PHAN cue less tron oF equol to (go" Ti) Cornrove- Pay gen wos ws ABA Comex is called a Com ane Pehygqon uy Degereare Polygon Tt is uted to cleseerlee o sek GE veavin THat ane Golncat or Thar Vove tepented Go ordaore pomtihont: Tes bun. Cortve Polygons ~ fF) concave Polvaan ox Akleasr one WA textos AGE Qreater Mor (O°, Algo, the axversion o® some Seger OF KR Creare, POLYgor ull Mterseee| Orwer eaiger onc Some PAT OF Ports will procure a line Seqenent tuo jakewsect® — tre POLYgeN wowday Thexererc ce cor Ute One of mete Clrarectemisthes ok A Cancave. Po gen Poe See Tet Keaton Ag eer ASS Se we cer Ge a vector for Oc POWLGen edge, ther we Con ute sre enose product of adiacet edger to eth Fos Oncol} TR Some cots Ereclucts yield Q positive Valve ond Lome oO neg ative Yalut, We aye a Concave Poly gon N 4 Spittieg Cortave polygon ~ We Cor gprt aw POM gon a Cencay & metved. Proc eectin Co urtesctoct, . C wise, ano tue Palyyon ectges, we awe ture position of Sue polyger so that coe Vester Uc in ban is ab Me ceorcbaate ovigia: Tren ewe toteke bye. PAYQon fg tue ofigin IX & cleckwise isection gq frat the ext vyegter Ve le of Tee aes Te me SHOW, Weaken aa jig belote Mea Lang Ha Polygon \s Concave. We than gett Ae Polyuen ator x ois ty Foam ton aew Polygons, ord we sepeat ta Concave test os each of we fico ners polygons. Tere Sheps one Tepeated WHE we Laue tettedt QU vertices ya tue polygon Uist. = Examete, attes roving Ma to be worctinohe ongin aot ee ee amis, we Penck Mak Uy is Leto BORIS! Go we SpTt HHL BOLygan atom KH Lane ot Jos owe ts Ma Me ONS @: 51 bthal 2s sbtibeliny Heel? Hao obes Ghovint deals ull ah? fy we nif wok Sp) tips Q@ bokygon cuts booth an sinks ft ard a igen caln ot potion bon ite edys Cer for dh Vedic) « Yb accomplished! by lasing Gen Gok Mikne— Frame rekily. FEC 3D Polyjen Has melhed for obipheziny Ke eds a fied pabgon meg ee olan dhe edith - Sas ofteck, Sometimes aalfered! Je ad Shiching « Ds Cawtad! 4 dfewnee hotwen caleulston in He Scam Qing ~% abygoritln comd Laleukebigusin tle wlge Line drut, zh odgrittrn fd He ankercoe of BD Polygon Ls pillol, dhe salepth vaboe (oleatonce fram the my plore) Ls (oalesdeled yo” eack Chg) pattie Hetceven , has eph value ot an efe of te fggen by offen nat exachily the Sam a fe depth yebee coleubbed by the bine taasiiny cherilen or dhe Sum (xg) psiten ane (oy fo climivds He gop alory Ayploge/ edzea WH a dHhicee -climenionl polygon 2 fo BiY dhe oefth lies —Calelahd the fll eto? to flod flex de Nel credo wth fe ede alg Values fon Poot Hyper - ee ole flix wif, Ro foliacoing 420 Gum Gib. funclt gor + Minath (GL Pobrew oFFSer Py). ’ got jontyeet C fad ont fackore) dhe ish furelin achiyaler dy offeel seoultn ¢ fe? Seon-W kine fully ond He 2nd forfen ued 43° Sot a Couple of fforting Pd Values fadert ont .fackere fled are Se! fe cobeabde the amend of clapph affect .qhe Caleatdion fer dls depp fr # oleh offi - facled-1xSMgfe + Sahota Comp where Marc Slope A rnin sbpe of Ke bebagon anel Comk 9s On Jplemondebionn cons. fo7 Rupr io my pane she bk 0, ohewire, He atte fob $e maximum, shfe fos Jo be cobubbed - Ab om gromple xf astizring values do afsch faclos Can matt, de rrevieus Cede Semond as fobo Color 3 9 (0-0, 1o,0 2); Mnable CG Poly Gon. OFFSET Fez): ofPokyjord Hach Lic, 0), BDisable (GL _POl Yoon. OFFMET. FILLY Alleles 8? C10, 0-0, 0-0), A PygorMole (GL _F eeT, Gt_Lrwg) Sh A exh ble Jo inplarand fh mohe! by HDi the ffet to He fine ~ cbyeating abgorittony bey charging pe aria umond of +h e glerwble funtion lo GLP Louw oss CLINE

You might also like