# Absolute value of rotation of a point around a line in 3D

am struggling for hours with turning something that already works perfectly in 2D, into 3D space. Really hope someone can help…

The task is to determine the absolute rotation of a point around the coordinate system so that rotation can then be applied to another point. In 2D you do that with simple atan2(X, Y) that gives the angle which then can be applied to a point by rotating it around the origin (0,0).

But how would I do exactly the same in 3D space?

I know the procedure to compute the angle between two vectors (v1, v2): arccos( dot(v1, v2) / (magnitude(v1)*magnitude(v2)) )

However since I have only the input vector, I cannot use this. I would need an "origin vector" like [0,0] in 2D. Unfortunately the procedure fails when a vector is [0, 0, 0] (not surprising as it results in computing arccos of 0 / 0).

Does someone have an idea?

As additional information: I do know the normal vector of a plane where the point is found in but again I have the same problem that this normal vector does not contain an orientation,