Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
39 views
33 pages
CG Notes
Uploaded by
Tarun Jain
AI-enhanced title
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
Download
Save
Save cg_notes For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
39 views
33 pages
CG Notes
Uploaded by
Tarun Jain
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save cg_notes For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save cg_notes For Later
You are on page 1
/ 33
Search
Fullscreen
ee, —:-— «|—s «| =—F[——xFr _=—~—~*—=CsF=F= BDA “gosithe — Digital Differential Analyzer. (Base on technique’ —~ The vector generation algossthn dn which steps along hes ine Jo determine the pixel which ghould be Junned. on ane sometimes called DDA. . - _—» Tk “is bobed on the principle : (ass yp) ane aimulraneously incremented by tet Va ‘Question gaat. 2, yisse Hgontm ararat a ar weer oko bo OG q num. metheds qf D*E). Shor She duo end "points Cay) 2 At & cones ponding dy. Scanned with CamScannerard thee aiSe it US Se A | &: Consider a dine Anom (0,0) fo (4,6) . Use dhe simple DAA algoiithm Me ocintovuze | She pom : : & Guy) = (Ge) 8 Garga)= (He) Cee a @ \ength = Ay 6 é ' @- Bing = AEH > 40 2 2 = 0-667 | © + Aength 6 1 : es yw = 8's a 6 ® Rizk 4 6. Sk inno) YE. Yur 0 5 & Sigen (Ay) te} > x= 0520: => x= O°5 $0667 *. 22 a 1.20 1-3 — x= \ 167 +0667 1834 %@)- Scanned with CamScannerSteps g DA Aljonithen + G&) Read the dine and points Guy) @ Anz \o-a] Ay= ly-ui] @® it (ax > dy) then length = Aa else length = Ay & Select the aster unit, ie. by Wo aye yoy: length length T ound the value te the 1 2 Gas ys) The sign function make the algorithm work in ol 4 guadsonts. Tt orelurns 1,0 vol. >The factor 0-5 makes it possi ble fo earnest inlegot mathen than duncaling them. © Now plot the points foCiz while Cig length) ; plot (Inte te Nofes Either, Ati, ot Atyine wall be 1 becaiie} 7 “ a integer) : R= K+ BX length is either (aa) ot Cy- yp) (&) X= XK + OS & sign(A%) y= y, +05 % sign(Ay) Scanned with CamScanner2 Yee WS 2S a5 4s “SS 66: aay . : ae : iy: Gay. OD, G2) OME Oe) O09 aye > NE! ica a Scanned with CamScannerSESS AALS A, Advantages gy DDA Algsiithnn : —> Te is faster than the dinect Use af Une eqyiation. —> Since, J+ caleulate points on fhe -Mne withouk ony Hloabin point mulfiplicabion. a zd —> Simple to implement , doe nat stequine any Special skills go implementation. : : ie Disadvantage 3 DD4 Algo - > Feesracy is poor. 3 TE is ostentation dependent , due to his end point accuragy is poor: ae joong poiat addi tion is SHY needed in delormining each is time Consusning - Successive point which . —> (umalive euro due fo Limited precision in Hoabing point, areprresen tation. Scanned with CamScannerG-) Dashed Une! Dashed tine con Asian ly usiag the DDA’ ald by leaving 0 gpoce, ate evasty 6 pixels. @) Dotted Line * Dotted dine can be drown osing ppa algonithe by leoxing a Space aren evayy ®D piel. : | The Scanned with CamScanner~ Bresenhams Line Dacousing Ali —> Tr is on acoole £ efficent woy fe nasterising (ine. — The main puinciple on which this algostithin wars is sto Find our the distance between the actual dine Jocation ond the Neayest pixel. —> The distance is Rnoun 0 decist on vantiable] ever. ee wee) wie “Guia 3a a Scanned with CamScannerQO: hz (20, 10)... Be (0,12), Tiustaate Baesenham' Assit \ Given, two end points +” & Qo,10) B (20,18) @ Find into) decision “potameter > -@) Fd’ An 2 Ay TRo= 2Ay — Art. : AW = Wy -X, = 80-20% 10, [ ©. Ay'='Y27 gi = ‘\g-10 = 8, (3) Find decision posia meta : Cose T “Oger Scanned with CamScannerAlgaxithen + (6) Read she Une 8 pees C8) and Gay) | Buch thot they axe not equd. @) & CGlodote ; cals al) & & “Ags ya a @®) Tnifiolize the shanting point (Cae, ep @) Coloulok the. intHol decision paxameter Po = 244 - Ax = @) TF &<0v" else on a ie (Re 70 t Suyv= tet ho he 20 QE Aes = %& tl Ge F 5 Yet Ror = fet 204-244 ~Plot Cau ster 4 Scanned with CamScannerCoseT + panes ytl. p> = = - 7 ed? ean \ xe st ft omer a + Increase eo 244-2] hoga usme unit, increment oR” An a | foeeye ae] wer. Durse aT Nikal na Padega Scanned with CamScanner-2 V4 lo or 22 23 a4 25 26 27 28 24 30 GA.) (ou \N) Gn) (23, 12), (24: 1a) (25, 14) (a6, 15) Qu) (28, 18) (08,1) (30, 18) Scanned with CamScannerLy En Ye tQe- | ' ' a Ye jo tenm & tsme Floohi ; point av Bhar e a SE oer gow | me ay ) cpp eeneestaas: ed Ad cas) 7 : , a oh di-d2 = 2Ay (tutt) 24, +2 a ae c ane ok bt ' ao «% : ps ——— ysodigens dele = 2hy(aer!) —Qawy + 2cda > Aa Gog) = abyee + 28g = 2, + pee ae | — . . 3 Gt konsa > Decision Pomnncies Sethe el — aay i oe (a4) BM hia el (e- 1): pixel lend > konsa 2Ay Ay — DAXYu 1 Scanned with CamScanner> oa ab A, oF ten? Yaz My 1G . vale a yc oe oa mal\ oz AY <\ At a? Scanned with CamScanner( Mid Point Girdle Poraming [gestibe « Grde TH Symmebiic Higune Sar a | i Tet erty Ge snoeel g woy Syramebory (8 “octank) sok eS a Scanned with CamScanneratl Ye mar GT (awe) HE) next point i. om (wetls Ye) ae qa a ¢t | : Said To apply the mi wee Sect Coy) - at * Junction = can be = 6 inside point ' * eo we delne cische function : ede point method , Tre vole 4 yhis i} | Cod =o. aoaee foe SO , ourside point oe Scanned with CamScannerColoslati ng this Function of the mid porar : &- teste Ca ue 7 4) = Cage i) : (yet) . — = & Ris. te is the decision rw jou “this ‘adgorit thin. 2 ~ - —-v Re a dant) tye et ¢ . ees = & eat yo F 2m “oe 4 noah : Cose I> PB <0 => the mid - point to inside She: duce boundaxy oe waar [gen = de | Scanned with CamScannerPeet 2 R. a ® -8 7 . = 2GREN Oe poe cH ye I) — ; (oe ae Cm ok 248) = (m2, e (eeayo a S arth ha rye th 7 3g ' | . +28 < (y) : _— +8 Yay ~ By Scanned with CamScannerAlganithm : @ Thpt vodius and civoumfenence 4. oa. Crcle centered ‘ob srarhing esd. Gey oh. is. an to(C ee Plat cenine Ger <) and obtain the First point on the Jgin (0,0) , the initial sn y Pot CHER egy if (peo) AE S Aearl pe przardyrl “Hrd ca wpe pret 3 while (<9) == AE derernine the Sym. > poinks jn. ath» Seven octants. ~~ SToP Scanned with CamScannerEr ®) - ® Ra R= = (ao rye + Par aE) (at eye + da,.~ wu 4 = | Scanned with CamScannerScanned with CamScannerEcce eeceeeeee cc eee ©. Using mid point civcle algonithm plot a cirde whose ovadtus js equal to NO 5 Centered - af She osiigin. i _ Go.) = (0,0): oF ie [Prot (19.9)..+ (0,-10) (-to,0)_ |: T —> Colaate. She initial deciston Posrameter s p= 6-v 5-10 =~ 85 Pen = Py + 2m 25 MT Py LPF ets] SAY Scanned with CamScannerR= DAy %& — DAayn +d Pet [ 2AY Bers ~ RA 2A AYe +d to [days ~ AY en +a z [pays oa . adyteed— 2A Yoo wf Aye * hay. “p = 2hy (ax *!) 7 DAAYwr — DAyt + 2hayu yar Fe ' nny 209 =~ 2xYyen 7 26% ets cd ke ‘ = 2dy - 2A4 (yee 7 yx) a _ . ‘ Lo Pet YT ane (460 98) | Scanned with CamScannerai R Re => ~ve then get Eee — er then yee Yet ae Scanned with CamScannerThe initial p volue 4 decision pasiommelen con be coleuloted os: 4 Anat = = 2a Cot) = dy, f 2c 7 —. ox (arad = aa dy Cat) -2Aaye F2bKE ~ 4 : =A -0 > [Ps Hed = Dbayo + 24%HG OA ye marc? Hot © 7 ay Ss yr Adw tc > gt Ye =m Scanned with CamScanner\ ‘, Ne Scanned with CamScannerBoundoory Ru } ostthm oe) — > Te ts used where We have to do an sntonachve painting ” Computer and dhe — interiot point con be easily Selected. fied boundary ina Single color, then the cll aloow Mn unl ounday color is eh encountertd gt - Black ) Q tor sre neighbowr'"g Red 4 Boundary colour. olowt and desk theix Gaaphics —>TF we have a gpect pmoceeds pixel by pixel Steps for Brudony ELL ffgeaithrn | \-Stont Joon any intention pixel uy pixels fo defermin whethot they ante a: Te not, then poiot the pixel with FL © af neignbowting pirels. a This process continues until all the pixels upto the boundary has een rested - ot wy 4 -cgnnected “ayy &- connects}er gestion t Bound any —Fi\I Cink a, tnt ys { it (getpixel Cay) \= beolor 24 gerpiel(my) | § putpixel ay, Lileolor) 5 - LL El (aa yy Hileolor, beolor) ; int Filleolor , tat beolot) = Filleolor ) Boundesty ~ / Boundexy- BW Caoyrh Filleolor, beolox) ; Boundary RU Cob yo Hucolor, beolox); | Boundary Ha, yh EMeolor, bcolor) 5 4 _Jnesbacks 1 — Oy FAR, Pehle se hi GG _intenion point (pixels) _gillcoler ia se Fu & at usse | geounsive Call terminake he jasge! EB) ty-connected 2 “B — connected methods invole heavy wecnsion urhich, Moy consume memory & Hime | | ee ee ee ee |Flood Fill A\gonitthm + — > Tr fs used to HU on otea where ty * 3 with a Gngle color. 2 boundary 1s not Specified —> we stot jeer a pixel valued Tha ore the desined jh color, the nea has mae ghon one intenior color We Con first He agsign pixels hove She Same cola. epeciFed inte vion pixel Guy) and xe assign all cusnen tly ser Jo a given intestor colot with ot pixel value so thot ali inteniot erther U-connected ot g- connected: approach » we fhen Shep —> Using ond od interior pose have been nepainkd. trough pixel positions Alooxitinm + i—— void Flood Hill Cink a, inky int oldcolor, int newcolot ) 4 if (get pixel (my) = = oldcolot ) 'put pixel G, 4, neweolos) 5 eae Mood bl Carl, 4, oldcolor, newealot) + Hood. Fill (a1, J) oldcolor, newcols) ; Nood- Ku a, yl, oldcola, newcol ot) : Rood Hd) Cats grt, oldcoler, newc¢olot) ; Rood FU Catt, yrb oldeolor newcolor) 5 Hood- HU Cath yt oldcclor, aewcoler) 5 Pood HU (HtL, Yel, old color, nawicols) Hood-Filk Ca-i, yes old color, newcolor) +Velyaon Filling F{gesitne ‘ => FiXing a polygon iso proces af colovning each 2 every pinel 4 that comes inside dhe polya Jregion ane two basic approaches used qe polygon filling [= seed FY algosithm c ‘ > Scan # ne” Algonitars peg @ Seed EN algoxithe + (seed dad att ar figure ka bich aT point) be Bourdany Fill algoaither ee\ 3 -—> Flood fidd algpaithre — There — > The inital etep te tM oa polygon ts fo test whether the point vs inside outside the polygon . —> For ‘resting juo methods ane used -S Trside out test = Non- Zeno winding number vule‘inside Out Test + —> Thc ss a Simple draw o Line segment belween She point p to be sested and a paint outside Counr how mony tn bonsechion \ ay the dine with fhe polygon boundan, the polygon: Now , i Secu ‘ ff the number is even then point Po ovs e@chyor point @ cise ce ds an tnteniot perar — Tr is also called ==° ODD PARITY CHECK". PpDean Line Pelygen Falling ) Hfyeuttien s —> Tr is used for solid colot Filhing jn alge pobyarne > 46 B 12 HIE IB Xo * “Trrengecttong = 8) 1B 1a, FAS. — Sort ont = A, eyia ie => Pon GAT = “ale Garg) ; U Take Bich jitne ar pixel e use HA aT FT!ee a Ae ty Fo each Scan Aine , do @) Obtain intenseclion point % Bean dine with polygon edges. tb) Sot the Satersectt ons ge" Saft fo dyght- @) Fair form the pois 9 intersection aa the List. FY within palrs, whe poels beburan the cooidinates ~ ond y- © Intersection points we updated fr each Scan Line. &) Stop when the Scan dine neaches Yea . ON ee eDota Structure Used * os J Lis Edge Table Cer) ~ 7 Ls qerve edge Table (aeT)
You might also like
CG Handwritten Notes For Btech Students (Computer Science)
PDF
No ratings yet
CG Handwritten Notes For Btech Students (Computer Science)
169 pages
Complete Compiler Design Notes
PDF
No ratings yet
Complete Compiler Design Notes
77 pages
DSA Notes
PDF
No ratings yet
DSA Notes
84 pages
Mste Formulas
PDF
No ratings yet
Mste Formulas
66 pages
CG Handwritten Notes For Btech Studentscomputer Science
PDF
No ratings yet
CG Handwritten Notes For Btech Studentscomputer Science
169 pages
Advance C Programming
PDF
No ratings yet
Advance C Programming
50 pages
(CH-3) Integration by Parts by Abdul Matin
PDF
No ratings yet
(CH-3) Integration by Parts by Abdul Matin
15 pages
Unit 1 Hand Written Notes
PDF
No ratings yet
Unit 1 Hand Written Notes
42 pages
Solutions (Plane Geometry-1)
PDF
No ratings yet
Solutions (Plane Geometry-1)
185 pages
دفتر الدكتور كامل (تقنيات عددية)
PDF
No ratings yet
دفتر الدكتور كامل (تقنيات عددية)
127 pages
9th Maths Practice 2024-25
PDF
No ratings yet
9th Maths Practice 2024-25
58 pages
Prectical File Computer Graphics
PDF
No ratings yet
Prectical File Computer Graphics
35 pages
Computer Graphics - 250119 - 235142
PDF
No ratings yet
Computer Graphics - 250119 - 235142
49 pages
DLD Short Notes
PDF
No ratings yet
DLD Short Notes
33 pages
3 - Computer Graphics
PDF
No ratings yet
3 - Computer Graphics
59 pages
X Math Assignment No-1
PDF
No ratings yet
X Math Assignment No-1
17 pages
PDE Lecture Notes1
PDF
No ratings yet
PDE Lecture Notes1
69 pages
11th Physics
PDF
No ratings yet
11th Physics
36 pages
CG Unit 2
PDF
No ratings yet
CG Unit 2
19 pages
CG and Oopm Practicals Write Up
PDF
No ratings yet
CG and Oopm Practicals Write Up
19 pages
DSP Assignment 1,2,3,4,5
PDF
No ratings yet
DSP Assignment 1,2,3,4,5
53 pages
CAD Lab - Exp - 1 - 7 - by - Anil Gupta
PDF
No ratings yet
CAD Lab - Exp - 1 - 7 - by - Anil Gupta
46 pages
CamScanner 09-13-2020 13.33.24
PDF
No ratings yet
CamScanner 09-13-2020 13.33.24
48 pages
CG Notesall2
PDF
No ratings yet
CG Notesall2
46 pages
Kathmandu Shiksha Multiple Campus: Tribhuwan University
PDF
No ratings yet
Kathmandu Shiksha Multiple Campus: Tribhuwan University
19 pages
Computer Graphics: Unit 2
PDF
No ratings yet
Computer Graphics: Unit 2
74 pages
Application of C.A.D in Civil Engineering @saikat
PDF
No ratings yet
Application of C.A.D in Civil Engineering @saikat
16 pages
Unit2 Coa
PDF
No ratings yet
Unit2 Coa
52 pages
MAT1001 ETH AP2024253000519 2024-12-12 Reference-Material-I
PDF
No ratings yet
MAT1001 ETH AP2024253000519 2024-12-12 Reference-Material-I
29 pages
Unit-5 DS
PDF
No ratings yet
Unit-5 DS
31 pages
1 LPP MTech
PDF
No ratings yet
1 LPP MTech
21 pages
Maths Prectical 1to5
PDF
No ratings yet
Maths Prectical 1to5
11 pages
CG Ut1
PDF
No ratings yet
CG Ut1
15 pages
ch15 Book Foley
PDF
No ratings yet
ch15 Book Foley
12 pages
Second and Higher Order Differential Equations Part 2 Notes Co4 2024
PDF
No ratings yet
Second and Higher Order Differential Equations Part 2 Notes Co4 2024
22 pages
DA 2 - 22BEE1014 (Revised)
PDF
No ratings yet
DA 2 - 22BEE1014 (Revised)
11 pages
Cgma PDF
PDF
No ratings yet
Cgma PDF
16 pages
Discrete Mathematics
PDF
No ratings yet
Discrete Mathematics
14 pages
Module 2 Complete Notes
PDF
No ratings yet
Module 2 Complete Notes
24 pages
Computer Graphics
PDF
No ratings yet
Computer Graphics
59 pages
Calculus Assignment 4
PDF
No ratings yet
Calculus Assignment 4
16 pages
SQL Chap3
PDF
No ratings yet
SQL Chap3
14 pages
Adobe Scan Sep 30, 2022
PDF
No ratings yet
Adobe Scan Sep 30, 2022
20 pages
Graph at Multi. Mati
PDF
No ratings yet
Graph at Multi. Mati
26 pages
Straight Lines 2M Revision
PDF
No ratings yet
Straight Lines 2M Revision
12 pages
Puter EngineeringSEM IVChoice Base T10015 Computer Graphics Q.P.CODE 21848 29 05 18
PDF
No ratings yet
Puter EngineeringSEM IVChoice Base T10015 Computer Graphics Q.P.CODE 21848 29 05 18
9 pages
Test Bank
PDF
No ratings yet
Test Bank
37 pages
5 6107088537339822663
PDF
No ratings yet
5 6107088537339822663
16 pages
Math2214 HW4
PDF
No ratings yet
Math2214 HW4
11 pages
Assignment Las Tyr Bca
PDF
No ratings yet
Assignment Las Tyr Bca
16 pages
DAA Algos and Master Theorem
PDF
No ratings yet
DAA Algos and Master Theorem
13 pages
s240 5 Mar 2022
PDF
No ratings yet
s240 5 Mar 2022
16 pages
DJ 2 Image To PDF 16-May-2024
PDF
No ratings yet
DJ 2 Image To PDF 16-May-2024
4 pages
Programming Using C Assignment 3 097
PDF
No ratings yet
Programming Using C Assignment 3 097
8 pages
Cal-1 Assignment 5 by 22131
PDF
No ratings yet
Cal-1 Assignment 5 by 22131
43 pages
5th B Div Nil
PDF
No ratings yet
5th B Div Nil
6 pages
CamScanner 05-01-2023 16.28
PDF
No ratings yet
CamScanner 05-01-2023 16.28
14 pages
Calculus - File#01
PDF
No ratings yet
Calculus - File#01
16 pages
Lagrange's Interpolation
PDF
No ratings yet
Lagrange's Interpolation
8 pages
DLD Short Notes
PDF
No ratings yet
DLD Short Notes
33 pages
CG Assignment-1
PDF
No ratings yet
CG Assignment-1
13 pages
Mathematics Management Assignment
PDF
No ratings yet
Mathematics Management Assignment
6 pages
Jacksparrowresume
PDF
No ratings yet
Jacksparrowresume
2 pages