0
$\begingroup$

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.

  • 0
    Your problem's underdetermined. The other ends are hanging from given heights, I presume; what are those heights?2012-04-14
  • 0
    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).2012-04-14
  • 0
    @J.M. The other ends are on the same level, lets say It could be the "0-level"2012-04-14
  • 0
    Good; how far apart are these ends?2012-04-14
  • 0
    @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 case2012-04-14
  • 0
    @J.M. I do not have any exact numbers (I haven't built anything yet), but it could be something like 50cm2012-04-14
  • 0
    I just figured out a while ago, isn't this as simple as calculating the distances from the base-points to the wanted third point?2012-04-14

1 Answers 1

0

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.

  • 0
    I kind of figured this out already, but thanks!2012-04-14
  • 0
    So what were you looking for, then?2012-04-14
  • 0
    I figured it out after asking the question2012-04-14
  • 0
    Would you care to share your insight with us?2012-04-14
  • 0
    Well, its pretty much identical to your answer...2012-04-14