How do I calculate the third point of a triangle in a 3Dimensional Plane

67 Views Asked by At

I am attempting to create a system that will replicate arm movement, so far I have mastered this in a 2D plane however I am having trouble adding the third dimension. Here is what is given, You know the location of two points (shoulder and hand) as well as the lengths of the upperArm and foreArm. I need to find the coordinate of the elbow.

To simplify it say the elbow is always 180 degrees relative to the hand when looking head on to them both. Essentially creating the triangle on a plane parallel to the Y/Vertical axis

this is what I'm aiming to do, if you need to simplify it greatly then do so please. https://www.youtube.com/watch?v=l8u0JUpst3w

1

There are 1 best solutions below

3
On

The short answer is that you can’t.

The elbow could be anywhere on a circle centered on and perpendicular to the line joining the two known points. You’ll need some other piece of information to nail it down.

Update: Per your comment to the question, you do have additional information, namely, that all three points lie on a plane that’s perpendicular to the ground. If you can determine this plane, then your problem reduces to the one you’ve already solved.

A simple approach is to work directly in coordinates relative to this plane. Let’s put the shoulder at $x_S' = 0$. The Pythagorean theorem gives us the $x'$-coordinate of the hand: $$x_H'=\sqrt{(x_H-x_S)^2+(y_H-y_S)^2}.$$ Apply your 2-D solution using the points $(x_S',z_S)$ and $(x_H',z_H)$. This will give you coordinates $(x',z)$ in the arm plane that you can map back to $(x,y,z)$ in 3-D via similar triangles.

This still leaves you with two possible solutions, but presumably you've already dealt with this in the 2-D case.