Rotation of an unit vector in 3D space

253 Views Asked by At

I need to rotate an unit vector at a random point in 3D space. A point in 3D space "p" defines the base point of the unit vector. For simplicity, I want to rotate the vector around local Y axis at point "p". The orientation of local and global Y axes are same. I'm prgramming in Vb.net to compute some 3D point information. If anyone can help me some code snippets, it would be of great help. Thank you in advance.

Rotate along local Y axis at point "p"


To make my question clearer, here is the rotation I'm looking for

enter image description here

Kindly let me know the procedure to achieve the same.

Regards, Raghav

1

There are 1 best solutions below

0
On

I think you are making it more difficult than it actually is. Translate it to the origin, rotate it, then translate it back.