Autor Beitrag
Ferrari
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 30

Win XP
Delphi 6 Personal
BeitragVerfasst: Mi 22.03.06 17:06 
Hi,


Die Koordinaten von 3 Punkten (P1,P2,P3) sind gegeben und ich möchte den Winkel P1P2P3 berechnen.
Kann mir da jemand helfen?
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mi 22.03.06 17:09 
verschiebe P1 bis P3 mit -P2, dann ist P2 der Nullpunkt
ausblenden Delphi-Quelltext
1:
2:
3:
Alpha1 := AcrTan2 (P3.Y,P3.X);
Alpha2 := ArcTan2 (P1.Y,P1.X);
Alpha := Alpha1-Alpha2; // oder anders herum

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
starsurfer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mi 22.03.06 17:09 
wenns 2d Koordinaten sind dann guggst du ins Tafelwerk -Allgemeines Dreieck- bei Sinussatz und Kosinussatz ...

bei 3d Koordinaten dann guggst du unter Vektorrechnung und analytische Geometrie, machst aus den Punkten Vektoren und schaust bei Skalarprodukt von Vektoren rein...

_________________
GEIZ IST GEIL! - Ihr Sozialamt


Zuletzt bearbeitet von starsurfer am Mi 22.03.06 17:13, insgesamt 1-mal bearbeitet
Ferrari Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 30

Win XP
Delphi 6 Personal
BeitragVerfasst: Mi 22.03.06 17:12 
Danke, ich werde es gleich ausprobieren.
Allesquarks
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 510

Win XP Prof
Delphi 7 E
BeitragVerfasst: Mi 22.03.06 17:15 
Kannst es ja auch über das Skalarprodukt machen.

(x1-x3)*(x2-x3)+(y1-y3)*(y2-y3)+(z1-z3)*(z2-z3)
Winkel=arccos(-----------------------------------------------------------------
SQRT((x1-x3)²+(y1-y3)²+(z1-z3)²)*SQRT((x2-x3)²+(y2-y3)²+(z2-z3)²)
Ferrari Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 30

Win XP
Delphi 6 Personal
BeitragVerfasst: Mi 22.03.06 17:25 
Danke. Ich verstehe das zwar nicht, aber wird schon stimmen. Ich kanns ja mal so probieren.