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)
44 views
35 pages
10 To 16 CGR Practical
Uploaded by
DHRUVIL RUPARELIYA
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 10 to 16 Cgr Practical For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
44 views
35 pages
10 To 16 CGR Practical
Uploaded by
DHRUVIL RUPARELIYA
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 10 to 16 Cgr Practical For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save 10 to 16 Cgr Practical For Later
You are on page 1
/ 35
Search
Fullscreen
xX ces Procedure 1p 1: Stat the program, P 2 apa the object coordinates PX For Translation a Woter the transation factors ty a Sears a) Enter th ea coordinate poston (xy) 10806 (ehayteyl ies xextx Ts yyy! and 2-74 SG Bisplay the object afer translation Step 4: For Sealing : 4 Input the seated factors sxsy ad 8% eon 2 ap forme coordinates (x1 7h xtmmta IY syand 21250 ©) Display the object after sealing Step 5: Stop the Program. VI, Algorithm x. step 4: start the program. : Step 9: Input the object Coordinates New efep 3: Por TranslaHon 7 a) Enter the transla Hon Factors 4%, ty diz: pyMove the original coordinate positon Ca y/2)49 9 nen positon Cas ys Badie «oatas, Y sytys and 2-222, e)Ddisplay the object atter FansiaHon. Step 4: For Seatin: x a) Snpud she Scaled factors 97/94 487. b) the Hanermed coordinates Cx1, ae =Y.89 > ra 17Yh, 21) 4 PHE%/YIOY.SY Soy IX. ~ =p L ie jz rer tarty tz Kanter Yeytys Ze2¢z2tA uoneonpg eotuypay, Jo prOK S1EIS ENYSEIEUON, pasn somosoz somo Kuy | _€ uae aremyos | Z| TH pws Suonvarioods peoig wu sy (UL) O40) (J HT wars) fwop | 1 uonesypads ‘oan0say JO AUEN [ON ’S pasn saaanosay “LLIX “soonoead peormpayAayes Mollod “7 pa{go yueasjes 10} uonoUny sorydexs sodoad yo osn amnsuy “€ “sqea pure sxrejq aquosop 01 0 ut saoeds nym es. “TZ “(8 uojoormras e tpi pus shun syuoUTETES D [Te eM ansuy “| suonnesesd —“IIX XOESOT WA FHL | 20 0°€ WISI, ++9/ 9 GML aroayos | _€ DIP] 10 0°S WISI XNINTTL | stuaomteds] axis smoputyyax smopuiy | worss Sunesedo | z ue 404 yoreq sad sy 0) payrumt] you mnq spxeMUO wash pue gp z winUUIE WWE sayndwio3, | “(eqesoyord gt-¢1) rendw0D somempseH | 1 I ‘saanosoy | “ON | spremay Apuend nopeoypads | so omen | ag paanbaa seaan0say “1 POD weaBord .,Ls Noneonpal [POIuYo= Jo prog amg ENGSeIEYEA eeecee eee mages f= Bupreas” Guy (60 (s1omsuy 204 291 BADDDDDRAR Soreurpioos snosussowoy urea “py “suoeuoysuen (ig Ut SoyeoIpUur oyeUIPI005 ~Z TEM *E ‘Burjeag CI 10} XUVBU MONLULIOJSHEN amp AEM “Z uone|sties] CIE 40} XUNeUI UONEULIOJSHEN otp SAA “T AD a (cpopaou g} saed asour ysene 40 papiaoid soBed 2u51q ‘sn asforaxo Surumuesfosd yeaofor [fe FOF AX 0} TIX PUB X 01 TILA 3W!Od 287) :940N) 4 “00 payfimuapy fo wuaunsaqya0 ay) 24nsua 01 $0 08 suopsonb yans 210M 6 uSisop isu soyonay “souriefo1 sof suoysoub ayduns sof 249 uast® Mopeg :210N suopsand paepy MINE “TAX 5 “Soo RpeUuoyrUoU “te rox wer bord puauaTs wt “apo “pares 807 sm" eee ae es ae “AIX TaD TTT Weedos ‘woneonpa jeoyuyooy, Jo prvog aims EYSECYE wastty POS PIT CUR (tomsuy 10y a9eds) ‘9218 [euIBuI0 sy yo aiqnop 0114 seas “wonsury ,pEIeg, Fussn Aq J wy aqno e esp OV WeABord ea “z wonooup Z UI stm Sp puE A UE SHUN cy “X UE SHUM gy Kq ‘uonouny ,pereq, Bursn £q 3 uy oqno v mesp 0} wwesBoId v OUIA\ =] ee ae vee apaau Jt sed o10Ut youHe 40 popiroad sosed yueyq 9sn asjoiaxo SujuuwueSoid UeAd}94 [JP JO} AX 0} [LIX PUE X OF [IIA IWlOd 287) :940N) 7 sBuyaorpoy oyp wtO4y [O/T “O JOULE [Leys A9Y>"0) Puy “TH idwayy 981049X4 “AX Greed maEID TTDComputer Graphics (22318) i) Z-Axis Rotation ‘axis rotation is identical to the 2D case: cos 0 - ytsin 0 sin 8+ y*cos 6 X-Axis Rotation X-axis rotation looks like Z-axis rotation if replace: yrcos 0- 2*sin 0 2'= y*sin 0+ 2%c0s 0 X'=x )) Y-Axis Rotation Y-axis rotation looks like Z-axis rotation if replace: 2'=z4c0s - x*sin 0 % z*sin 0+ x*cos 0 = ©) Display the object after rotation Step 4: Stop the Program, VU. Algorithm Step 4 Start S10p 2: Input the object coordingtes - Step 3: Por Rotation A) Emter the radian for potaton angle e 5) Perform rotation Ibous evah aig. 1) 2-axte rotation Z-axis rotation tg tdentical do the. 2D case; Xl =4¥ Cog O~y Fain Y= XP oinotyroose Z2Z W) x Any Als rotation \ooks Itke z-axke rotation t+ rep laces Y= YF tos0-2¥ ging Z'=y* singtzr cose leg HD ¥-Axle Rotation Veaxte —v — ZI=Z¥ cosQ- xf SING X= 2 gnO+7xF cose zy ° ¢) Display the object after rotaHon Step 4. otop. ‘Maharashtra State Board of Technical Education PyComputer Graphies (22318) 1X. Flow Chart Mput object coordinates enter_radian for rotahon angled, [eoestizcanis About Manis About [ars a¥case -yFsing yl= YXcosO- oF Sin Zl= 2¥ cos ~ sing Y= IFSINOF YXCogg | | 2'=YFsInOdZFCoSE I= 2¥SINOFH KOH [zizz oil a giey | X. ‘C? Program Code naa i i es I,IX. Flow Chart + Pe [Feet ari [Rnout a anie| ae ons ¥ Mle WFease -y*sing giz Y*cosO- 28 SIN 2PCOSO~ %F sing Y= Sino 4 yXcogg | [2!=YFsINO4d ZF COSE HVE 2¥SINOTN FeoOg zlez Hem yl=y X. *C? Program Code FOYOOE Seeyvevee ‘ys'e's x Fabaachra State Boor of Technical Edvcaton 8 feteComputer Graphies (22318) XI. Resources required Sr. ] Name of as Resource Specification Quantity Remarks Hardware: Computer (13-i5 preferable), Computer RAM minimum 2 GB and system ‘onwards but not limited to 7025] Open i 2 | Operating Windows XP/Windows : pe ira system TILINUX version 5.0 or later ee 3 | Software Turbo C/C++ Version 3.0 or later with DOSBOX XII. Precautions 1. Ensure that all C statements must end with a semicolon (:). 2. Use white spaces in ¢ to describe blanks and tabs. 3. Ensure use of proper graphics function for relevant object. 4. Follow safety/ethical practices XII. Resources used ne ‘Name of Resource Specification 1 | Computer System Intel (RY core Cm) Le with broad specifications Ram «4 2 | Software Turbo ¢ «| Any other resource used XIV. Result (Output of the Program) ble... 0. i write... pre.gram, For. BD. ‘transtarmatone... = XV. — Conelusion(s) tsb. sfudbelro.Implement.....pragram.for..2D. ansfor.mnaHon: XVI. Practical Related Questions Note: Below given are few sample questions for reference, Teacher must design ‘more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Write the transformation matrix for 3D Rotation about Z-axis. 2. Write the transformation matrix for 3D Rotation about X-axis, ‘Maharashtra State Board of Technical Education 86ug Ta SHOE 16 HO HEL04 JR 4) Hd ‘ole yowsk pla AC Fett ey Age fi tire Kevoedouy ww be pb yy ydexb guy” ub d pep yydwabperay 7 wi ‘ogge payor" (~ {f qe voy erepew™ COTE EWUDZTACAT (SUT TTY (sxomsuy 403 a9edg) : “sixe-f mnoge UORNEIOY CE 40j XENeLI HOHEUIOJsUBA OLB SHALE FILME LE LELELESLESE: PEvVUVUELYSuwonvanpg reotuyoo,L JO PAPOKI 1S EAUSEAPHE, ep pr as ym pray PE TOY STPITIXT CURE cana ppuey | (ssomsury 405 990dS) sixe- A punosv 9j8ueLsy DAI aU VOU “coy soonion aasty Ka pouyop auvin amt smesp or AVM “T sie peg, Buysn £q 9 uy 9qno w MRAP OVAL “T (yepo “wed “U 2x punose sp Ka aqno au aveI0u “WOREUNY Cpopoou jt sofied asout yoene 40 popraoad sased unyq xo fuwususnsBoad yueA3|u {8 0) AX. LX Pur X OF ILA Wied 250. 1030) sBuymorios aU) wHOas O/T “O FOTW ML!US aayauay puy “10 }duayny as14oxa “MAX Ge =Computer Graphics (22318) If both codes are 0000,(bitwise OR of the codes yields 0000 ) line lies completely inside the window: pass the endpoints to the draw routine. If both codes have a I in the same bit position (bitwise AND of the codes is not 0000), the line lies outside the window. It can be trivially rejected. Ifa line cannot be trivially accepted or rejected, at least one of the two endpoints, must Tie outside the window and the line segment crosses a window edge. This line must be clipped at the window edge before being passed to the drawing routine Examine one of the endpoints, say P=(X).Y;). Read Py's 4-bit code in order: Left- to-Right, Bottom-to-Top. . When a set bit (1) is found, compute the intersection I of the corresponding window edge with the line from Pi to P:. Replace P; with I and repeat the procedure, VIII, Algorithm Step 3: start Step 2: Read Cxmin,Ymin)¢ CAmMax, Ymax)- Step 8: Read ACKIYI), BCXD1Y2) end polnds of Wne- Step 4: compute outcode of AGB Tf YrSY¥max then oudcode_A tie} lye oO If Yo SYmax then code- BCI) =! alse oO it then outcode-Ata)c! Ase d Ymin then ouUtcode- Bc2)=) ase 0 H1 > Xmax then outcode_A(3) st elseo MM %2> %max then Outcode_ B(g)= IF 1> Amin then outcode_ A c4, 1Px2>%min then outcode-B(4) Step eseo 1 eleed =leseo * TR oudcodeA OP outcode.B ==0000 then Display the entire line ¢ goto steps. elseif outcode-A AND ode-B #0000 @ entre line. Compute the Intersecton polrt With window boundries = : & E: otop. ‘Maharashtra State Board of Technical EducationComputer Grophies @2318) r(etaRrT) IX. Flow Chart —fa@)=0 r I RI8)= of ———> a2~ e el Oe Ann > [nea=0 a, | p—focyer | 72> la Temes ’ Maharashtra State Board of Technical Educationcorm aoe vesrart) pr Cmax, Yona) 7 AN low Chart Read Cx © fread AGman ¢ ag caus) ent nouess e2tiae/ 1 Res 1 Seo —fa¢ne0 --— aps re ——— Sh iit ®. sayeof ——} oF ~s[a00)= 0[-— Al3)= of} ‘Maharashtra State Board of Technical Education 98Computer Graph XI Resources required [ Name oF “Rem Resource "| _Speetfetin Quantity | Remarks lardware Computer (38 Computer System | preferable), RAM minimum. 2 GB and onwards but not ee As per 2] Operating system | Windows XP/Windows batch size | xperime TILINUX version 5.0 oF Pxperimens Jater 3 | Software Turbo C/CH Version 30 ‘oF later with DOSBOX XI. Precautions 1, Ensure that all C statements must end with a semicolon (3). 2. Use white spaces in c to describe blanks and tabs. 3. Ensure use of proper graphies function for relevant object. 4, Follow safety/ethical practices. XIII. Resources used S.No. [Name of Resource | Specification | 1 [Gompiter System (Fel CRyeore (Tm) Is : with broad specifications Ram 1468 77 _[Sofiware Tarp ele Ul 3 _ | Any other resource used XIV. Result (Output of the Program) “Abie. jo lenplemeod,. pragram to.clip.line...using. cohen. sutherland Mne-clipping-atgertthmn: s soa tie, : XV. Conclusion(s) i “eohen. XVI. Practical Related Questions ‘ ‘Note: Below given are few sample questions for reference. Teacher must design the achievement of identified CO. ‘more such questions so as to ensure p (Note: Use Point VIII to X and XII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) i. Define clipping. ii How to calculate intersection points of line if line is partially visible. 96 ‘Maharashtra State Board of Technical EducationComputer Graphies 22318) p ili, Give 3 possible conditions to clip line using Cohen Sutherland line clipping algorithm, (Space for Answers) Practical..Reladted.. Questions... O4.Ans)..£linping.:..Chipning, p APOE op QNOONDNDDIS BIIS ww ee XVII. Exercise Attempt QI. and teacher shall allot Q. 2/Q.3 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Write four bit code for following lines and determine clipping categories of each line. PROBIDDBZID « & ° a Maharashtra State Board of Technical Education = 0© UUUCCG PUTT POO’ " 0 ¢ " f MN ANangnannnnnnonas rng 9 nan (Space for Answers) Ma GONtlome. tlc p)Rth.e.1LNe..pAgcee.Ahrough.Lre.b.0tlOM. FDL. line..ntersects Uist. chbe.. bods one. Qu.ndarey. 0. fA ALA A.00 CLI Rthe.. 1 e.pasees.ArxodghAe Vet KP QUO OLB £1 Db Abe. ADLOd.080.« {
[email protected]
#troMod.any. ANIL) ENEECI8.8, @4.).Ans). V8. AB OAO.D. 0 onljun.tine...1.8..coroplebely g-orly walls ble.ard.dnetelé.Ab& sonst dn Line...g...pactially. see SDL Ln _ mob teg.o0sp.tn-Line4- oosnpletely ouaticlel.2...pr2.wahin.dor0... ob AAR G.OCY.t2.bineJe..partally. PG.D.CY, #4 we NA BUI Beenerveeneeernetnrnee oye RG OEY Line... TM. ‘Maharashtra State Board of Technical Education 8Fann ae oy 3 OD Ce, Computer Graphies (22318) P2PS are completely invisible and hence removed. Line P4P3 and Line ible. Line P4P3 and P3PS are subdivided again and this procedure fe and invisible lines are found. Pa Ps. e If PA(xLy1) and P2(x2,y2) are two points then midpoint P3(x5,y5) is calculated as x34(x1+x2)/2 yoe(ylty2y2 VU. Algorithm Step 4) Start ee Step 2) Read end coordinates of tine ¢ right bottom ¢ left top coord clipping window, Step 8) compute outcode of A 4B FY soemax then Oureode-A) <1 eee 6 a aes then owtcode BCI)=1 ese o . ini ae Outeode Ao) =) alse o if Wm & outcode- BI2)=) ele g IR owes at they Otetcod e_ A, MAX then %1 < xmin then on tcede- Bt3) ! fF ow. Amin then Onced e AUH) = | ae Shep 4) IF Ucocde-B (4) = ° $0) |Foutsode # op Cuteode Bang app etse O en display the entre. tine. ¢ 9eto steps . sere outeode Ode’ £0000 4h en NHre, line. Maharashtra State Board of Technical Education 102hen (22510, Computer Grapes (22918 Caney Compe Me Rew Chart Fred Come rena Nmaf) rs + Pivide enireline i900 halves rom. mid pone rewrsively cal [ for both halves (Repeal step) | End Wah |xt Be Few) Bs F ] 8coeof “a 1 $¢$—frwnr hae F ace=0f —} | fk tems k a. < P laces Maharashira State Board of Technical Education 103ror ‘uoHeonpa jeoquyoay Jo pled aIFIS eAYsEIEYOPY “Corroge Gy DUC H TINY“ PIEBIIY (VI NTEIY” TIRE (sxomsuy 403 aoeds) “unpuso8ye Buiddyis aux] uorstaspqns wrodpryy Jo soBeiueapestp auzy\ “HE cunpno8ye Suiddiyo our uorstarpqns ywrodpryy pue pueproyng wayor aredwoy, “Cor'0s)zdpue(oz‘or-)14 simod omy usomiaq quFOdprut Jo sareuIps009 areIMo|e) *t ‘Cpopsou 31 safed azour yoeae 10 paptaoad saded 5uejq 9sn asioroxo BurwurexBosd yuwaa[as [Le JOP AX O1 [IX PUP XO} [ILA 1WlOd 98) :9}0N) “09 parfiruapt fo muauasary0 ays a1nsua 0} Sv os suoysanb yons a4out uiisop ssnu soyovay, “auaiafod sof suopsanb adums saf aay uas13 moje :210N Suonsand pareprey WHI “LAX “Un 406 15--Buiddjpa---2Up|--Goisp pane 4uedprus bun aay dy ap wesboxd pawewadwrswrsnyy : (S)uoysnjouoy “ax pasn sainosai Jomo Kuy | _¢ DOqInL arayos | z wy ay suonvoytoods pooig yntas 8 CUI) 2407 (a) tur wiaiskg saynduroy | wopeayioadg aganosay Jo aWEN FoN"S Pasn sasanosoy “1L1X soonouid Aiayes Molo ‘o9fgo auvAdjos 10} uoHouny soxyctes8 sodoud Jo esn omsug “qe puw SUBIq DquI9S9p 0} 9 Ut soOBdS OLY 9SQ) ~ (2) wojoonuuas & ynyas pua ast syuowtoners 3 jye rey aunsug ~ suopnesaad [1X iezey iD aa5 (22018) “SUTHERLAND HEN MIDPOINT SO BDIVISION COHEN D Dita. a. pompud.es..gropates.21g0rr phadiuls. tS. Cd nh OLN En cht ppingFA ivision.#a...deters. net O.34.t3..alternade...0.eHOn..o-f, ‘hep wsusheriand....thatUSes.the.. ton t.d.pelnt..o€...Lines.c0...0PfGe ty, é eh eee a ee adentify..0re..0£..teberseed 9) T+, requires thé... Poot, potnt...,o)The... mid. potat..2ubdivicten, operaéion-. S 4.19.0. lo.es..not..eguire SOO OO OOO SE XVI. Exercise Attempt Qf and teacher shall allot Q. 2/Q.3 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) oO ee 1. Using Midpoint subdivision line clipping algorithm illustrate a clipping of a line segment joining yo end points A(-1,5).B(3,8) by considering clipping window 4(-3,1) and upper right corner at(2,6). a (Space for Answers) ww Related... ~buestion’.. Ki Mgadvant.ages AA. Maharashtra State Board of Technical Education 105Computer Graphies (22318) . VIII. Algorithm Step 4) start Step 9: Read coordinates of all vertices of polygon. Step 9: Read tne coordinates of clipping window . Step 4s Consider the lett edge of the window. Step 5: Compare vertieee of each of the polygon, Individually with A'pping plane. Step ©: Gave the resuiting IntersecHon of vertices . cateulate the outcode of Read coordinates of all vertices OF polygon Read coordinates of ai ppin: IX. Flow Chart Stepe: Repeate the srep@® ¢@) for remaining edges of dipping winda Each tHme resultant list of verticer ts succesol vely passed to ext eclge of dipping Window, vertices of polygon company with leFt edge of dipping window reagan new vertex | Display polygon after cli pping oa ‘Maharashtra State Board of Technical Education 110Computer Graphics 22318) XII. Precautions 4. Ensure that all C statements must end witha semicolon (2) 2. Use white spaces in ¢ to describe blanks and tbs . Ensure use of proper graphics function for relevant object. 4. Follow safety/ethical practices. : : XII. Resources used Name of Resource Specification 1] Computer System THFEITRY Core (tm) #3 with broad specifications piri aa 2 | Software 2 furboe 3” | Any other resource used XIV. Result (Qutput of the Program) ea Bi flerclipping Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) i, If the first vertex is outside the clipping window and second point is inside the clipping window, then write which points are added to output vertex list. ii, Write the procedure to clip polygon using Sutherland Hodgeman Polygon Clipping algorithm. ) XVI. Practical Related Questions (Space for Answers) 1.0... 1y1.0.d9.9....pound.ary, TNE... Leckers ection day e....nttN...dnd.oep..bolndany..1 oneanpa woruyoay jo prog ares EAYSECHEN. OB ise oy Burpuowy «mapuym Suid a4yp apisuy 5 Oy erEdar or oopuryy Suyatd peo &A put SULTON bE earIa aby say yapysuay—-CoUy CTY. E66 Sb b04665%6 “unpnosye BurdditD woRKIog uewsBpoy puepsipng Buisn uoRKjod Sumotioy aip dil “1 (papoau jy so8ed a1our yoo 10 popraoid soSed sq osn asjosaxo HurunumesBoud swea2fox [f° 10} AX Ob TIX PU X 0% IITA Mod 987) 10ND Bupwowiog yp woay €-/z “O yoULe [LEYS aayj>eD) pue “1d dwn y 9S1049XF “LAX GCECCEEES VP tf ttf Vv uvVU ~~agbhod go-yuredaprsuy-pue-payad™ UD] pIVTT PUT gRes-oayy Pusage pr spysem : mopu: uv PUP oe A vu Jv LP iP tp tf / SE Jv (Silpul uoneanpg [eoIuyoa|, Jo prwog areIg BNYSEICYE NL TC yoog Teas’ euep:yoog/PHIM/B10 erpadryaua//:sdny “yp ey Z6gr-sorydes3-rynduzoo-o7-uononpout/wuoD'syooqyoa}aayy maLay/:dNy “€ juny'soiydesp-rondwo -Jo-soIseg/peojuMoc]-syoog-sous!agIamndwiod pau axjuddyooqoayy AUAAY/:GNY'Z GLELTEPS 18=UASHESOoguT'09'2|3008'syoog//:sduy “| Suypeay zaypany 10y suopsaB8ng / seouet2joY “TTAX ee orepupar GaptdyeayEgo~-eb payors agp esas Ge webRod-ayy por ways ; oer op prada yy ur ed uo HD asAD EU IE a KBSUaEE™ eee ete Bray eye SUPINE A PUB payed sus poHpwersyEHS Fo~ GIT RAED IES DD Lo Bh ta ait cen nein iia ii iiaProcedu 1. Hifbert subroutine draws the Hilbert curve. 2) Ittakes ax parameters the depth of recursion, and dx and dy values that give the direction in which it should de 13. Terecursively draws four smaller Hilbert curves and connects them with fines VI. Algorithm Step 4s Start WLLLE eo le Step9 DEANE MY FASGI9n Te =50 440 <150,ne10,F<2,d28 124, Vel; Step 8: Read value of 1 c tecurstvely eatt tne functon sept: Asstan Treks niibert ana move Step 5: Sekine function move Stent: Display the curve Stepe: Eng. Sdididelid 99090922 XL Res oe No. [assign m0 #50, yi [Read the wate off me 99999 9 999 és 2 ¢ 2 2 é =) 32> z a te he ee hy he te he Oe OS UOLE ING PeFe Ty two WET (TRE (saomsuy 405 295 “atno 8 119q]1F1 JO WorsuaUN [Pio pre oFTojodor autzm “we “pam auyact (popoou 31 Safed asou yoeare 30 papinoud soied yu 880 asioroxo SupwrurerBord ywergyas |]e 103 AX 01 [EX PUP X O1 TILA Wrog asf) :930N)) “09 poyfinop1 fo juauiasa}y20 94) s4nsua 01 S0 08 Suonsonb yons ax0u USisop isn ssyoway vouaiafos 10f suopsond 2pduns s2f 240 U9918 MOP “210N suopsond PavePA NI “LAX DAA HIG TT OR PRTPNES ON SN: (Suoysapsuey “ax (aieaBorg on Jo ndinO) NMSA “AIX pasn aaunosas soypo Ay | ¢ 4 4 4 ( { ( ( ( > o4qand auayos|_z peng dens aowdtog [1 Sp (uh) 2402 opus eds: ‘poanos031 40 WHEN [ON 'S Jip se slopanenent se. Omen PNSS | pasa s99an0soat‘uoneonpa [eo1uy94, 30 pico ayes eNYSEIEYEWL (0<1) +14 Ap THULE] '44U4 ) 4404 OP Huy “G4uy uy! (Repay egur ayy apn Uy ee ymydenb ra pao aE CU OTPESH IP NT UP HE” se SIS IBS CHURN (s1aasuy 105 a9eds) ‘AANO 8,49QI1F (-popoau J} soffvd asour ‘asn asiouox Buyuusfioud yueAd|o. Tey~ouny ETaT Ray og weesComputer ee Proceduri Koch curve: The Koch curve is a simple tract 7 i al that ereates a pretty snowflake-like object.’ ion algorithm is very simple: a Habeas 1, Start with a straight line: ee 2. Trisect the line into three segments: -—+—_-+_, 3. Form an equilateral triangle rising out of the middle segment: =e 4. Repeat, with newly formed segment. Ifyou start with an equilateral triangle instead of a line, you get the lovely image shown at the top of the article after a few iterations. Bezier Curve: : To each set of four points Po, P;, P2, Ps we associate a curve with the following properties: 1. Te starts at Po and ends at P3. 2. When it starts from Pp it heads directly towards Pj, and when it arrives at Ps it is coming from the direction of P2. 3. The entire curve is contained in the quadrilateral whose comers are the four given points (their convex hull). VII. Algorithm Step 4: start Step 2: Dedare and initlaltze x S10, Y)=100, 2 2400, Y2 =!00. Step 3: calewate float Angle =60x NPL) 1g0 13 CQL $xX2)/B Yo=(2* C4 t2R9%0)/B ye =CYtI*Yad/e 2 Aa +t (X44 -78) # Cos Langley 1Y4 ~Ya) * cinéangle). YoyaCx4%a) # Gln Cangley + Cys -Ya) # coscangle). Step : 1P >0 else goto steps linecuisy%arys), line 043,98/%y) We Ca syrs%4r 44, Mnec %4e444XojY2) Steps: end. Ei ‘Maharashtra State Board of Technical Educationi ncangle) C1BULIAK gry) #eoscongie) +¢yenya)® sincangle) 4 ya- Ceennay rain Congie) + (y #-y 8) * costangld) Thue! Fase line Cx 9174393) MmeCns,yar%y) Unelary, x44) line (a4 ry4,%2,yo) Foch 6%1,97,%3, 98) Koch Cv3,ys) Wi-t-l) koch (x) xe, y4,f koth x4, yY4/' X. — ‘C’ Program Code ‘Maharashtra State Board of Technical Education 127a a XI. Resources required Sr. [Name of | Specificati anti ne | Ramee pecification ‘Quantity ‘Remarks 1 | Hardware: Computer (13-15 preferable, Computer RAM minimum 2 GB and System onwards but not limited to ee aa. cae 2 | Operating system | Windows XP/Windows size Eaqurioneate LINUX version 5.0 or later 3 | Software Turbo C/C++ Version 3.0 or Jater with DOSBOX" XI. Precautions 1. Ensure that all C statements must end with'a semicolon (s). 2. Use white spaces in ¢ to describe blanks and tabs. 3. Ensure use of proper graphics function for relevant object. 4. Follow safety/ethical practices. XIII. Resources used S.No] Name of Resource Specification 1 | Computer System InFeI CR) Core €%mj1g with broad specifieations | RAM :46R ‘ bee Turbo c Any other resource used “XIV. Result (Output of the Program) XV. Conclusions) XVI. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design ‘more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) i. Define fractal. ii, Define fractal dimension and topological dimension. Maharashtra State Board of Technical Education 128~nuter Graphies (22318) XI. Resources required Sr. | Name of | Si pecification an ar pee Quantity Remarks 1 | Hardware: ‘Computer (13-15 preferable), Computer RAM minimum 2 GB and System onwards but not limited to ees eas aes 2 | Operating Windows XP/Windows size experince 7/LINUX version 5.0 or later 3 | Software Turbo C/C++ Version 3.0 o Ls ater with DOSBOX XI. Precautions 1. Ensure that all C statements must end with a semicolon (3) 2. Use white spaces in ¢ to describe blanks and tabs. 3. Ensure use of proper graphics function for relevant object. 4. Follow safety/ethical practices. XIII. Resources used S. No] Name of Resource Specification 1 | Computer System| intel Ce) Core €¥m)1B with broad specifieatons | pam :4éyn . 2 | Sota Turbo c ‘Any other resource used “XIV. Result (Output of the Program) Koch.Qu re. Ff... Bee. eh. £9.904.M).... Par... XVI. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) i, Define fractal. ii. Define fractal dimension and topological dimension. Maharashtra State Board of Technical Education 128Computer Graphies (22318) (Space for Answers) aun)..eracttcal.....Rel ated. .QUecd ONS Compler....detel a. £2. GENE: raged. le..Rormus@.:..TMe.ey . n.£...gegmnents: sth.e....thmengio.n..0b.5).L8. the. objech.te B.D. gbje.ccs...hke...0uLbe, sphere,.cte. then. l Barra h RUC cceer ree XVII. Exercise ‘Attempt QI. and teacher shall allot Q. 2/Q.3 from the following: (Note: Use Point VIII to X and XIII to XV for all relevant programming exercise use blank pages provided or attach more pages if needed.) 1. Draw following Bezier curve. 2. Draw following Koch curve. po. ‘Maharashtra State Board of Technical Education 129 Ls oesComputer Graphics (22318) (Space for Answers) HMA Bmcercis es .U)..AD.9).. Ab doclude..4.1 Wt Lnclud.e..£.00.01.0..0. ft inelude.s.gra.phiesach Aindudedmacthshz. Mold..madn..).. Dnt. 2.04-1.2.Yl4 Toh ADDL Rn Pht. Ae PLU Ho shang dt. oe LAL g ca ph.L.6.9.44$.9.M SLIMY RLOLENB GD. co.endin ates)... died’, Aet),.y ON: ab: Maharashtra State Board of Technical Education 730Maharashtra State Board of Technical Education Go ee (Space for Answers) HMI Brcerchse. 9.1).An9) A lnclude..294d.inh2 tLinclude.<.tenta.o>. #.include.s. graphics he thindude.
You might also like
Computer Graphics Lab Manual (CSIT)
PDF
No ratings yet
Computer Graphics Lab Manual (CSIT)
81 pages
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall
PDF
No ratings yet
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall
64 pages
8080A - 8085 Assembly Language Programming
PDF
No ratings yet
8080A - 8085 Assembly Language Programming
450 pages
07 - Apt Language
PDF
No ratings yet
07 - Apt Language
76 pages
Pps Record
PDF
No ratings yet
Pps Record
106 pages
CGR Manual
PDF
No ratings yet
CGR Manual
57 pages
2020 - 2023 III B.SC It GM Record Final
PDF
No ratings yet
2020 - 2023 III B.SC It GM Record Final
36 pages
CG Practical File
PDF
No ratings yet
CG Practical File
150 pages
C Program Notes
PDF
No ratings yet
C Program Notes
137 pages
CS114 - Fundamentals of Programming
PDF
No ratings yet
CS114 - Fundamentals of Programming
71 pages
CGR Practical 13 To 16
PDF
No ratings yet
CGR Practical 13 To 16
28 pages
Cglab
PDF
No ratings yet
Cglab
22 pages
Micg
PDF
No ratings yet
Micg
51 pages
Cad Lab Maniual
PDF
No ratings yet
Cad Lab Maniual
65 pages
Harshdeep Icf File
PDF
No ratings yet
Harshdeep Icf File
51 pages
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
PDF
No ratings yet
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
64 pages
DCP Unit-2
PDF
No ratings yet
DCP Unit-2
22 pages
ComputerOrganization L4 Arithmetic
PDF
No ratings yet
ComputerOrganization L4 Arithmetic
30 pages
MIC Micropraject PDF
PDF
No ratings yet
MIC Micropraject PDF
21 pages
CG File Mayank
PDF
No ratings yet
CG File Mayank
38 pages
Aashish CG
PDF
No ratings yet
Aashish CG
32 pages
Computer Graphics Lab Manual
PDF
No ratings yet
Computer Graphics Lab Manual
29 pages
Chip 8
PDF
No ratings yet
Chip 8
52 pages
NC Programing
PDF
No ratings yet
NC Programing
20 pages
CTP Unit - 1
PDF
No ratings yet
CTP Unit - 1
18 pages
Computer Graphics Lab Manual
PDF
No ratings yet
Computer Graphics Lab Manual
61 pages
Final CGR
PDF
No ratings yet
Final CGR
19 pages
NIIT - Graphics and Multimedia Subject Code - BSIT-51
PDF
No ratings yet
NIIT - Graphics and Multimedia Subject Code - BSIT-51
24 pages
CGR Practical No 5
PDF
No ratings yet
CGR Practical No 5
6 pages
Programs On Simple Computations
PDF
No ratings yet
Programs On Simple Computations
21 pages
CGR Group No 4
PDF
100% (2)
CGR Group No 4
14 pages
CSC 101-CSC 111 - Introduction To Computer Science - Lecture 4
PDF
100% (1)
CSC 101-CSC 111 - Introduction To Computer Science - Lecture 4
29 pages
CG Practical
PDF
No ratings yet
CG Practical
24 pages
TA ICT 1st Revison Guide IGCSE Venkata Dasi
PDF
No ratings yet
TA ICT 1st Revison Guide IGCSE Venkata Dasi
11 pages
Pygame
PDF
100% (2)
Pygame
186 pages
CGM Practical File by Akshat Agrawal
PDF
No ratings yet
CGM Practical File by Akshat Agrawal
21 pages
Experiment No.1
PDF
No ratings yet
Experiment No.1
18 pages
Kushal CG
PDF
No ratings yet
Kushal CG
32 pages
Computer Graphics
PDF
No ratings yet
Computer Graphics
51 pages
#Include #Include Void Main (Int GD DETECT, GM Initgraph (&gd,&gm,"d://tc//bgi") Setcolor (15) Line (100,200,100,300) Getch Closegraph )
PDF
No ratings yet
#Include #Include Void Main (Int GD DETECT, GM Initgraph (&gd,&gm,"d://tc//bgi") Setcolor (15) Line (100,200,100,300) Getch Closegraph )
23 pages
CGR Prac
PDF
No ratings yet
CGR Prac
8 pages
C Programming
PDF
No ratings yet
C Programming
42 pages
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
PDF
100% (1)
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
64 pages
CGR Lab Manual
PDF
No ratings yet
CGR Lab Manual
77 pages
CG PR 6 To 15
PDF
No ratings yet
CG PR 6 To 15
47 pages
Computer Graphics and Multemedia
PDF
No ratings yet
Computer Graphics and Multemedia
7 pages
GM Record Final
PDF
No ratings yet
GM Record Final
39 pages
1-10 Dsu
PDF
No ratings yet
1-10 Dsu
11 pages
C Programming Language Syllabus
PDF
No ratings yet
C Programming Language Syllabus
6 pages
Simulink - Dynamic System Simulation For MatLab 13
PDF
No ratings yet
Simulink - Dynamic System Simulation For MatLab 13
1 page
Computer Graphics and Multimedia Practical
PDF
No ratings yet
Computer Graphics and Multimedia Practical
39 pages
Assembly Language and Systems Programming For The IBM PC and Compatibles
PDF
No ratings yet
Assembly Language and Systems Programming For The IBM PC and Compatibles
222 pages
Se Unit 1
PDF
No ratings yet
Se Unit 1
27 pages
CG Practical
PDF
No ratings yet
CG Practical
10 pages
Microprocessors and Interfacing Programming and Hware 2nd Edition Solution Douglas V Hall PDF
PDF
No ratings yet
Microprocessors and Interfacing Programming and Hware 2nd Edition Solution Douglas V Hall PDF
64 pages
7y8567857645ghj768 PDF
PDF
No ratings yet
7y8567857645ghj768 PDF
64 pages
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
PDF
No ratings yet
Microprocessors and Interfacing Programming and Hardware 2nd Edition Solution Douglas V Hall PDF
64 pages
Basic Computer Gamesamazing
PDF
No ratings yet
Basic Computer Gamesamazing
1 page