I'm given a plane $ax +by + cz + d = 0$ with normal vector $n$ = $(a,b,c)$.
My original coordinate system is located at $O$.
I want to move the coordinate system from $O$ to $O'$ like the image above.
$O'$ is the shortest distance from $O$ to the plane.
The goal is to see the point $p$ from the perspective of $O'$ instead of $O$
Reading up about 3D rotation, it seems that I can achieve that if I can find the transformation matrix. I'm thinking like
$z' = ||n||$
$x' = ???$
$y' = ||z' \times x'|| $
Now I have $z'$, if I have either $x'$ or $y'$, I can use cross product to find the other vector, that would be enough to find the other remaining vector.
But I'm don't know how to proceed at this stage to find either $x'$ or $y'$. Also, is this the right approach?
Appreciate any advice.