View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Rotate a grid of points

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

1 reply to this topic

### #1EpicCupcakes  Members

Posted 09 February 2013 - 10:01 PM

Right now I am trying to rotate a grid of individual points on the grid's center, to make it spin around its center like a top. However, all I've managed to do is make the grid orbit that point in a circle. How would I go about actually making an entire grid of points rotate around a central axis?

### #2deekr  Members

Posted 11 February 2013 - 01:25 AM

You will typically have a transformation stack that gets applied to each point before it's rendered. What you want is the right transformation in the right place in that stack.

You want a rotation transformation about the z-axis in the grid-frame, assuming the grid-frame has its origin at the center of the grid and the rotation axis is the z-axis.

If this is not what your grid-frame looks like (e.g., you are keeping an array of points in the YZ plane, that start from the origin and then go out in positive Y and Z), you can apply a transformation to the underlying data to put it in the grid-frame I described or you can apply a rotation transformation that makes sense for this frame (about the x-axis, in this case).

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.