Hi Adrian,

First of all, thanks for your quick and detailed reply.

Although my description seems to be on some loose screws you picked out my problem perfectly. Sorry for that.

Indeed, what I need is the inverse problem. I've got 2 points in space (3d) and need the angles or rotation matrix as solution.

In my last post I only talked about a single vector, trying to keep my question as simple as possible. I'll try to give more detail because maybe I'm missing things.

The vector I discribed is part of a triangle plane which represents the body of a robot. The triangle has got 3 points (P, B, C) and an origin O. This can be seen in my beautifull ASCII art

Code:

P +
/ |
/ |
/ |
/ |
/ |
/ |
C + O + |
\ |
\ |
\ |
\ | ^ Y
\ | |
\ | |
B + +---> X

The distance between O and the given points (P, B, C) are static. The position of P reffering to O can be given in $\displaystyle d_x$ and $\displaystyle d_y$. $\displaystyle d_z$ = 0 for all points.

The body can be rotated using the rotation matrix Q as shown in my previous post. This can be done by multiplying Q with the lengths. $\displaystyle P = Q*[d_{x}, d_{y}, d_{z}]^T$. This gives me point P, B or C.

About my inverse problem. I also need to be able to determine the angels of the plane in 3d with 3 given points (P, B and C). Exactly like you described.

First attempt:

So my first thought was to start with vector B-P to calculate both Pitch and Yaw angles. I thought I would only need $\displaystyle d_{y}$ for point P and B. Made a 4x4 matrix where r14, r24, r34 is the position of point B. R is the rotation matrix shown as Q in my previous post.

$\displaystyle T=\left[\begin{matrix}R_{q}&B\\0&1\end{matrix}

\right]*\left[\begin{matrix}d_{x}\\d_{y}\\d_{z}\\1\end{matrix}\r ight]$

$\displaystyle P=\left[\begin{matrix}-d_{x}cos(b)cos(t)+X_{B}\\-d_{x}cos(b)sin(t)+Y_{B}\\d_{x}sin(b)+Z_{B}\end{mat rix}\right]=\left[\begin{matrix}X_{p}\\Y_{P}\\Z_{P}\end{matrix}\righ t]

$

To substitute Pitch and Yaw angles I removed $\displaystyle d_{x}$ since B and P don’t have an Y offset. This simplifies in:

$\displaystyle b = asin(\frac{X_{B}-X_{P}}{d_{x}})$

$\displaystyle t = acos(\frac{X_{B}-X_{P}}{d_{x}cos(b)})$

This results in the correct angles for beta and theta as long as I keep alfa zero!

So I think that I need to add $\displaystyle d_{y}$ to the equation but this makes substituting the angles much harder.

So to get back to your post.

Yes the distance between the points are static.

The distance on the z axis is 0.

The distance on the y axis is 0 between point C and origin O.

Maybe it is better to work from position O to each of the points? I think this is the solution method you are trying to tell me with the R vector but it’s not totally clear to me. I don’t know how to do this since point O is totally unknown. Note: the position of O is also unknown. I only know the positions of the other points.

I’ve been struggling with this for some days now. I hope you get me on the right track again

I hope my long story makes any sense

Thanks for you time!

Xan