Click here to Skip to main content
15,881,882 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
ormonds17-Oct-08 11:34
ormonds17-Oct-08 11:34 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
Chesnokov Yuriy17-Oct-08 20:52
professionalChesnokov Yuriy17-Oct-08 20:52 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
ormonds18-Oct-08 11:48
ormonds18-Oct-08 11:48 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
Arash Partow17-Oct-08 18:05
Arash Partow17-Oct-08 18:05 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
Chesnokov Yuriy17-Oct-08 20:55
professionalChesnokov Yuriy17-Oct-08 20:55 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
Arash Partow18-Oct-08 4:31
Arash Partow18-Oct-08 4:31 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
Member 419459318-Oct-08 7:11
Member 419459318-Oct-08 7:11 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987618-Oct-08 17:32
cp987618-Oct-08 17:32 
Chesnokov Yuriy wrote:
There is ABC triangle randomly rotated on XY plane. A,B coords are known, ACB angle is 90'. AC length is known. How to find C coords????


Start with simpler problem, A at origin, B at (0,c) (i.e. AB = c) and we know AC = b and BC = a. (In your problem you can easily find BC using pythagoras).

The two intersecting circles can be solved almost trivially giving the co-ords of C (choosing y>0 option) as

x = (b^2 + c^2 - a^2)/(2a) y = sqrt(b^2 - x^2)

now rotate co-ords until AB has correct slope (cos = (xb - xa)/c, sin = -(yb - ya)/c) and translate A into position.

So the general solution is:

xc = xa + (b * (xb-xa) - a*(yb-ya))*b/c^2
yc = ya + (b * (yb-ya) + a*(xb-xa))*b/c^2


Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987618-Oct-08 23:38
cp987618-Oct-08 23:38 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
Arash Partow19-Oct-08 6:32
Arash Partow19-Oct-08 6:32 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987619-Oct-08 11:42
cp987619-Oct-08 11:42 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
CPallini19-Oct-08 11:52
mveCPallini19-Oct-08 11:52 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
Arash Partow19-Oct-08 11:56
Arash Partow19-Oct-08 11:56 
AnswerRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp28-Nov-08 20:03
darrellp28-Nov-08 20:03 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987629-Nov-08 14:03
cp987629-Nov-08 14:03 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp29-Nov-08 14:48
darrellp29-Nov-08 14:48 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987629-Nov-08 15:20
cp987629-Nov-08 15:20 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp29-Nov-08 19:58
darrellp29-Nov-08 19:58 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp987629-Nov-08 23:06
cp987629-Nov-08 23:06 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp30-Nov-08 7:17
darrellp30-Nov-08 7:17 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp98761-Dec-08 15:11
cp98761-Dec-08 15:11 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp1-Dec-08 17:19
darrellp1-Dec-08 17:19 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
darrellp1-Dec-08 19:27
darrellp1-Dec-08 19:27 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
cp98762-Dec-08 19:54
cp98762-Dec-08 19:54 
GeneralRe: How to find 3rd coordinate of a triangle given 2 others Pin
Member 41945933-Dec-08 3:27
Member 41945933-Dec-08 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.