Advertisement

How would I rotate a bunch of polygons on one axis?

Started by March 04, 2001 06:50 PM
2 comments, last by MrT 23 years, 11 months ago
Think of a Merry-go-round. I have 4 quads that are placed in a merry-go-round shape. How would I get all those quads to rotate around one single axis, located in the center of them, instead of each one invidiually rotating? Edited by - MrT on March 4, 2001 9:55:52 PM
Come on, just one damn reply

Advertisement
Hey-

I''m going to assume you''re using some 3D API like OpenGL or Direct3D to do this...

First of all, to draw your quads you''re doing this:

Move to where you want your quad to be
Draw the quad
Repeat

Add in this step before drawing the first quad:
Rotate the axis by whatever you want

It''s actually harder to make them rotate individually than all the same way.

I don''t know D3D, but in OpenGL the command is:
glRotatef(degree value, xrot, yrot, zrot);

Hope you find this one damn reply useful :-)

-Brian


"Humans need a higher system than god."
~ Trieze Khushrenada
Well, I''d have no idea how you would do it, but I know how Brian would do it

And more generally, it sounds like all you''re trying to do is rotate a bunch of points around the origin, pretending that the axis is the origin



--
Get a stripper on your desktop!

This topic is closed to new replies.

Advertisement