intersection_plane_circle
- compas.geometry.intersection_plane_circle(plane, circle)[source]
Computes the intersection of a plane and a circle.
- Parameters:
- plane[point, vector]
A plane defined by a point and normal vector.
- circle[plane, float]
A circle defined by a plane and radius.
- Returns:
- tuple[[float, float, float], [float, float, float]] | [float, float, float] | None
Two points (secant intersection), one point (tangent intersection), or None (otherwise).
Notes
There are 4 cases of plane-circle intersection:
they intersect in 2 points (secant),
they intersect in 1 point (tangent),
they do not intersect, or
they coincide (circle.plane == plane).
Examples
>>> plane = (0, 0, 0), (0, 0, 1) >>> circle = ((0, 0, 0), (0, 1, 0)), 10.0 >>> x1, x2 = intersection_plane_circle(plane, circle) >>> x1 (-10.0, 0.0, 0.0) >>> x2 (10.0, 0.0, 0.0)