MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What should be done to rotate around a point that is not the origin?
A
Translate to origin, rotate about origin, then translate back to original position
B
Rotations can only be performed around the origin.
C
Perform a glRotate and specify the point to rotate around
D
None of the above
Explanation: 

Detailed explanation-1: -If your centre of rotation is not the origin, all you have to do is give each point “fake” coordinates – the ones they would have if your centre of rotation were the origin.

Detailed explanation-2: -Positive rotations are counterclockwise. Negative rotations are clockwise. For example, to rotate the point (2, 5) counterclockwise about the origin by 90 degrees, we use the rule: (x, y)→(−y, x) ( x, y ) → ( − y, x ) .

Detailed explanation-3: -Rotation by 180° about the origin: The rule for a rotation by 180° about the origin is (x, y)→(−x, −y) .

There is 1 question to complete.