I’ve been taught that the Axis input is the value for input vector n^ of the Rodrigues’ rotation formula:
v’ = (1-cos(θ))[(v·n^)n^]+cos(θ)v+sin(θ)n^×v
But I don’t understand what ‘’Center’’ input do. And its effect on the Rotation. I’ve done some tests in Blender. With Center = (0,0,0) and n^ = (0,0,1) the result looks like the following diagram:
Description: All vectors including v rotate around vector n^ = <0,0,1> (AKA Axis input) with its ‘’Center?’’ = <0,0,0> (AKA center input) for a θ angle
With Center = (1,0,0) and n^ = (0,0,1), the result looks like the following diagram:
Description: All vectors except for v rotate around vector n^ = <0,0,1> (AKA Axis input) with its ‘’Center?’’ at <1,0,0> (AKA center input) for a θ angle.
So my guess is: Axis input is to control direction, Center input is to control position? I’ve done researching and found out about the ‘’Rotation around a pivot point’’ formula:
p.x’ = [(p.x-o.x)*cos(θ)-(p.y-o.y)*sin(θ)]+o.x
p.y’ = [(p.x-o.x)*sin(θ)+(p.y-o.y)*cos(θ)]+o.y
This formula basically applies for cases where the ‘’point’’ of rotation is any where except for the Origin = (0,0,0)
But is this actually the case? Was this formula used for the instance where Center input = (1,0,0) ?
So my question is: what’s actually the math behind the Vector Rotate node? Assume I’m gonna use just Rodrigues’ Formula instead of Matrix 3D Rotation, what are the formulas, the steps and computations gonna be? Is ''Axis'' input actually used to define the direction for all vectors to rotate around and ''Center'' input to define the point for all vectors to rotate around? Illustration on how the process go would be greatly appreciated.
All of what I’ve said above are just speculations on how the node work but I need actual math and the proof of it.
Please explain like I’m five. Explanation along with mathematical proof would be amazing. Thank you!
In case, if anyone wants to illustrate a diagram for me, you can use mathcha.io , it’s a very cool ‘’write and share’’ mathematic site.
sh_node_vector_rotate_around_axis
, which callsaxis_angle_to_mat3
for the rotation matrix. $\endgroup$