essohbee
Dec 25th, 2000, 04:22 PM
Okay, here's the deal:
I have a threesided polygon, aka a triangle,
vertices are defined as following
For i = 0 To 2
Line1(i).X1 = Sin((v + (120 * i)) / 57) * 200 + ox
Line1(i).Y1 = Cos((v + (120 * i)) / 57) * -200 + oy
Line1(i).X2 = Sin((v + (120 * (i + 1))) / 57) * 200 + ox
Line1(i).Y2 = Cos((v + (120 * (i + 1))) / 57) * -200 + oy
Next i
Whereas ox and oy as offset variables
as to where the triangles'centrum in
the void is.
Problem being: I need a routine
(algorithm, whatever) to find out
if the point p (p.x, p.y) is inside
the triangle.
Any help would be greatly appreciated.
I have a threesided polygon, aka a triangle,
vertices are defined as following
For i = 0 To 2
Line1(i).X1 = Sin((v + (120 * i)) / 57) * 200 + ox
Line1(i).Y1 = Cos((v + (120 * i)) / 57) * -200 + oy
Line1(i).X2 = Sin((v + (120 * (i + 1))) / 57) * 200 + ox
Line1(i).Y2 = Cos((v + (120 * (i + 1))) / 57) * -200 + oy
Next i
Whereas ox and oy as offset variables
as to where the triangles'centrum in
the void is.
Problem being: I need a routine
(algorithm, whatever) to find out
if the point p (p.x, p.y) is inside
the triangle.
Any help would be greatly appreciated.