Rotating a 3D Point by a given degree angle in 3D Space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CodeNoob117
    New Member
    • Jan 2013
    • 19

    Rotating a 3D Point by a given degree angle in 3D Space

    Given a point at some location, and an angle with witch to rotate the point by, how would this be done mathematically?

    So, for example, my point is at 4,8,10 and I want to rotate it 28 degrees clockwise, how would this be done?

    Any ideas and info is appreciated.

    Thanks,
    CodeNoob117
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Well, there's one piece of information missing here: The axis around which the point should be rotated. We are after all dealing with tree dimensions and an angle works in only two of them.

    Luckily when you've decided on that, there are many articles online that will explain the mathematics behind such rotations; e.g. Rotation About an Arbitrary Axis in 3 Dimensions by Glenn Murray or The Mathematics of the 3D Rotation Matrix by Diana Gruber. The gist of it is this: Multiply your vector by a so called transformation matrix or rotation matrix. It may be a lot to wrap your head around at first but you only really have to program it once.

    Comment

    Working...