Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer me as soon as 30 min. please. you will definately get best rating. please help me. 3. Model Transformations (12 marks) Assume the following

answer me as soon as 30 min. please. you will definately get best rating. please help me. image text in transcribed
image text in transcribed
3. Model Transformations (12 marks) Assume the following basic transformation functions are provided in a library and can be used by your program segments: mat4 Translate(float dx,float dy, float dz); // retum the 4x4 translation matrix mat4 Scaling(float sx, float sy, float sz); // return the 4x4 scaling matrix mat4 RotationX(float angle); // return the 4x4 rotation matrix around x-axis mat4 Rotationy(float angle): // return the 4x4 rotation matrix around y-axis mat4 RotationZ(float angle): // return the 4x4 rotation matrix around z-axis Furthermore, a C++ style operator overlodaing has been defined for matrix-matrix multiplication The object shown below is flat and parallel to the x-y plane. It is to be enlarged by a factor of 2, rotated about the reference point PO = (5.5, 5) such that the object will be parallel to the y-z plane. Write a segment of code to construct the matrix necessary for the above transformation operation. PO 2 END ===== 11 3. Model Transformations (12 marks) Assume the following basic transformation functions are provided in a library and can be used by your program segments: mat4 Translate(float dx,float dy, float dz); // retum the 4x4 translation matrix mat4 Scaling(float sx, float sy, float sz); // return the 4x4 scaling matrix mat4 RotationX(float angle); // return the 4x4 rotation matrix around x-axis mat4 Rotationy(float angle): // return the 4x4 rotation matrix around y-axis mat4 RotationZ(float angle): // return the 4x4 rotation matrix around z-axis Furthermore, a C++ style operator overlodaing has been defined for matrix-matrix multiplication The object shown below is flat and parallel to the x-y plane. It is to be enlarged by a factor of 2, rotated about the reference point PO = (5.5, 5) such that the object will be parallel to the y-z plane. Write a segment of code to construct the matrix necessary for the above transformation operation. PO 2 END ===== 11

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions