3rd point on a triangle given lengths and 2 points

 Posts: 498
 Joined: 27 Aug 2010, 22:25
3rd point on a triangle given lengths and 2 points
Does anyone know, in plain english rather than maths notation, (of which there is quite a bit around), how to calculate the position of a 3rd point of a triangle given the other 2 positions and all the lengths of all the sides?
Lets assume its 2d as I am aware that in 3d that point could be anywhere around a circle.
thanks
Lets assume its 2d as I am aware that in 3d that point could be anywhere around a circle.
thanks

 Posts: 871
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: 3rd point on a triangle given lengths and 2 points
See Illustration
Given the two points A and B and the two lengths a and b, to find the point C, trace a circle at point A of radius a (red on the illustration) and at point B of radius b (green on the illustration). The intersection of the two circles is the location of point C. With an angle at A or B, you can then determine which point C it is.
For 3D, the circles become spheres and there intersections a circle (like you correctly said.)
Hope that help. Cheers!
Dan
Given the two points A and B and the two lengths a and b, to find the point C, trace a circle at point A of radius a (red on the illustration) and at point B of radius b (green on the illustration). The intersection of the two circles is the location of point C. With an angle at A or B, you can then determine which point C it is.
For 3D, the circles become spheres and there intersections a circle (like you correctly said.)
Hope that help. Cheers!
Dan
You do not have the required permissions to view the files attached to this post.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif

 Posts: 729
 Joined: 09 Jun 2009, 20:33
Re: 3rd point on a triangle given lengths and 2 points
actually there is 4 congruent triangles not 2...

 Posts: 871
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: 3rd point on a triangle given lengths and 2 points
Hi NNois,
True if you do not know which length is with which point, Then you repeat the process at point A with the b length (green) and at point B with the a length (red) to get the two other points C.
True if you do not know which length is with which point, Then you repeat the process at point A with the b length (green) and at point B with the a length (red) to get the two other points C.
You do not have the required permissions to view the files attached to this post.
Last edited by Daniel Brassard on 15 Oct 2013, 15:37, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif

 Posts: 1763
 Joined: 08 Jun 2009, 21:11
 Location: Zagreb, Croatia
Re: 3rd point on a triangle given lengths and 2 points
in plain Klingon, I think you're searching for 2bone IK solver ( in case you're able to determine the longest distance of three, as root to effector distance). There are some in appropriate ICE compounds. Core, which calculates these intersections, is called Cosine Law, or Kosinus Satz. You get the angle between rooteffector direction, and first bone. By rotating the first bone, you get third position.Pooby wrote:Does anyone know, in plain english rather than maths notation,
thanks
Axis you'll be using, defines the 2d plane in 3d space  and this axis is equivalent of SI Chain preferred axis.

 Posts: 498
 Joined: 27 Aug 2010, 22:25
Re: 3rd point on a triangle given lengths and 2 points
Thanks for the replies. The circle method is interesting and thanks for posting it, but It doesnt help directly in ICE as I dont think there is a circle intersection node.
I am indeed trying to make a 2d IK solver. I dont quite understand how you get the position of the 3rd point from the angle between the 'unknown' bones.
I am indeed trying to make a 2d IK solver. I dont quite understand how you get the position of the 3rd point from the angle between the 'unknown' bones.

 Moderator
 Posts: 2513
 Joined: 24 May 2012, 09:44
Re: 3rd point on a triangle given lengths and 2 points
Wouldn't this point be the intersection of rotation of 2 vectors each from the 2 known points?

 Posts: 871
 Joined: 18 Mar 2010, 23:38
 Location: St. Thomas, Ontario
Re: 3rd point on a triangle given lengths and 2 points
See it this way .... vector addition
vector A to B (length and direction) add vector B to C (length and direction) will give you vector A to C (length and direction).
Dan
vector A to B (length and direction) add vector B to C (length and direction) will give you vector A to C (length and direction).
Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif

 Moderator
 Posts: 1684
 Joined: 26 Sep 2009, 15:51
 Location: Bonn, Germany
