geometry#

Library for (numerical) geometry.

Functions

antipode(circle, point)

bisect(g)

Split object (Segment or CircularArc) into two equal halves.

bisector(s)

Return the bisector line of the segment

bounding_box(a)

circle_through_points(A, B, C)

Return a circle through points A, B, and C.

inverse_point_through_circle(circle, point)

Perform inverse geometry transformation on a given point with respect to a circle.

is_angle_between(theta1, theta2, theta3)

Check if angle theta2 is between angles theta1 and theta3 (modulo 2*pi).

middle(g)

Returns geometric center of a segment or arc

perpendicular_arc(circle, circle1, circle2)

Return the perpendicular circular arc through the circle that starts and ends at the intersection of circle and circle1 and circle2, respectively.

perpendicular_arc_through_point(circle, ...)

Return the arc that is: - perpendicular to the circle at circle_point - starts at the circle point and goes through the point - (if the point lies on the circle, the arc is perpendicular also at point.

perpendicular_line(l, p)

Return a line that is perpendicular to the other line.

split(g, point)

Split arc/segment g at point (that lies on the arc/segment)

tangent_line(c, p)

Return tangent line assuming point lies on circle, otherwise returns line perpendicular to the radius through the center and p.

Classes

BoundingBox([g])

Circle(center, radius)

CircularArc(center, radius, theta1, theta2)

Line(A, B)

Segment(A, B)