Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. First. implement the projection matrix which wilt transform the 3D coordinates into 2D suitable for plotting This is the function project [} . The

image text in transcribed
. First. implement the projection matrix which wilt transform the 3D coordinates into 2D suitable for plotting This is the function project [} . The camera is at location (what) and is looking toward the xy plane. just E described in the book. The book describes fairly exactly what this projection matrix should be. . Next, use project I: l to create a projection matrix corresponding to putting the 1riewer at location ({l,[},l[l.{l Stop and test . Next, implement the function moveTo (start, end} which takes a starting position and an ending positic and returns the matrix that translates an object from start to end . This shouid be fairly clear from the boo] Test this function by using it to create some matrices and inspect them to make sure they are correct. . Next, create the function rotate (x. y. z. loo} . This function returns the matrix corresponding to r: rotating 1 radians around the raxis, then rotating y radians around the yaxis, and then rotating z radians aroun the zaxis. The center of rotation is at point given by loo. which is in 3D homogeneous coordinates. Use thi to cause the ball to rotate in the proper direction as it moves, so that it looks like it is rolling. Test. . Finally, use rotate (3 to rotate the camera during timesteps it} to ME}, completing one full circle whil pointing toward the origin {and not getting closer or further from the origin}. This is done for you i ballTransformt} , you need to do it in houseTranaform [} Figure 2 shows a snapshot taken durin the rotation process

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Colouring And Applications

Authors: Pierre Hansen ,Odile Marcotte

1st Edition

0821819550, 978-0821819555

More Books

Students also viewed these Mathematics questions