Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: Getting angles to rotate plane to some normal

1. ## Getting angles to rotate plane to some normal

I was wondering if anyone knows to calculate any set of angles to rotate a plane with a normal n to a specified normal n' (or -n'). It does not matter at what point on the plane it gets rotated about.

• Originally Posted by Trinithis
I was wondering if anyone knows to calculate any set of angles to rotate a plane with a normal n to a specified normal n' (or -n'). It does not matter at what point on the plane it gets rotated about.
Code:
`cos a = <n, n'> / (| n | . | n' |)`
<a,b> - scalar product of a and b
| v | - must be probably 1 since n and n' are normals of the plane

best regards

• Doesn't that only work in 2D? For 3D I would need (xRot, yRot, zRot) for each of the axes.

• Originally Posted by Trinithis
Doesn't that only work in 2D? For 3D I would need (xRot, yRot, zRot) for each of the axes.
work for any dimension of the space because scalar product and vector size is redefined.( that if the space is liniar)

Code:
`<x1, ..., xn> , <y1, ..., yn> = x1*y1 + ... + xn * yn`
Code:
`| <x1, ..., xn> | = sqrt(x1^2 + ...+ xn^2)`
the angle is in the plane defined by vectors x and y.

best regards

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•