find_bezier_t_intersecting_with_closedpath(bezier_point_at_t, inside_closedpath, t0=0.0, t1=1.0, tolerance=0.01)
The intersection point t is approximated by two parameters t0, t1 such that t0 <= t <= t1.
Search starts from t0 and t1 and uses a simple bisecting algorithm therefore one of the end points must be inside the path while the other doesn't. The search stops when the distance of the points parametrized by t0 and t1 gets smaller than the given tolerance.
A function returning x, y coordinates of the Bezier at parameter t. It must have the signature:
bezier_point_at_t(t: float) -> tuple[float, float]
A function returning True if a given point (x, y) is inside the closed path. It must have the signature:
inside_closedpath(point: tuple[float, float]) -> bool
Start parameters for the search.
Maximal allowed distance between the final points.
The Bezier path parameters.
Find the intersection of the Bezier curve with a closed path.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.bezier.split_bezier_intersecting_with_closedpath
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them