goulib.geom¶
2D geometry
Functions
|
|
|
constructs circle passing through 3 distinct points :param a,b,c: Point2 :return: x,y coordinates of center of circle |
|
|
|
|
|
|
|
|
|
|
|
hash function for vectors |
|
Circle/Circle intersection :param c1: Line2 (or derived class) :param c2: Circle (or derived class) :return: None, single Point2, [Point2,Point2] or smallest Circle if inscribed |
|
Line2/Circle intersection :param L: Line2 (or derived class) :param C: Circle (or derived class) :return: None, single Point2 or [Point2,Point2] |
|
|
|
constructs Arc2 starting in a, going through b and ending in c :param a,b,c: Point2 :return: the unique Arc2 starting in a, going through b and ending in c |
|
Process a pair of values passed in various ways. |
|
constructs Circle passing through 3 distinct points :param a,b,c: Point2 :return: the unique Circle through the three points a, b, c |
Classes
|
|
|
Circles are constructed with a center Point2 and a radius. |
|
|
|
The following classes are available for dealing with simple 2D geometry. |
|
A Line2 is a line on a 2D plane extending to infinity in both directions; a Ray2 has a finite end-point and extends to infinity in a single direction; a Segment2 joins two points. |
|
Two matrix classes are supplied, Matrix3, a 3x3 matrix for working with 2D affine transformations, and Matrix4, a 4x4 matrix for working with 3D affine transformations. |
|
A point on a 2D plane. Construct in the obvious way::. |
|
|
|
this constructor is called by descendant classes at copy it is replaced to copy some graphics attributes in module drawings |
|
this constructor is called by descendant classes at copy it is replaced to copy some graphics attributes in module drawings |
|
this constructor is called by descendant classes at copy it is replaced to copy some graphics attributes in module drawings |
|
Mutable 2D vector: |