# Algorithm for a geometry-problem

In a system I'm building I'd like to have a "point" that hangs from two wires. The length of these wires is variable.

So basically I would have a triangle, two sides of which are "varible".

Could you give any hints on what to read/ how to build an algorithm that is given x,y coordinates of the point that is between the two sides of the triangles, and that could be used to calculate the two lengths of the sides.

-
Your problem's underdetermined. The other ends are hanging from given heights, I presume; what are those heights? –  Guess who it is. Apr 14 '12 at 11:11
Also, if this is kind of real setting, then this may not be a triangle to begin with (the wires have a weight of its own). –  dtldarek Apr 14 '12 at 11:26
@J.M. The other ends are on the same level, lets say It could be the "0-level" –  varesa Apr 14 '12 at 11:51
Good; how far apart are these ends? –  Guess who it is. Apr 14 '12 at 11:52
@dtldarek Yes, the real-life version is not going to be "perfect", but I don't think it will do too much harm in my case –  varesa Apr 14 '12 at 11:52

let the two rigid points be at $(0,0)$ and $(1,0)$, and let the hanging point be at $(x,y)$, with $x,y<0$. Then the distance from the hanging point to the two rigid points is:

$\sqrt{x^2+y^2}$

and:

$\sqrt{(x-1)^2+y^2}$

Note that this might very well not necesarily give you the length of the wires: assume one wire has length 1, and the other has length 1000. then surely the point is simply hanging below one of the rigid points (at distance 1), but we cannot compute the length of the second wire based just on the location of the hanging point.

-
I kind of figured this out already, but thanks! –  varesa Apr 14 '12 at 12:46
So what were you looking for, then? –  akkkk Apr 14 '12 at 12:46
I figured it out after asking the question –  varesa Apr 14 '12 at 13:14
Would you care to share your insight with us? –  akkkk Apr 14 '12 at 13:15
Well, its pretty much identical to your answer... –  varesa Apr 14 '12 at 13:30