text: # 3D: write function to find configuration of a triangle
  
  In 3D space, given P1 and P2, and two links attached end to end with lengths L1 and L2 respectively, link1 starts at P1. Write a function that finds the configurations of the links that put the 2nd link’s end at point P1. I dunno where to start... What exactly "link configuration" should be (as output): A vector (like 2i -3j+5k)? Or a point coordinate of the joint point or what..?
  
  My thought is that there is infinite number of solutions in 3D, and 2 solutions in 2D, and I am trying to one of them for the 1st step for 3D.
  
  Given P1 (x1,y1,z1), P2 (x2,y2,z2), L1 and L2, all I can think of is: convert to a new coordinate system (not sure how though) such that P1 becomes (0,0,0) and P2 becomes (d,0,0) where d = distance(P1, P2). Now we reduce it to a 2D problem where we need to find P3 (x, y, 0) in the new coordinate system, such that P3 is L1 from (0,0,0), and L2 from (d,0,0).
  
  I think we can find exactly two solutions of P3 (x3, +/-y3) as we fix z to 0. And then, I need to convert it back to the original coordinate system...and z coordinate should kick in...but I have no clue about how.
  
  -
  Sounds like homework. –  James Black Jan 31 '10 at 0:46
  So why not give an example of one solution, or better, both, in 2D, and then we can help you to see how to do something similar in 3D. My thought was to give a non-Euclidean 2D answer, but the part of 'find a configuration' I am not certain about. Is that to just move L1 from P1 to P2? –  James Black Jan 31 '10 at 0:50
  Hi James, thanks. Given P1 (x1,y1,z1), P2 (x2,y2,z2), L1 and L2, all I can think of is: convert to a new coordinate system(not sure how though) such that P1 becomes (0,0,0) and P2 becomes (d,0,0) where d = distance(P1, P2). Now we reduce it to a 2D problem where we need to find P3 (x, y, 0) in the new coordinate system, such that P3 is L1 from (0,0,0), and L2 from (d,0,0). I think we can find exactly two solutions of P3 (x3, +/-y3) as we fix z to 0. And then, I need to convert it back to the original coordinate system...and z coordinate should kick in...but I have no clue about how. –  looktt Jan 31 '10 at 1:05
  You may want to include your comment in your question, so that it can be formatted, hence easier to read. –  James Black Jan 31 '10 at 6:12