Finding a point in a Bezier closed path

68 Views Asked by At

Consider a close path given by a set of Bezier points as

0,0 1,1 1,1 0,1
0,1 -1,-1 -1,-1 0,0

How can we check if a given point is within the closed path or outside it?

1

There are 1 best solutions below

0
On

The standard computational approach to testing inclusion in a closed curve is to draw a line to infinity and count intersections with the curve. To test for intersections with a Bézier curve you can subdivide it (de Casteljau) and exploit the convex hull property.