If you need to use the box method, and the control rect isn't perfect, it might be easier to create the rect on your own. Go through the points and find the topmost, left most, rightmost, bottom most coordinates and that gives you your box. Alternatively, if you just want the area and don't care how you get it the equation is pretty straightforward.
area = A x ( B y − C y ) + B x ( C y − A y ) + C x ( A y − B y ) 2 where Ax and Ay are the x and y coordinates of the point A etc.. I have a stack that does this while dragging points around, it works well enough. On Wed, Jun 6, 2018 at 5:14 PM, David Epstein via use-livecode < [email protected]> wrote: > If a regular polygon has 4 or 8 sides it seems to be inscribed so that all > points touch the square defined by the object’s height and width, which > means that it should be fairly easy to deduce the polygon’s area. > But with 3 sides, the triangle appears slightly smaller than the maximum > size that could fit into that square. Is there some math that would give > me the area of that triangle from the height and width of the square (i.e., > the official height and width of the polygon object)? > David Epstein > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
