Abstract geometric object class.
It’s not meant to be used directly. This only implements methods that are called on other objects.
Methods
__contains__(x) | Searches for x in “itself”. |
intersection(obj) | Return points of intersection if any. |
rotate(theta[, point, angle]) | Rotate self around pivot point. |
translate(dx, dy) | Translate self by given amounts on x and y. |
Detailed description
Abstract geometric object class.
It’s not meant to be used directly. This only implements methods that are called on other objects.
Searches for x in “itself”. If we’re talking about a Point or a Vector then this searches within their components (x, y). For everything else it searches within the list of points (vertices).
Parameters : | x : {point, scalar}
|
---|---|
Returns : | out : {True, False}
|
Return points of intersection if any.
This method just calls the intersection method on the other objects that have it implemented.
Parameters : | obj : geometric object
|
---|---|
Returns : | ret : {point, None}
|
Rotate self around pivot point.
Parameters : | theta : scalar
point : {point-like}, optional
angle : {‘degrees’, ‘radians’}, optional
|
---|
[Arnon1983] | Arnon et al., A Linear Time Algorithm for the Minimum Area Rectangle Enclosing a Convex Polygon” (1983), Computer Science Technical Reports. Paper 382 |
[WPolygon] | http://en.wikipedia.org/wiki/Polygon |