Artificial intelligent assistant

Rotating vector around arbitry axis when vector is in origin {0,0,0} (3D) I'm trying to rotate a vector that is at the origin {0,0,0} around an arbitrary axis (in this case the rotation is around {40,30,30} through {40,31,30}). The problem appears to be that I can't rotate a {0,0,0} vector, because it always remains 0. I remedied this by moving it towards the point I want to rotate around ({40,30,30}) and moving it back after the rotation. However, I don't know if this is the right way to do it, and I'm having a hard time finding anything about it. As far as I understand, the translation towards the origin before rotation should take care of the problem that the vector to rotate is at the origin itself, but it doesn't appear to be working as such. It's software that I wrote myself, so it's possible I messed something up. But I'm really not sure anymore.

You can certainly rotate the point $(0,0,0)$ around your axis. Your axis is parallel to $y$ and offset from the origin by $50$ units. The easiest way to do this is to translate your axis and all of space to put the axis through the origin, rotate the space, and translate back. Your translation is then by $(-40,0,-30)$ so your zero vector moves to $(-40,0,-30)$. Now if you rotate this by an angle $\theta$ it becomes $(-40 \cos \theta -30 \sin \theta,0,30 \sin \theta -40 \cos \theta)$ if our sign conventions agree. Translating back then gives your final point as $(40-40 \cos \theta -30 \sin \theta,0,30+30 \sin \theta -40 \cos \theta)$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy acad2163858b007cef9b990b9c76fc6b