I want to find an implicit equation that contains points that fall within a circle that has an origin that follows a 2d parametric curve, which would look like you painted a circle along that curve. I need to be able to do this for (cubic) Bézier curves, but if there is a more generalized solution, that would be preferable. It would be nice for the solution to be numerically stable, and for it to avoid computationally expensive operations, but a working solution is the main priority.
For example, I have a function of a unit circle $f(x,y)=x^2+y^2-1$ and function of a cubic Bézier curve $g(t)=(t-1)^3P_0+3(t-1)^2tP_1+3(t-1)t^2P_2+t^3P_3$ where $0\le t\le 1$. How would I get a function where $F(x,y)=0$ when (x,y) is in the path. Here is a graph with an approximation of the shape that I am trying to achieve.
So, saying it another way, you want to find all points whose distance to the Bézier curve is less than some given radius $r$.
My advice is to approximate the Bézier curve by some simpler curves whose distance function is easy to compute. The obvious choice is just a piecewise linear curve (i.e. a polyline). A slightly more sophisticated approach is to approximate with circular arcs by using biarc techniques. Look up “biarc”, or look at the answers to this question.
Measuring the distance to each line or circular arc is easy, and then the distance to the Bézier curve is (approximately) the minimum of these distances.
Everything you need to know about offset curves is in two papers by Rida Farouki and Andrew Neff in 1990:
R. T. Farouki and C. A. Neff, “Algebraic properties of plane offset curves,” Computer Aided Geometric Design, vol. 7, no. 1–4, pp. 101–127, 1990.
R. T. Farouki and C. A. Neff, “Analytic properties of plane offset curves,” Computer Aided Geometric Design, vol. 7, no. 1–4, pp. 83–99, 1990.
The first of these two shows you how to get the function $F$ that you want, using elimination theory. It turns out to be a polynomial of degree 10. If that’s too complex for you, try the approximation approach I suggested above.