You are on page 1of 18
Subjeck Name: compute graphice Sobjeck code + TecEbca Onrk - 4 Bemertny and Line Generation - inknoducton - en ee 6eg ments - Pert pe mb cules Le re = deglancs be tcoven a poing | and a Line —vect, On — Pewele and dname. buddes - Vec ton 8erenation — Brebeham'g | Salted . Arta lia sing od linea ~ Husk Line Segmente Chanacten gerenaton — display te gname bu Jdon programering Probleme , — Onih wi oo / primitives a iebnedaclon ] die play devicos - tHe Fi 8 play gile intenpneten — display ile Slructune - display control — teat - tre Line Style printh ye — pateg nammang problems. Poly gens : racer poly gor 6 - polygon nee - entation ~ Eritening polygon = ao > Test Poly gor Tiber acing algors tars 4illing polygore - dilling asith a pattern — | ° toblems. Insta je ving - PxHOnammi ng Pao Omit - mw THoné formaboré : titkxoduchion - Mats ces - Seo Ling tnorre -Jonmationg - Sin ard Cos — Rotobi or ~ homage neous coondina tes and Frareloton ~ Coond« nate Trane donmatiors - Rointion about an Amb itoowy potrt — abhor toronedon (- matter —Tnvernge Tanne domme bong — . lore Ose poroco dune & - px@sranrmtitg prob . pled Segments + infroducton — segment table + Crel,| onthe Ww - closing - deleting - neraming Sayrent = Ni eibr lily | —= Othen display dile Slrucluve — Comesiaser | indocsing a d clipping p-fechnies ~ pOgsaming » free eae _ The view!ng “bronadonmabion + | viewing Laanedonmaton implemen tabvor - | elipping _ The cohen - 8uthenlond outode | Algozuthnrs _ The GuthenLand = Hodgmrar Al gon thre 8 - The clipping ed poly gorra ~ Geresta lized clipping — Hultsple cirdeew.ing - page menieg problems . onit-V ee reborn acton Sithooduction ~ Handusase ~ Trpof Device - Hand Ling Algorithms - Evert hard Ling - Bampled Devices - The Oetectobislity ofsibutee | Siruloting o locale with a pia. eacheing-| infesachve Techniques ~ Pigg nar ir | a | pryoblenrs - ae Teeck book. + Compukex SB pkica (A preg tanrming Approach Bnd edition - Steven Haxning tor Compouten Gisaphscsa (Cory Core | > plonaing Committe og Me Aseoce'obton . | Gke 21940 . | PHrGa FGike ~ Garapkics kennel syetem Com Per SPHrs _ prognammex Hierarchy yo v File Fosmalg proce fom pictore dural 's og, M - compoken Grrapkics Meta infomation es dile. Intenackve gnapkics 6 tandands, > CGI - Computer Graphica Intengace . Command of cor? or Dedine COr 9 * Computen Cinaphice '@ an ant og doracding pickwree am Computen Scneer colt the help o¢ Programméng langucge . * TL tnvolvee compulatione, ¢reahiong and Marepulotton of data i * TE 16 aleo called am - it kenactsve Camputer Graphics because the vgex interact osth the Machine thorough pickuveés charts and diag name - * In tayo the Qraph'’cs Standand planning Committe oq te Association developed a Griapkica System called CoRE. HTL tn clude 8 Bkandand Sct of commarde #0 Contsa| the congtruction and die play oe the + mrage . ¥ Becond Glandand called the Grapkice kernel, System COks). & third Bhandend called te (pH7G.8) Pog na mnren hienanchy Tn benrachive Qropkics Btandasde . (The phrase gile doxmrat te divided into too domme . '. COM > Computer ovapkica Meta file 2° COT + Computer Qrapkice Imbendace . oe Jie oe oe ee pichere ingon mation g . % Com dile dostmat provides procoduna) tnterdace fo display the image : Jéne: % USen can specidy @ poink with an ordered pain OF Numbers C x4) & ~ Hor zontal distance Y~ Veta | di btance , * Two Poinke will Spedgy a Line . TY too Points ase tged to Spect$y aline Cart. yr) CX >Ya) hen te Equakbor gon line fe U-Giez §o-d1 5 —o eee Lo - * Moltiphying by the denominetone gives | the doe . Ca-ay> -(Yo-Yrd = Cy-gd-(ma- 7) 76 Solving don Y Gives ae Ya-d , (aaa )t Yr — @® Wy - Yo math > @ where me d2-§ ? bey, *Thre +8 called tte Slope inten cept dose DS the line. WH, * The Slope m change nr hekg ht divided bey change in aiddh . The imtencepl bie the height of coho the Line paoceea the Y 2xes - i ffeorent doxnr oy [no Fwobene t- CYo-gde ~(t5-5,)¥ + may) —~ i Y2= Oo Tort sy st -0 +O whene Y= (Ya-i) 8 = (Cy - 24) E> (omy, - 20) Lire Segment : * The [nes can be extend gon ever both Soncaosd and backward . the Lire deg ment may be 8 pecidy by ike kwo end pointe darom these end pointe user Can defexmine the equation Of the Line gon this Equotion and emd pointe. we Gan deceide ‘4 arcy point thee an ia not on the Segre wt : Prt Caisgid Po = C% Ys Y= max+b. * Then arnothen point pg = (239459 Linee on dhe Segment ig. Yas Mxgth rim C9 Xr Ly Squaned wil] equal fo kre Syuene Og Fhe Length between (a) > 41) and Ces 14a) The distance fommulo 16, CO 4 Cog a2 Co-m) + (0- Yar = Cari-axy) FP 4 (gr -d2)° 3 @ ge CT ha oe (-m.)* 4+ (dr -Yayt 2 os Wh + af 4 yp = + 0% seve, + Vit yh -agiy, @-- Fee, ~ OY, ys >@ Con) gi —~%, eye ® Subehtude Yr omit), Yo - max, my oof a af MIE Ans * Theriedone' id $06 Iineg ane pe npertyculan « The glope ase od one line will be the negat ve Jecapnocal elope of the other Line, | Vectors = HA Vectos has a single dinection and a length : * A vector may be denoted by CDx»dyd Gohene, De inds cates how fon +. move along the a -a08 dénection. DY indicotee how dom $0 move along the ¥ - aeis dinecton . dy A Vecton . * Teo Vectare may be added by adding thers, | Jieepect've component « Vigne = [wy ogi J+ PO% > P4e2J = Cpe, +D% 7 D9 4082) we con algo Mult ply & veckon by a morte by mote phying each od tkig ike componente , nv =n [Da .dyJ= [nde, ndy J magnitude i6 given by the Vectons length. IN] 2 (de® +ayt) Yo Porame tric rquetion of a Line ia, Ve NMiFU CVa-VI) whene , Ve losyy 4 = Dos yi Vo= Pore sya), Piwele ond Frome buggers + * Piwele > pichine element. We bosic ont of programmable coles an 4 Compete x display. ¥ Pimele ane the Smallest uni. ros dig Ploy . mie agehl * Th fori € Reclution te the dind ae the rom beor od picele that ane ep lay °" image» ied. Pexy Inge dox a - + 6 5 4 8 A pizal a 1 oa 3 AH 5 6 4 8 4 & The nesolubion 16 ued bo descxibal the ghanpness and claxity of an image. tack picola has a name and address. * frame badder comlains an internal nepne dentation Of tre tnrage . * Os play devices con access tha ornay fo delenmime the intercity af aakich each piccela ghould be a eplay . Vecton Gierenation : The Pzioceas of * bonniing on’ the pixels dor a Lne Segment is called Vector Genenaton ther. Thene ane too déffenent fypes 07° algoxitt 1, DDA - Digital Diddemen#al Analyser 2. Bresorham's Algonithn ~ DDdA COig thal oiddenertial Analy 62 } Ve Jobe fake the Sorhing pl of Ifre ae Cor ay and ending pias (% 24s 3. Find dhe Slepe poreece @,-*! im cremen 8 +4 the slope mis jeas thon t (ms 21) x a8 X,4t and folaijote y as Yr =yitm. mst) * Ah. 14 the Slope rm 58 greater then | X08 X= inenemem Yas Yitt and caleulole XV 5.1g the slope mm is equal fo t (oret) frrenement both \ and Yo Xr exith yer Vite 6. Repeat the etepa sill end of the Line Co 543) fg neached . A Pixel ea ne Staxfing poin § Clo 1) bere 5 i 56 ending point + C8, 7) oe 7 ie oo cose a cage 3 ee mat a ee 49 Kur axth Xess kee kk = Xkt! yest =Yktm Yerreyyay YR =YKA wel, get Slope m= Go-8: &_=8> Ya=T =o |X Yo Xun Yk fete u 12 20-9 @,2) Xuays Xut! yeti = Yum | a Ga ee cher ¥ _ posr=3 AM (545) > te Beto -Bb-o-TA | 3 Oe 288 Goa 4 358 5 | S DBto a= 3:58 5 © Nenu) 6 % S78 (56) 6 5.3 7 bb (47) 7 LU LL i) lie a i 4 fn a | KR | H + v \J i iH ite Height og the Line above piael - 000 boondo ries. i Sadvantages : . |X Thene fe'an orlna ovenkead od osing 20end Odd () domchion. A Using round off() dunckfen incmeases hime Compleceity of the a lgoni ther » A#Resulted [nee ang not Smooth because od Hound odj () douctfon , A The points generoted by this alg ox th er ane fod aceunate . Algo th ve —_—— Yecton Gre mea (XASYA, XByyB, | INTENSE Ty ) - For chong 09 pixel v. fa lueg badder along a ene Samer od the K. dane — —_ I UNUNSEREe tera rR eR Eee eR ar Reece eR eT REECE eR TEER EERSTE OEE EE eee eee Eee Angumente XA and ya ane tre coondinates ©d one endpoint. XBard YB axe te Coordinates of He othe endpoint . INTENSTT ie bre inten ify settieg doko Used dom tHe vecton. Gilobkel ~ FRAME tHe two~ dimensional drome. bar fer onney . loco}. Dx, Dy the Vector bo be drawn . Rand c the mow and column indécos don the piael + be changed. F the Stopping indasc © the line &gmenk ceondinate at the Standing Pott + H the digdfencnco between tre Line Segetent and te now Indes . bh the dlope og Line Segment . mn the change fn Hwokena bouncdazy 18 cneseel. BEGIN detexmine Hre Components af tre Vector Ox = KB-xA; Dy < YB -ya; decide on whelhes fo Step acro on Te lox] $1 Dy! THen op Nou BEGIN the gentle glope caw PUPPET cet TSR et ce RTT Ec TaTTE Ee SeRTTECeTaTOE TR TeeRTTESRELESORISSTEEEECRITerETESSTTE I RTHISURTIB HRI RES ESE ~ Should sow chore. ay 0x5 Je om chy, Me oe poind depen : ch Tre H Soe THEN Sek up og 90% ing 1g dedtrros poind BEGAN Reet; TF Dx $0 THEN a He Hams Grr ce CEFLING (XA); =o D< yatm#(C-XA)5 Elee Hhov nove Cham WHtle CZ pp, eee - To | Te WSo-5 Then FGI4N Sed the ‘ | : eOMCaL Pinel tr Lhe dname Rept, : budtes 3 be lea He Hamme ane Coay < NTE gy : Next coly, TTY 5 a my fise Hawt hy ee cy, 5 EuD 5 END, dH-1s0 + @ Fe : ND 5 H te oli) daockonal poxt to Hemove Flee that , Be Gow hull ply by Dx the Shanp Slope ce @DKH -Dx 30 3@® TE Dy = 0-0 THEN RETURN 5 hene Hre above aleps axe Jepead ed with the melee Y x and y interchanpey Guppoge we deding Gag G= QDxXH -Dx the test is Giso END » 2D H= G+Dx Reroen; Ox - END 4 Wneo <_ Hold tt ther, Boe Semham's Algont thn: : Grew +Ox oy #7 an be implemented endinoly with Rx ~ | ton) imbegen anithmetic operations , Ginew < Groid + 2D x * Inbeson asvthmetic operalsone (@ arch dager than, Floating potn openabion « Tt doeg rot ang recover ( requi-ve y erculdphe ~ cation om division . | Foo the case | H ree <— Hold + HI | we ges Ginew <— Steld +aDy —2Dx- Fon gentle elope cow the test wag | ieee | Aigenitim sreserhonm Cxaryay % Ye» ewhene He Hits | FWTENGrTY) Fos oe low | dhe dname budlen along a Line Suge Hoban shat each columy moze | coith integen endpoints . Cqwcty tad coe fon Fewnite Lhe test ag | HO yo 3 @ AxgomentssxA and YA ane the coondinotes % one end point. how Wwe can Molt ely oe . XBand ye ane the det ntegen | Other endpoint - pometty Setting #0 by Twrenssty is He inbertscty J used Jon Hhe vector « ; Globo) . Fearne the too- dimensional dvome buddex anvey « SOx dy the vector Ric the noo and colum the pixel. Fthe dina] new on column « Gr don Leaking TNet Fresenrent Yor Gr che HOw oy Column '8 onchanged . olv "y Incnement doo Gr wher J10W on ko be daiacn Local ° n inds ws fox anced Column Changes. fog ~ Blopr “a dlag bo trdicote id the Blope 18 posittve . BE Gan detenmine the Components Dx <= XB -XA; Dy < Ye-ya; detesmine the Sign of the Slope Pes ~ @lopr < Cdxs 0); BF DY <0 THEN Pos. Slope <-noT pos _ decide On cohethes to dhe Slope ; 991 Ob s10w8 . P aenosg Cole Te kox] S joy} THE NY BEGry Thi 6 OY tHre Vector omg "6 dhe Gemle 4 7. THEN BEG a fope cage dona reso HOW OF Colm, | ce XA; R< YA; F< Bs FND { i Fler | BE GTN c<— xB; R< yB; Fe xa; END; Trove axldyl 5 | Ge a % [Dy!-Wx! 5 INCa < ax ( bey!-lox!); TF poS_ Slope THEN Be Gin Mow Shep acnoss the WHILE CZF mC BEGIN fine seymens Sek neaneet pixe} in dhe dame budjex FRAME Co,RJ < INTEN ao mex! Colemn C< cH; Should sow char TR Go THEN | Beou Reps. Ha G+INCS 5 | END PISE G <6 HoNcd « END 5 END ; — Se Flee : - : Bees 4 Ank alia 8ing og Line (pete (cg tal ' mang display devites Allow only boo BE GaN | d : ot meanest piael tr He Iam, Pinels States, O7 07 Odd. Fon Hee displays, pee Lines mag hove a dogged Cor) shai - step FRAmE [ORI C INTENSITY 5 trex Column eects Should now chayye Te Gr So THEN BEGIN Re e-; G < INCA, END Flee G< G+INe1 3 Ewo ; ENO; END Elee BEGry Thie te the Sharp Blop a me the above Steps ane stepeated with the soles ef a and Y thdex Chong END s RETURN . 3 ENO: No ; Qppeomeone . Thi g aspect fs called ali esing . Aboging Pxroduco the dedoxts when te images moves dasten. 5 5 5 4 oa A 4 , 9 : a a 5 ' : = Shenkigy ei ‘a ‘ Cos chy (aed) ending point + (8.4) Sunt deSplay devices allows setiing pixels Jo gray level between black and shite cokich paovides a technic #o reduce alioging eddect. The technique !9 Called Anti ~aliosing. Ti uses the Grey levele to guiodually fon Od dhe péocels in one Now, aget grodually Lorns on the pleele im the next now. methods of Anieoliaeing :- | 1. post Jilte xing, > od. Pre Jiltening . a: pioele Phasing .

You might also like