🔒 Locked
Transformations
Advertisement
Original Post
Hi yee all doing out there?
The problem I have is that I want to be be able to do certain transformations and this has to be done using matrices.
Would someone be able to help me out?
Thank you kindly
Hiya
To rotate a square 45 degrees around the xy axis
To rotate a square 45 degrees around the xy axis
Is there a reason you cannot use glRotatef?
Tim
Tim
Im not sure if this will help you... but try using
matrix[16];
...do transformations, rotations etc
glLoadMatrixf(matrix);
Im not posative, but I think you can use this in place of glTranslate/glRotate()
http://www.ultimategameprogramming.com/OpenGLPage6.htm
go to the Cmatrix4x4 class tutorial
matrix[16];
...do transformations, rotations etc
glLoadMatrixf(matrix);
Im not posative, but I think you can use this in place of glTranslate/glRotate()
http://www.ultimategameprogramming.com/OpenGLPage6.htm
go to the Cmatrix4x4 class tutorial
Hi
I want to be able to show the maths behind it.
Thanks
I want to be able to show the maths behind it.
Thanks
Hi there
CAn somebody help with the following:
[cos(B) -sin(B) 0][x]
[sin(B) cos(B) 0] [y]
[0 0 1] [1]
A suare has the following points
(2,5)
(2,3)
(4,3)
(4,5)
I need to use the above quation to rotate the square anti-clockwise about the origin in the x/y plane by an angle of 90 degrees.
Can somebody help me out?
CAn somebody help with the following:
[cos(B) -sin(B) 0][x]
[sin(B) cos(B) 0] [y]
[0 0 1] [1]
A suare has the following points
(2,5)
(2,3)
(4,3)
(4,5)
I need to use the above quation to rotate the square anti-clockwise about the origin in the x/y plane by an angle of 90 degrees.
Can somebody help me out?
You actually don''t need to use matrix mathematics for this perticular problem. There''s a pretty cool and simple solution for this.
A 90 degree counterclockwise rotation on the x/y plane (around the z-axis) can be defined as:
pos = -y, x
Where x and y are the x and y coordinates of the point you want to transform.
A 90 degree counterclockwise rotation on the x/y plane (around the z-axis) can be defined as:
pos = -y, x
Where x and y are the x and y coordinates of the point you want to transform.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement