# Geometry Node: Vector Rotate Angle Incorrect?

I have 2 points p1 = (0, -1, 1) and p2 = (0, -1, 0). I am trying to rotate p2 around p1 with the axis of rotation as the x axis. So:

• I subtract p1 from p2 to get the vector V,
• rotate V with using Vector Rotate node with center at p1 and axis = (1, 0, 0) through a certain angle,
• add p1 to the resulting vector to get the new location of p2

Now if I change the angle in Vector Rotate node, the rotation angle does not correspond to the actual angle on view port. For example with the angle value around 37, the view port rotation angle is already close to 90 degrees.

Strangely, with p1 at origin there does not seem to be any issue and both the angle in the node and on view port correspond exactly.

How is this anomaly to be explained?

There could be other ways of achieving the rotation, but I am interested in knowing why Vector Rotate behaves the way it does.

• I subtract p1 from p2 to get the vector V

That is the vector V, from (0,0,0), (the object origin).

• rotate V with using Vector Rotate node with center at p1 and axis = (1, 0, 0) through a certain angle,

You are rotating the point at the end of V around p1 , not V's other end, which is at (0,0,0)

• add p1 to the resulting vector to get the new location of p2

For that to work, you would have to have rotated about (0,0,0) at step 2.

You could forget the subtraction and addition altogether, and just use the point p1 as the center of rotation for the point p2. The local rotation is thereby already provided by the node.

Because you can set the center of rotation, you don't have to: (move to origin + rotate about origin + move back to where you started)

Thanks very much to @Kuboå for this illustration!