Area of regular polygon triangles

Mike Bonner bonnmike at gmail.com
Wed Jun 6 21:04:42 EDT 2018


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 <
use-livecode at lists.runrev.com> 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
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the Use-livecode mailing list