I have a 3D line vector with end points x0
and x1
, which lies along the x-axis of a subsection of the plane, P
.
However P
has been translated, rotated and translated back from the global coordinate system by theta
degrees along the global x-axis. The following image should illustrate my point.
I need to rotate my 3D line vector by a known angle theta
to find the line between x0
and x2
.
Can this be done by a set of transformation matrices (i.e. translate, x-rotate to global xy-plane, z-rotate by theta then x-rotate and translate back)?
If so, how do I do this? I know the 3D vector equation is as below, but I'm not sure how to integrate that into the transformation.
UPDATE:
Thanks for the answers guys. I apologise for not making myself clear - my head's got in a bit of a muddle with all this!
So I have a world system as in the 1st image, where the Z-axis faces vertically up. $P$, the red plane section, is defined by it's normal (giving orientation) and it's distance, $d$, from the origin using the equation $\textbf{n}\cdot\textbf{x} = d$
$\textbf{n}$ is formed using the rotation of the plane in terms of the global coordinate system. That is, assume that $P$ was flat along the x-y plane, as with the black one. It was translated to the origin, rotated by (e.g.) 25 degrees, then translated back.
The actual problem I'm trying to solve is to simulate an object moving from the first (black) plane onto the 2nd (red). I know the direction and speed of the object's movement on the black plane, but I need to know it on the red. I know $x_0$, this is the objects position at the intersection of the two planes. I can work out $x_1$ by simply taking the unit direction vector from one end of P to the other (call this $l$) and multiplying it by the object's speed: $x_1 = x_0 + s*l$
However, my object may not be moving directly up the plane as assumed for $l$. We know the angle it's moving at relative to $l$, call this $\theta$. I need to work out the new vector for that direction, so I can add some multiple of it to $x_0$.