Polygonal ShapesΒΆ
These classes provide the basic geometry functionality for drawing polygona
shapes. All of these classes are defined by by an attribute points
. This is
an even list of numbers that defines the outer boundary of the shape. For example,
an isosceles triangle would be defined by six numbers (three points) in the form:
points = [0,0,50,100,100,0]
With the exception of GPath, these shapes are all solid. Hence
they also provide primitive collision detection via the contains
method. This method takes a
Point2
object from the cornell
module.