6

I'm trying to rotate a point on a plane around the normal of the plane with a certain angle (so it stays on the plane).

For example:

  • Point = (0,0,1) (on the plane)
  • Normal = (0,1,0)
  • Angle = 33 degrees

But can't seem to figure out how to do it

EDIT:

The axis of rotation always passes through the origin (0,0,0)

RdR
  • 213
  • 3
  • 7

3 Answers3

4

If you're looking for axis-angle rotations in 3-space, Rodrigues's Rotation Formula is very useful. The Wikipedia page is pretty good: here

psalvaggio
  • 181
  • 5
0

Probably not optimal, but: find the span vectors of the plane (call them U and V), express the point P in terms of U and V and apply 2D rotation. PS: a normal does not fully define a plane; you need at least a point in the plane in addition.

zvrba
  • 24,186
  • 3
  • 55
  • 65
  • Then the normal and that point uniquely determine the plane, and since the point lies on the axis of the rotation, the rotation will be no-op. – zvrba Mar 20 '12 at 16:35
  • Actually, no. The OP stated (in an edit) that "The axis of rotation always passes through the origin (0,0,0)". The point to be rotated is on the plane, but is not necessarily (in fact, is unlikely to be) on that axis. – aldo Mar 20 '12 at 16:45
  • Well then, I blame the OP for incomplete problem description (I read the text before his comment). The method I described is still valid though. – zvrba Mar 20 '12 at 16:51
0

To compute the rotation matrix you want, you will need a bit of linear algebra. There is an article on Wikipedia which explains what you need to do.

hc_
  • 2,628
  • 1
  • 18
  • 19