This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

Homework Title/No. : ____3____ Course Code :____CSE(405)_______ Course Tutor(if applicable) :_______ Date of submission : 06thapril 2011 Course Instructor : lect. Ruchikasinghal Date of Allotment : Student¶s Roll No. :__A26___

Section No. :____D1804______

Declaration : I declare that this assignment is my individual work. I have not copied from any other student¶s work or from any other source except where due acknowledgement is made explicitly in the text, nor has any part been written for me by another person.

Student¶s Signature: Ravi Evaluator¶s comments : ___________________________________________________________________________

Marks obtained :______________________ out of _________________________

Part . Translating back to original position.r. Translating to origin 2.sy.z0) be defined in terms of scaling with respect to the origin? Ans:Scaling about a fixed point P0(.z0) can be accomplished by the following: 1.A Q1. Scaling transformation w. Ans:- .sz are scaling factors Then the scaling transformation matrix is as Q2.x0.x0. Scaling 3.y0.t origin as:The equation is as:X¶= x*sx Y¶=y*sy Z¶= z*sz Where sx. How can scaling with respect to a point P0(.y0. Develop a text clipping algorithm that clips individual characters assuming that the characters are defined in a pixel grid of a specified size.

one side of the clip polygon is extended infinitely in both directions. All steps of clipping concave polygon 'W' by 5-sided convex polygon The Wailer Atherton algorithm overcomes this by returning a set of divided polygons. the new polygon may have coincident (i.Q3. Ans this is the algorithm begins with an input list of all vertices in the subject polygon. Ans:As given that v= i+j+k so. Once all sides of the clip polygon have been processed.Draw the flowchart illustrating the concept of hodgeman Sutherland clipping algorithm. so Sutherland Hodgeman is used for many rendering applications. and the path of the subject polygon is traversed. and write the pseudocode for the same. but not for other applications such as computing shadows. Next. the final generated list of vertices defines a new single polygon that is entirely visible. | v |= ¥ 12+ 12 + 12= ¥ 3 And N = 2i ±j-k so. Pseudo code Given a list of edges in a clip polygon. but is more complex and computationally more expensive. the following procedure clips the subject polygon against the clip polygon. This process is repeated iteratively for each clip polygon side. Point S = outputList. overlapping) edges this is acceptable for rendering.1/¥ 3¥ 6 1/¥ 6 1/¥ 3 0 -1/¥ 3¥ 6 -1/¥ 6 1/¥ 3 0 0 0 0 1 PART B Q4. and new vertices are added to the output list where the subject polygon path crosses the extended clip polygon line. and a list of vertices in a subject polygon. Note that if the subject polygon was concave at vertices outside the clipping polygon. List output List = subject Polygon. for (Point E in output List) do If (E inside clip Edge) then .12)= ¥ 4+1+1=¥ 6 Then the transformation vector matrix is as:- AV = ¥ 6/ ¥ 3 0 1/¥ 3 0 .last. Vertices from the input list are inserted into an output list if they lie on the visible side of the extended clip polygon line. using the output list from one stage as the input list for the next. Sutherland Hodgman can also be extended into 3D space by clipping the polygon paths based on the boundaries of planes defined by the viewing space. |N|= ¥ 22+ (-12) +(.e. Find the transformation which aligns vector V=I+J+K with the vector N=2I-J-K. For (Edge clip Edge in clip Polygon) do List input List = output List.

Edge) then E.10) against a clip window lower left hand corner(50.10) and upper right hand corner(80. Ans After clipping: . End if Q5.add inputList.if (S intputList.add (E).40). clipEdge)). not inside clip (ComputeIntersection(S.20) and p2(100. Perform the line clipping with the use of cohen Sutherland to clip line p1(70.

Using the Midpoint subdivision algorithm to find the visible portion.18) (1. (40. C(40. Visible portion of line segment PQis from (0.15) (50. B(40. 17) to(40.20) (20.15) (5. right window edge. A clipping window ABCD is specified as A(0. if any of the line segment joining the points P(-10. Ans. This is the intersectionpoint of line with left windowedge.Q. as PmQ istotally invisible (35. Neither segmentPPmnor PmQis either totally visible or trivially invisible.20) (50. .12) (42.12) continue with PmQ .17) (1.15) Save PPm& continue with PmQ (20. and we continue with PmQ.18) (5.0).e.40) .12) (50. 11). Hence.11) Continue with PmQ (38.17) (1.11) (42.17) Success.18) Continue with PmQ.17)(-1.as PPmistotally visible (35.17) Continue with PmQ (-1. Thissubdivision process continues until we find an intersection pointwith window edge i. the end point codes of point P will be 0001 and that of Q will be 0010. as Ppmistotally invisible (-3.10) (42.11) (38. This is the intersection point of line with (-10.11)(40.10)(20.6.Y). Table shows how the subdivision continues: PQ PmComment (-10.10).10) (35.0). as PmQ is totallyvisible. Lets keepsegment PPmfor later processing. Mid point is Xm= (X1+X2)/2= (50 + (-10))/2 = 20 Ym= (Y1+Y2)/2= (10 + 20)/2 = 15End point code for midpoint Pm(XmYm) is (0000). (-10.40) and D(0. hence we can conclude that the line cannot be rejected as invisible. Both end point codes are not zero and their logical AND are zero.17) Continue with PPm (-3.11) Success.17)Recall saved PPm& continueswith PPm.17) (-3.17) (0.11) Continue with PPm.Here for the given problem.20) and Q(50.20) (5.

- MSO202Lect17
- Algebra 2 SOL Things to Remember
- Handout9
- HW2 Solutions
- 1) C1 Algebra and Functions
- Section 1 Point 2
- INFINITE SERIES OBJECTIVE.doc
- Smarandache's Orthic Theorem
- f4 c1 Functions New 1
- An Introduction to Stifled Numbers
- 2_A Divisibility Problem
- Module
- FEmet_ch_4
- Sophomore Honors Geometry Study Guide
- 04 Indices
- Hyper Geometric Functions
- CCP303
- D07
- LS DYNA Basic Cards
- 216quiz1a S10 Solutions
- Boch Ner
- MATHSpart-1
- Some Useful Theorems
- distributions
- EE203_02_ode1_jan13_16s
- Ejercicios_numeros_complejos
- how to math
- Math 208 Differentials Hand Out
- Assignment I
- Trigonometric Graphs

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd