0% found this document useful (0 votes)
20 views24 pages

Unit 4

This is the fourth unit of computer graphics

Uploaded by

Gayu Gayu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
20 views24 pages

Unit 4

This is the fourth unit of computer graphics

Uploaded by

Gayu Gayu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 24
UNIT € (ete ween g Syllabue ‘i ¥ clacettal and computer ee # Viewing with & computer, # pectin gy the Camera y Simple projectrons Y projections in Opengr + Heddon surtace Removal ¥ tnteracttre mech displays + paraltes neta matrices. ¥ perspective Prajectien matelces ¥ projections and Shadows , ~ TF ctours [CLascicae And Compurer VIEWING | (Ef (purer fecte + More are pour types of elastica) views ( prefectronc J ‘A atthe graphic Prejectrons A: Axwnomertric profethony 2 oblique Prfechons 4° perepective PY ections | AEthopvaphie. profectian VIn all obthegraphic vaws, the Papectoxe are Pempendieuilar 10 the Prypectron lane. * Fig shows orthographre prefection . 4 Ucecalty three Views are used tn AN Ortho raphe Prejecton to deplay the ob] ects TON# Views ~ Top wew Side view ode view F Ady sp preserves both ictancet and an feo, Since tpeve i no Atehortion » OL We SUtbed jor eel drawings Axonemesnie_projechone : Y bs fuch a eaten In Whith the Projector 10 try OT thogonal to the Pryechin plane | bur the PP e)ectry plore can have an orlenkation Wr the object. Meng Tht veew, more than one Principle free 4 the Obl eck would bo verble , Pe nett the prajectton plane is placed syrometr cally wr fF the three principal faces that meer at a corner y our rechangular objeck, Phen We haye an war wwameteie rien ¥ Yo the projection plane ts placed symmetricatyy wrt two _ the principal ieee then the View iC de a the fegeee cate fe a trlemé Ze \ pa Dimetric ae” 7 1 Pxonume}ree J Projection. HKomeperc , Bbligue_profectte tf i one of the Mast general pare lite) Profectione , ¥ this rejection obtained by allowing the Prfectore to make an arbitrary angle with Ine prejectin plane | ¥ Angles of the objects face that are parallel to phe projection plane ove preserred + oneque vews (profecton) 27e enor alg freuth to Construcs bq hand. they are somewhat unnatural. / a Aa oblique yew + ; ob epecnye viewing , Pit is such & projectin IN Which the viewer ie loca keg Sqmmebriontis wrk the projection plane « pu perspective Projectors are characterized by diminution. of $12e # when Objeck are moved farther thelr images become Maller, fit, Lize change gives perepectrye projection its natural appearanee. Hence if ik rordely uted in architecture and animation om the Vitwer, ¢ Figure Shows eropectine projections, ¥ there ave three types of per spective Views = one point perspective ~ two point Perspective ~ three pout perspective . based on how many me. *s the theee prinerpal dtrectun’ in the object Are parallel to ‘the Prejechon plone | in most general Case , Sapoint perspective, the Paralie| Unel mn 2ath o the three prineipat Atbections converge at one point calted ~ vanishing PrP ty (@)> etn ee pelnk perspective linee monty two gy the printipal dt rection, converge at Vanishing potnds . < figtes> Fin Lpuink perspective , two J the Princ pal directing converge at a eingle vantenng port 3 pornt of port 1 poms pq |? Q) Ky ww nope: planar projecnong Movane) “oo perepectiye a JT oblique ontios raphic [point 9 pornp 3 po ing — fret side To, PXonome pric Weed ylely View (rewng ¥ Veew ing acing Computers Involve two [indamental operations fh positionin and. a the camera whith can be athreved a ating the mode} view matrix. _ Comparer a. Application oF phe projection trantjorm ation « fe po roties prejection or eee ice Prejechen whith can be wcthtred yang projechon matrix, Wie gp 7 Pry @ [POSITIONING OF THE CAMERA | ¥ Camera can be positroned UtIng open Ge be modi ying the model -Vitur matrix model view matrix (6 an eee paabrix ¥ inetialty the game and the object pram and hence the Camera would be (dentital af £hown below, [pe I Je i" 4 @® x y movement of camera and object 7, Ca) intel Cenprguranin. Gh) Coneguratin after change 10 rode) -vieto- matin 2,Ze ¥ with hy cad arrangement, all the objeck, present in the fcene may not be VuKtble ang hente we wilt have po Change He model-vew marcia Sultably to positon the Camera at the desired focation, (reper Fae) ye Suppose that the uter KM Mmterected 12 Viewsng tf the objeck jem the -ve zaxls, Then the Camera can be postttonedt using , IMatrinMode Ce. moper view); glad Identity ¢); fitrancate C00, 00, [& ay | ca a ? pe _7/e | frero Side view, pie ve Up * a Za zg These eqns are po. The avitiin by ze deteribee non aaa Seana a ¥ the above equatims can be shtained in the MAabeix pom ae thown below . consider the pornt in space a¢ me Consider the mabrix M ag on) ° ° Me o 1 0 Oo o 0 } o o 0 Yd o oY The matrin M4 ‘trane] onms the point p te the pone. qe Map. 1 0 ° *] ey vNfo to ote fF = {7 0 8 I ° ie | z 0 0 Ido Ie} 2/4 Ba dividing furet three ferme with the fours fern, We get, q e a ic fe Ha UP —— Zp I : | " S| tpn ona} projections Cparalll Prajectiene J # Or thogenal projectrons ape Suth projection m which the cameras have Inginite focal lengih . Th le Of Shown below, y + Projectors are erpendrcular to the view plane Py Pere a Above diagram Shows a projeckoo plane bith too. fe points are projected of to thic plane , Mt Can be noriced that they retain wretheir x and values (2 deminutton does not takec Place . j Phevepore , m orthogonal projection A Oe ee ¥ Above 2quatrons “an be obtained 19 matrix mode ac shown below, Consicler the pomk in space as . x Ply z L Consider the matrix M such that a ite Zo0 eeono then we can obtain orthogona | prejecton 4 the point p by rou ttrplying Mand p ag shinn below , qe Map jp 0 0 Oo se for ovfely jroo 0} re Looos] Lt _ fx 1] VPs] y 9 > | 1d le i] Thescpore , ae] GEL TIONS IN ‘openat| bia cee how vetovelume are Strmple popes o Propectlen readwin ® + contider the matrin - [1 oo © which is stoular to Mt but 0 8 x A | are f a“ nonsingular. Oo; oo oo 10 | r— wv Consider the pome - p- [3 - 14 LF + By applying N on p we gt [ f where , x ae tely mn! [§ fe"] PoXz {Wh 2 mie | . | (+ Be) a ! “2b ¥ the game welult Can be obtained 7] applying an Orthograpbre projection ating the 2-anle fon we gep / t oO oO oO Morthe tN =] 0 o 68 0 0 0 Oo 4 when this oF thogbaphic Pryscton ik applied on te pairt pl xy 2,17 _ we jt om Mortro *N *P = ‘| rabies ye —— a we get Xp Z| thevepore Ay applying AL dwecHy on the point greta the fame VeSult He opp! we the on thogr-aphic Pelee eee, zat on N and then pryeteg the pain # original Yew volume can be noornaleed 40 peaspechive view valume by Te canonical Tight ~ let xe pe UB 2% hear yer fep- bore “AK Near Cae = denear a regnteleyy c Ze qar night -lpr Tg ht legs aaa “tener top bohm a Merepore, the ‘resulting ° “op-bottom ep bolton perspective proyect en - 5 ° _ fartncar Afar ¥nea marin U ob PeNasay = jarcnear far -peny PROTETION AND SHADOW! at lets see how Chadows can be created and Projected asing open ge. + Suple chadows can be created in perge. Although shadows are not goometria objects Ce they are lenporta np Components 4 reals tre Imaget and. jive many vicual clues , ¢ Shodows vequire a light cource to pe Present for sumplecnty , we Adsume that the shadow aes on qroued woyro. « A thadow i @ jor pPlygon and u the Prpectin g Phe original poli gm onto whe feyjace Cpreurdy tt be at shown = below - fee 70) ¥ The light Source present at AY (Ze, ye, Z,) Push be boughs the origin by pedformmirg 4 Translahon T ("Xe Ye ze) then we have fo Perform a _ > x simple perspeciive Pryeciien Ky thytugn the origin, LE “Sg The proection matrix i Tr 0 0 of alee | 1) i o i | by TORY . L | Tien we mut frantlate the light source back to 2x, Ye Ze) @ the toncakenatun thir matyix and the fo franslahon materces Projects the verfox Guy.z) to as == pe Xe ~ ———. | =0 Zp - a case Garon] [2] | Ge ~ 92- nokes thew we gor thie 2 [% 100 -«] fiooon 100% | Pp oO hlyloloo ot ow [ ? {FP o Ot 21 0010) Flo ora, 00a ° Oo 02 lee L ue o ‘ny? D : J J » |x Premcsree t ‘OG Hiln Up 6 lie _ Zeke Oa Y J we can alter medel-Vretw ¢ orth vpen gL program , matrix te per the desired polygon as prone. Gt ploar mew’; 0 Shadow py we) [or Ciro; Fem; tr MLIT©O OG, mloJ= mrs y= mLwJ=ho: mE = “hol yg gidolor ayy Cpolygon-coler ) ; gba ( Ge-Polygon ); = /% Draw the polygon Pebrvatiy FD. & : 7! dc); giMatriaMede (61 MODSLYIS Ww); qifush Mabie Oo: giranslatey Che, Ye, 2835 IMultrpalriag Om); gl frantlabe Coty mye 203 gl@olorzyy Cthadow. color) ; iBegin C§t-PoLygony 3 gender; gi lop Matrix Os SY Save Shak ¥/ 7% Trons/afe back ¥/ Cx project ¥/ Ce Meve (ight ye origin 41 /e Draw the polygon again #/ SR veltore slate #/

You might also like