IrregularPolygon class

Inheritance

Constructors

IrregularPolygon({List<Point>? vertices})

Properties

hashCode → int
The hash code for this object.
no setterinherited
name ↔ String
The name of the geometric shape.
getter/setter pairinherited
numSides ↔ int?
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sideLength ↔ double?
getter/setter pairinherited
sides ↔ List<num>?
getter/setter pairinherited
vertices ↔ List<Point>?
getter/setter pairinherited

Methods

angleBetweenSides(int i, int j) → double
Calculate the angle between two sides of the polygon.
inherited
area() → double
Calculate the area of a regular polygon given the number of sides and the side length.
inherited
areaPolygon() → double
inherited
boundingBox() → List<Point>
Calculate the bounding box of the polygon.
inherited
centroid() → Point
Calculate the centroid of a polygon.
inherited
distanceToPolygon(Polygon otherPolygon) → double
Calculate the minimum distance between two polygons.
inherited
getSideLength({num? perimeter, num? area, num? circumradius, num? inradius}) → double
Calculate the side length of a regular polygon given at least one of the parameters (perimeter, area, circumradius, inradius).
inherited
greensTheorem() → double
Calculate the area of the polygon using Green's Theorem.
inherited
isConvex() → bool
Determine if the polygon is convex.
inherited
isPointInsidePolygon(Point point) → bool
Determine if a point is inside the polygon.
inherited
momentOfInertia() → num
Calculate the moment of inertia of a polygon.
inherited
monteCarlo({int numPoints = 10000}) → double
Calculate the area of the polygon using the Monte Carlo method.
inherited
nearestPointOnPolygon(Point point) → Point
Find the nearest point on the polygon to a given point.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perimeter() → num
Calculate the perimeter of a polygon.
inherited
scale(double factor) → void
Scale the polygon by a given factor.
inherited
shoelace() → double
Calculate the area of the polygon using the Shoelace Formula (also known as Gauss's area formula).
inherited
sideLengthIrregular(int i) → double
inherited
sideLengthOfIrregular(int i) → num
Get the length of an irregular side of the polygon.
inherited
toString() → String
A string representation of this object.
inherited
translate(double dx, double dy) → void
Translate the polygon by a given displacement. Parameters:
inherited
trapezoidal() → double
Calculate the area of the polygon using the Trapezoidal Rule.
inherited
triangulation() → double
Calculate the area of the polygon using triangulation.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited