Programming Algorithms Question:

How do I rotate a 3D point?

Tweet Share WhatsApp

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 PDF Read All 30 Programming Algorithms Questions
Previous QuestionNext Question
How do I find a t value at a specific point on a bezier?What is ARCBALL?