Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperbezier math post #40

Open
raphlinus opened this issue Jan 4, 2021 · 1 comment
Open

Hyperbezier math post #40

raphlinus opened this issue Jan 4, 2021 · 1 comment

Comments

@raphlinus
Copy link
Owner

As something of a complement to Colin's hyperbezier pen tool post, I want to do one on the math of the curve family itself. Obviously there's a technical core, presenting the equations, but I also want to get a narrative. Another core component of the post is an interactive that shows the curve.

Introduction: hyperbezier is a synthesis of three curves: cubic bezier, euler spiral, and elastica. Tension is a central concept.

Curve interactive: a single segment, can move endpoints and control points. (technically fixed endpoints and movable control points is enough, but probably more friendly). Show cubic bez & hyperbez side by side, so moving control points of one adjusts the other. Possibly show curvature vs arclength curve as well.

Tension: describe tension (curvature relative to deflection & arclength). Talk about it in the context of the elastica, mention that Hobby spline has tension parameter. Ideally, have interactive that shows just the elastica, with adjustable endpoint deflections and tension (this is 3 parameters). Reference thesis, describe MEC as having generally too low tension. Euler spiral improves it by increasing tension just a bit (enough to make it form circular arcs).

Restate central contribution of research spline: tension is a function of deflection. As deflection goes up, so does tension. Note that this is a trend, k-spline was one of the first to show this behavior (research question: are there good earlier examples?), and the Cem Yuskel interpolating spline is a more recent example.

More detail on synthesis of the three curves. It takes its control scheme from the cubic bez, which means that UI is intuitive and familiar. It takes the shape of Euler spiral at a neutral tension value, and as tension increases it resembles the elastica. One important difference: elastica has one tension value for the whole segment, but in hyperbezier the tension is associated with the endpoint and blends smoothly across the curve. This gets you to 4 parameters and just works a lot better in spline context.

How much numerical detail to go into? Curve is given as a Cesàro equation, one integral then it's a Whewell equation, and then integrate that numerically using Gauss-Legendre quadrature. There are a lot of numerical tricks under the hood. Probably best to treat these at a very high level.

Touch on rendering to cubic beziers. (Note: the current state of this code is very primitive. But it's something that people are curious about, and it's important to get a sense of approx how many beziers will result from one hyperbezier segment).

Conclusion: testing the hypothesis that this is a better way to design, especially useful for fonts. Encouraging, but don't oversell.

@johschmitz
Copy link

I am wondering how does this Hyperbezier approach mathematically compare to the "Auto" Bezier nodes/control points implemented in Blender?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants