English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have a problem, im doing coding on turing and im stuck with this:

if your given all 3 lengths a triangle and one angle and your given the co-ordinates of 2 conners, how would you find the third co-ordinate? make an equation to solve it, and provide exmaples

plz and thankyous

2007-02-24 09:19:16 · 1 answers · asked by shanakon 3 in Science & Mathematics Mathematics

1 answers

Ok so given
- the co-ordinates of 2 vertices P(x1,y1) Q(x2,y2)
- and all side 3 lengths (a,b,c)
- and one angle θ
you want to calculate the third vertex R(x3,y3)

(First, maybe you do a coordinate transform to bring P->origin , and optionally also a rotation to bring Q to positive x-axis (just like the usual procedure with the Cosine Rule). That may condition the rest of the equations below better. But let us assume for the moment this is not strictly necessary.)


Now figure out which side angle θ is opposite, using the three possibilities for the Cosine Law:
c² = a²+b² - 2ab cos(γ)
b² = a²+c² - 2ac cos(β)
a² = b²+c² - 2bc cos(α)

Next, figure out which side is |PQ| = √((x1-x2)²+(y1-y2)²)
This is going to be one of (a,b,c);
so e.g. if side |PQ|=a, then angle θ=α ;
|PQ|=b => θ=β
|PQ|=c => θ=γ
Assume without loss of generality that |PQ|=a

Now based on θ,b,c we have assign the other two sides (e.g. b,c)
|PR| = √((x1-x3)²+(y1-y3)²) (let's say this is c)
|QR| = √((x2-x3)²+(y2-y3)²) (let's say this is b)
So R is the intersection(s) of the two circles:
(locus of points distance c from P) ∩ (locus of points distance b from Q)
You can go look up the standard circle equation for that,
I guess you get a set of simultaneous eqns like:
|PR|² = c² = (x1-x3)²+(y1-y3)²
|QR|² = b² = (x2-x3)²+(y2-y3)²
=>
x1²-2x1x3+x3² + y1² -2y1y3+y3² = c²
x2²-2x2x3+x3² + y2² -2y2y3+y3² = b²
Subtracting line 1 from line 2 gives:
2(x2-x1)x3 +2(y2-y1)y3 = (b²-c² +x2²-x1² + y2²-y1²)


I'm sure you can numerically condition the circle-circle intersection to solve faster; maybe you use auxiliary quantities.
(http://mathworld.wolfram.com/Circle-CircleIntersection.html)
Anyway you get the idea.

If you're coding this you may want to use recursion to evaluate the hypotheses.

2007-02-24 17:02:13 · answer #1 · answered by smci 7 · 0 0

fedest.com, questions and answers