Re: 3rd point on a triangle given lengths and 2 points
Anto's comment reminded me of the hidden ICE Kine workgroup (in the programs/softimage/applcation folder), there are some nice rigging compounds in there including IK solvers.
I wonder why this isn't connected by default, is this because it's still not considered production ready?
I wonder why this isn't connected by default, is this because it's still not considered production ready?
softimage resources section updated Feb 7 2019

 Posts: 498
 Joined: 27 Aug 2010, 22:25
Re: 3rd point on a triangle given lengths and 2 points
I cant get my head around it I'm afraid, but thanks for trying to help.Daniel Brassard wrote:See it this way .... vector addition
vector A to B (length and direction) add vector B to C (length and direction) will give you vector A to C (length and direction).
Dan

 Moderator
 Posts: 754
 Joined: 25 Nov 2009, 01:41
Re: 3rd point on a triangle given lengths and 2 points
Look at the Law of Cosines for this. Basically for a simple 2 bone IK solver, you know the lengths of the bones already and the length from Root to Effector. So you know all sides of the triangle. Just need to get the angles.
http://en.wikipedia.org/wiki/Law_of_cosines Look at Fig 3 and also the section that says "the angles of a triangle if one knows the three sides".
You only need to find the angle for the first bone. Then project a transform to the tip of the first bone (since you know the size of the vector to rotate by that first angle). This will be the position of bone02. Then just get the direction from the bone02 position to the effector and you can use the other ICE nodes to get that rotation for the 2nd bone's rotation. Done.
http://en.wikipedia.org/wiki/Law_of_cosines Look at Fig 3 and also the section that says "the angles of a triangle if one knows the three sides".
You only need to find the angle for the first bone. Then project a transform to the tip of the first bone (since you know the size of the vector to rotate by that first angle). This will be the position of bone02. Then just get the direction from the bone02 position to the effector and you can use the other ICE nodes to get that rotation for the 2nd bone's rotation. Done.

 Posts: 1763
 Joined: 08 Jun 2009, 21:11
 Location: Zagreb, Croatia
Re: 3rd point on a triangle given lengths and 2 points
First I found this solver in one old collection of samples, by Helge Mathee. Later , I've added soft IK to solver, too. If you're interested, especially in Soft IK part... no big deal to post all this.Pooby wrote:Thanks for the replies. The circle method is interesting and thanks for posting it, but It doesnt help directly in ICE as I dont think there is a circle intersection node.
I am indeed trying to make a 2d IK solver. I dont quite understand how you get the position of the 3rd point from the angle between the 'unknown' bones.
Another one appeared in Phill Pack. Finally, as RRay said, in ICE kine compounds. Afaik Helge's version was more stable, the one from Phil Pack had tendency to produce NaNs.
By the way, inputs are 3 lengths, result is angle between first bone and rooteffector direction.

 Moderator
 Posts: 754
 Joined: 25 Nov 2009, 01:41
Re: 3rd point on a triangle given lengths and 2 points
Thanks for this Mathaeus, I would only ask to wait until all options are exhausted in explaining how to build this setup as the ICE & Math section is exactly for explaining or figuring out these types of problems and have a library of solutions people can reference. This was one benefit to XSIBase when it was around there were tons of threads of solutions and walk throughs that helped people learn. I'm hoping to do the same here.Mathaeus wrote:no big deal to post all this.
With that said, maybe I misunderstood what you meant by posting, if you meant you would post on how to set this up.

 Moderator
 Posts: 2513
 Joined: 24 May 2012, 09:44
Re: 3rd point on a triangle given lengths and 2 points
emTools also has an intersection of 2 lines compound.

 Posts: 1763
 Joined: 08 Jun 2009, 21:11
 Location: Zagreb, Croatia
Re: 3rd point on a triangle given lengths and 2 points
Well I meant just posting the ICE compound, without too much explanation  but for now, thing is a part of something else, needs cleanup. That's why I'm asked before posting. Anyway I hope I'll put it into resource dump.EricTRocks wrote:With that said, maybe I misunderstood what you meant by posting, if you meant you would post on how to set this up.Mathaeus wrote:no big deal to post all this.
Long explanations, how to set this up and so on  to be honest, I really do not see the reason for explaining again, something already explained on so many places. No hope from my side.

 Moderator
 Posts: 754
 Joined: 25 Nov 2009, 01:41
Re: 3rd point on a triangle given lengths and 2 points
If there are already explanations else where that are easily consumed, please post links!