Programming Algorithms Question:
Download Job Interview Questions and Answers PDF
How do I rotate a 3D point?
Answer:
Assuming you want to rotate vectors around the origin of your coordinate system. (If you want to rotate around some other point, subtract its coordinates from the point you are rotating, do the rotation, and then add back what you subtracted.) In 3-D, you need not only an angle, but also an axis. (In higher dimensions it gets much worse, very quickly.) Actually, you need 3 independent numbers, and these come in a variety of flavors. The flavor I recommend is unit quaternions.
Download Programming Algorithms Interview Questions And Answers
PDF
Previous Question | Next Question |
How do I find a t value at a specific point on a bezier? | What is ARCBALL? |