Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
Hello Friends,
I have one problem related to rotation of point in 3D Space.
Suppose I have one point with X, Y and Z Co-Ordinate.
And now I want to rotate it by user defined degree (e.g 30 Degree) in 3D Space by User Define Axis of Rotation Axis (it may be x-axis, y-axis or z-axis) and Most important Must be rotated by User Define Given point with X, Y and Z Co-Ordinate.

In Short,
Rotate Given Point (with X, Y and Z Co-Ordinate)
1. By User Define Degree
2. By User Define Axis Of Rotation And Most important
3. Around User Define Given Point (with X, Y and Z Co-Ordinate)
I found Good link over here,
I think It Does not Satisfy Third Condition………….
Updated 16-Mar-11 23:24pm

I think this totally explains how to solve this simple problem:[^].

Share this answer
Espen Harlinn 21-Mar-11 5:06am    
Good link, my 5
Sergey Alexandrovich Kryukov 21-Mar-11 5:19am    
Thank you.
I think it explains it all.
This little elaboration will help you along the way:[^].
It shows how to combine the rotation matrices with a translation to achieve the rotation about a given point. The page you found gives you the rotation matrices for each axis rotation R0. The article I pointed to gives you the two transform matrices T-1 and T.
The resulting matrix for the rotation about the point (x,y,z) is then:
R(x,y,z) = T-1 * R0 * T

Alternative notation:
R(x,y,z) = T-1 x R0 x T

Best Regards,
Share this answer
Pritesh Aryan 17-Mar-11 9:54am    
Thank you so much for trying solution given by you........thanks...........
Manfred Rudolf Bihy 17-Mar-11 10:33am    
Great, I hope it works for you!
Espen Harlinn 17-Mar-11 10:14am    
Nice - even properly formatted, good effort - 5!
Manfred Rudolf Bihy 17-Mar-11 10:35am    
Just a couple of <sup> & <sub> tags, but what an effect! :)
Thanks for your support, Espen. It has not gone unnoticed.
Sergey Alexandrovich Kryukov 17-Mar-11 15:05pm    
Yes, this is how I write formulas, plus some Unicode characters. Your '*' is not quite right. So format can be improved :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900