Rotation of a random unit vector at a point in 3D space by an angle

I have a scenario where I need rotate a vector ( unit vector) at a point in space by an angle along Z-axis. Is it possible to help me to understand a procedure to achieve this. I'm using vb.net programming to do this programattically.

Here is the schematics for your understanding:

• angle along Z axis doesn't clarify plus you pictures don't even have labels for Axes. What is clarified is that you don't want to rotate around Z but along Z. Then there are only 2 options left either you want to rotate around X or Y. What do you want to do? – gallickgunner Aug 17 '18 at 14:04
• Sorry for not adding the coordinates. I wish to transform the point P(x,y,z) to origin O(0,0,0) without varying the vector V(i,j,k) orientation. I then want to rotate along the vertical axis (Z) by an angle and move back to point P which would form Vector V'(i',j',k'). (This is based on many examples in internet). Kindly let me know if you need any further information for your suggestion a solution. If possible please provide a code snippet. Thank you – Raghav Aug 19 '18 at 13:38
• let me phrase differently. Suppose the random vector is (1,0,0) which is your X-axis (assume front one). In this case, rotating along Z-axis (vertical axis) means you rotate the vector around Y-axis (right one). In another case let's say the vector is (0,1,0). Now rotating along Z means you rotate around X-axis. What exactly do you want in both cases? What happens when the vector is random? – gallickgunner Aug 19 '18 at 14:10
• As far as I am aware "rotate along" has no meaning. Could you clarify what you want (and perhaps why), preferably with specific examples? "Rotate around" the z axis would mean that the z coordinate stays fixed. "Translate in the z direction" would mean that only the z coordinate changes. Are either of those what you meant by "rotate along"? – trichoplax Aug 19 '18 at 21:39
• I will rephrase my question: 1)I need to rotate the vector V with the base point P by an angle. 2) The rotation axis is say for now is about a local Y axis at point P 3) The local Y axis orientation is similar to the global Y axis. Hope there could be some solution to this. I'm programming in VB.net for a 3D point calculation project. Kindly provide me some insight to approach this problem. Thank you. – Raghav Aug 22 '18 at 17:10