2D Geometric Shapes
fort_myrmidon.Shape
- class fort_myrmidon.Shape
A Generic class for a Shape
- property ShapeType
the type of the shape
- Type:
- class Type
Enum for the type of a Shape
Members:
CIRCLE : int: a circle
CAPSULE : int: a capsule
POLYGON : int: a polygon
- Shape.Type.name -> str
- contains(self: fort_myrmidon._fort_myrmidon.Shape, arg0: numpy.ndarray[numpy.float64[2, 1]]) bool
Tests if a point is contained within this shape
fort_myrmidon.Circle
fort_myrmidon.Capsule
fort_myrmidon.Polygon
- class fort_myrmidon.Polygon
Represents a closed polygon.
Represents a closed polygon from a list of vertices. The polygon is always considered closed. i.e.
[[1,1],[-1,1],[-1,-1],[1,-1]]is a closed square.Note
Order matters as
[[1,1],[-1,-1],[1,-1],[-1,1]]represents an hourglass.Example
square = fort_myrmidon.Polygon(Vertices = [[1,1],[-1,1],[-1,-1],[1,-1]]) hourglass = fort_myrmidon.Polygon(Vertices = [[1,1],[-1,-1],[1,-1],[-1,1]])
- property Vertices
a list of the polygon vertices (float64 , size [2,1])
- Type:
List[numpy.ndarray]