In Euclidean space I have a point p1 that can be anywhere (i.e is not fixed). I would like to calculate every time how to place another frame p2 relative to that p1 frame given a desired distance I want it to be.
Here is a picture: enter image description here
As you can see, I have a point P1 at an arbitrary position. I placed the point P2 at the desired relative position that I want P2 to be relative to P1.
I would like to calculate a such that, given any position of P1, I can place the P2 at the same relative position as I initially calculated a.
I think I need to find the difference between the x, y and z of the two and use it, but I am not sure if this will work for any direction of the x, y or z. Another option I have read is to find the unit vector of it, but I am quite lost about how to approach this problem.
Given $P1$ is $(3,4,5)$ and $P2$ is $(1,7,4)$ the difference is $(-2,3,-1)$. So, if $P1$ is relocated to $(12,6, 9)$ then $P2$ would need to be relocated to $12-2, 6+3, 9-1 = (10,9,8)$