Question: Topic: Computer Graphics Question 1. Given the following three transformation: TT: A translate with x=37,y=13x=37,y=13 RR: A rotation that rotates x-y plane counter-clockwise 30, and

Topic: Computer Graphics

Question 1. Given the following three transformation:

  • TT: A translate with x=37,y=13x=37,y=13
  • RR: A rotation that rotates x-y plane counter-clockwise 30, and
  • SS: A scaling with sx=2,sy=5sx=2,sy=5.

Find the following (for fraction numbers, such as those entries for rotation, keep 3 digits after decimal point):

i) The 33 homoginouse transformation matrix for each individule transformation listed above.

T = ?

R = ?

S = ?

ii) Find the combined homoginouse transformation matrix for first rotate, then translate and finally scale.

iii) Find the combined homoginouse transformation matrix for first translate, than rotate and finally scale.

Question 2:

Topic: Computer Graphics Question 1. Given theQuestion 3:

With reference to the bmp.h and bmp.cpp provided in the note, write a C/C++ function with the following function header to get the color components of a pixel located in (x, y) from the pixel data buffer of a bmp file.

int getColor (BMPImage *bmp; int x, int y, int *red, int *green, int *blue);

Assuming that the pixel coordinate of the lower left-hand corner is (0,0). We also assume that the file is read and the pixel map is loaded to the buffer. The function should return -1 if (x, y) is out of range, otherwise return 0 and the color components should be saved in parameter red, green and blue.

Question 4:

Given the following code segment which will be used to draw a dumbbell-like base component.

#define PI 3.1415926535898 GLint circle_points = 50; void MyCircle2f(GLfloat centerx, GLfloat centery, GLfloat radius){ GLint i; GLdouble angle; glBegin(GL_POLYGON); for (i = 0; i  

Try write a complete C/C++ program to use draw_object() and some other transforation to produce the output as shown in the figure. In the figure, there are 11 inter-connected basic components, each one is 2/3 times previouse one and is rotated 40 related to the previouse one. The figure consists of 11 basic components.

10 -6 3 7 2. Given that M 8 3 Given the following V find the corresponding M V T Le , express the result as a row vector the transpose of resulting column vector. Verify matrix format 2. V- [18 13 1 Verify matrix format 10 -6 3 7 2. Given that M 8 3 Given the following V find the corresponding M V T Le , express the result as a row vector the transpose of resulting column vector. Verify matrix format 2. V- [18 13 1 Verify matrix format

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!