1 / 8

HomeWork 1 Solution

HomeWork 1 Solution. Chen Zhanqing. 1. What are the disadvantages of a graphics program written directly with the device driver commands?. Machine dependent. The program has to be rewritten if a different graphics device needs to be used.

lydia
Download Presentation

HomeWork 1 Solution

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HomeWork 1Solution Chen Zhanqing

  2. 1. What are the disadvantages of a graphics program written directly with the device driver commands? • Machine dependent. The program has to be rewritten if a different graphics device needs to be used. • Each device driver commands has only a primitive capability and the graphics program written with them would have a long list of the commands. This will result a bad readability of a program.

  3. 2. In describing the shape of an object, what is the main reason for using the object’s model coordinate system? • If the coordinates of any point on an object are defined with respect to the object’s model coordinate system, their values do not change even when the object is translated or rotated in the space. They are determined solely by the shape of the object.

  4. 3. Briefly describe the procedure by which the coordinate of a point on an object, measured with respect to the model coordinate system, are converted to the virtual screen device coordinates (u, v).

  5. 4.Explain why, in order to use a single matrix to represent the affine transformation, a point must be represented by homogeneous coordinates [x y z 1]T rather than the conventional [x y z]T. If using the homogeneous coordinates [x y z 1]T, we see the example above. P2 is the result vector p1 added by vector [ a b c]T. It is impossible to construct a matrix which could support the below equation.

  6. 5. Given a plane P and point q, the mirror point of q w.r.t. P, q(P), is a point such that P is the bi-sect plane of the line segment between q and q(P). Let T be the transformation matrix that transforms q to q(P), i.e., q(P) = T•q. Describe how you drive T using standard affine transformations such as rotation, translation, and scaling. Trans(∆x, ∆y, ∆z) to P and q, make sure the P could pass through the original point. Rot(t) to align the P coincident with yz (xy,xz)axis. And then do the mirror process, that is if the coordinate of a point is [u, v,w] the mirror position relate to x axis of that point is [u,-v,w], in matrix correlate to the homogenous coordinate is . Then we get the transform Rot(-t) , Trans(-∆x, -∆y,- ∆z) to put the plane back to original position. The result of the it is the mirrored position P(q) = Trans(-∆x, -∆y,- ∆z)* Rot(-t) * Mirror* Rot(t) * Trans(∆x, ∆y, ∆z) * q t is vector composed with tree angles.

  7. 6. There are two coordinate systems X1Y1Z1 and X2Y2Z2, where Z2 is opposite of Y1, X2 parallel with Z1, and Y2 is opposite of X1. The origin O2 when measured in X1Y1Z1 is (5, 5, 0). The X1Y1Z1 coordinates of point P is (2, 0, 3). (a) By visual judgment, obtain the X2Y2Z2 coordinates of P. (b) With respect to X1Y1Z1, using the standard Rotx(q),Roty(q), Rotz(q), and Trans(a,b,c) to derive the transformation T* that will transform the rigid body of X2Y2Z2 to coincide with X1Y1Z1. (c) Calculate P* = T* • [2 0 3 1]T. (d) Verify that P* identifies with the coordinates obtained in (a). (e) Is T* the T12 or T21?

  8. Answer of Problem.6 (1)[3, 3, 5]T (2)Trans (0,5,5) Rotz(-90degree)Roty(90degree) (3) Identical (4)T1->2

More Related