Autor Beitrag
Grishnak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mo 12.09.05 17:30 
Gibt es einen guten Algorithmus, mit man prüfen kann, ob sich ein Punkt innerhalb eines Dreiecks befindet?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TPunkt = record
    X: single;
    Y: single;
  end;

  TDreieck = record
    A: TPunkt;
    B: TPunkt;
    C: TPunkt;
  end;

...

function Innerhalb(const P: TPunkt; const D: TDreieck): boolean;
begin
  Result:= ??????
end;


PS: TPunkt hat nichts mit der Telekom zu tun! :wink:

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!


Zuletzt bearbeitet von Grishnak am Mo 12.09.05 19:24, insgesamt 1-mal bearbeitet
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mo 12.09.05 18:09 

_________________
Ciao, Sprint.
Grishnak Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 221

Windows XP Home
Delphi 7 PE, Delphi 2005 PE
BeitragVerfasst: Mo 12.09.05 19:26 
Danke @user profile iconSprint! Gleich mal ausprobieren...

...ja, funktioniert! Hätte ich auch selbst drauf kommen können, aber mein Mathe-Abi liegt schon 14 Jahre zurück!

_________________
Mach' etwas idiotensicher und irgendjemand erfindet einen besseren Idioten!