Polar Bezier Curves? Bezier Curves on a Torus?

437 Views Asked by At

Background:

I am (trying) to use bezier curves to model an angle of a linkage. As an angle, it $\in \left\{-180, 180\right\}$. So my coordinate system is angle being y, time being x.

To be continuous in looping time, the angle (y) at the start must be equal to the angle at the end. Or $+- k\pi$. To be smooth, the slope of the line between the first two points and the last two points must be equal (this is easy if you're willing to move the middle points arbitrarily enough).

My issue is ensuring that it is continuous. For further background, I am using simulated annealing to match the linkage end point with a desired profile, with the variables being randomly perturbed being the control point locations (for the 1st and last control points, they are fixed in time (x location)). So there is potential for the two endpoint y-locations to be equal - or for this to be the best solution.

My Question:

Is there an extension or modification of bezier curves to have a polar or torodial or repeating or periodic boundary conditions? Or any other class of curves that have few control variables, and are reasonably easy (both mathematically and computationally) to evaluate?

Will also accept literally any other solution.