I'm crap at trigonometry and have been trying to figure this one out for weeks.

(For those more familiar with character animation,
I've got the basic maths working for an Inverse Kinematics system for Blitz,
but I can't seem to figure out the maths for a pole-vector).
I have 3 pivot entities P1, P2 and P3 in 3d space.
These pivots are not connected, and could be anywhere basically :)
These three pivots create an imaginary plane in 3d space (see blue rectangles in image).
I then have 2 entities, let's say two cylinders, that have a FIXED length (see the yellow & magenta lines).
The yellow one has a fixed length of 0.5, and is anchored at Pivot1
The Magenta one has a fixed length of 0.7 and is anchored at Pivot3
What I'm trying to do is to 'reconstruct' the triangle P1-P4-P3, that is within the plane/space of the 2d blue rectangle (that's oriented in whatever angle in 3D).
So I need to know either the XYZ coordinate of P4 (the green dot) OR the Pitch/Yaw/Roll angles of the yellow / magenta cylinders.
In the image you'll see two situation where the 'imaginary plane' created by p1,p2 and p3 is of a different size & orientation in 3d. But the yellow and magenta lines still have the same exact length.
I hope this makes sense and is in any way clear. I'm working on an IK Animation system and got pretty far with procedural animation, but I need to solve this problem to be able to control a character's elbows for arm-animations and to control their knees / leg orientation for leg-animations like a walk, jump, crouch or run cycle.
Any help would be GREATLY appreciated!
Thanks,
Danny

(For those more familiar with character animation,
I've got the basic maths working for an Inverse Kinematics system for Blitz,
but I can't seem to figure out the maths for a pole-vector).
I have 3 pivot entities P1, P2 and P3 in 3d space.
These pivots are not connected, and could be anywhere basically :)
These three pivots create an imaginary plane in 3d space (see blue rectangles in image).
I then have 2 entities, let's say two cylinders, that have a FIXED length (see the yellow & magenta lines).
The yellow one has a fixed length of 0.5, and is anchored at Pivot1
The Magenta one has a fixed length of 0.7 and is anchored at Pivot3
What I'm trying to do is to 'reconstruct' the triangle P1-P4-P3, that is within the plane/space of the 2d blue rectangle (that's oriented in whatever angle in 3D).
So I need to know either the XYZ coordinate of P4 (the green dot) OR the Pitch/Yaw/Roll angles of the yellow / magenta cylinders.
In the image you'll see two situation where the 'imaginary plane' created by p1,p2 and p3 is of a different size & orientation in 3d. But the yellow and magenta lines still have the same exact length.
I hope this makes sense and is in any way clear. I'm working on an IK Animation system and got pretty far with procedural animation, but I need to solve this problem to be able to control a character's elbows for arm-animations and to control their knees / leg orientation for leg-animations like a walk, jump, crouch or run cycle.
Any help would be GREATLY appreciated!
Thanks,
Danny