Math Help?
Devin Asay
devin_asay at byu.edu
Fri Apr 30 14:15:46 CDT 2010
Hi Scott,
On Apr 30, 2010, at 1:05 PM, Scott Rossi wrote:
> Hello List:
>
> Was wondering if those with more comprehensive math skills than I know how
> to determine if one point X,Y falls within a triangular region defined by 3
> points X1,Y1, X2,Y2, X3,Y3. Thanks for any suggestions.
I don't know from math, but I do know you can use the within() function, as opposed to the 'is within' operator, to test for "within-ness" of non-rectangular objects. For instance, if you have an opaque, 3-sided polygon graphic, within() will only be true if the point you're testing is inside the filled part of the triangle.
I'm sure some real math expert would have a "real math" solution.
HTH,
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list