Hacker News new | ask | show | jobs
by s1mon 764 days ago
Specifically, I was trying to get help from ChatGPT to give a simple formula for the location of the P3 control point of a degree 3 (or higher) Bézier curve in order to maintain G3 continuity (given the derivatives at the end of the adjacent curve). There's a very straightforward equation for the P2 control point for G2 continuity, but I've been struggling to understand the math for G3 continuity.

I've found a ton of research papers and information, but most of it is quickly beyond my ability to digest.

For G2 constraints, there is simple equation:

K(t0) = ((n-1)/n)*(h/a^2)

Where n is the degree of the curve, a is the length of the first leg of the control polygon, and h is the perpendicular distance from P, to the first leg of the control polygon. K(t0) is the curvature at the end point of the adjacent curve.

Depending on what you want to do, it's easy to solve for K(t0), a or h. I would like something this simple for G3.