Rotate a grid of points

Started by
0 comments, last by el junk 11 years, 2 months ago

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?

Advertisement

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).

This topic is closed to new replies.

Advertisement