logoalt Hacker News

daharttoday at 3:04 PM0 repliesview on HN

So Raph, how do you draw these things? I’m not sure exactly where I’d start given an equation of the curvature or tangent (I assume?) angle. The pen tool link talks about “auto points”, giving the impression that it’s a sort of Bezier subdivision with some constraints, is that accurate? And your article mentions you’ve since fixed some things in the math - so this is a bit different from the pen tool, not using auto points?

Playing with your demo, I see the curve lock shape in certain configurations and stop moving even when I’m dragging one of the control points around. Is this a temporary or numerical stability issue, or is this a property of hyperbezier curves? For example if I arrange the control points in a square with P0 bottom left, C1 bottom right, C2 top left, P3 top right, and then drag C1 to the right, the shape locks up quickly. Eyeballing, it’s maybe when the length of P0C1 is ~1.5 times the length of C2P3? Moving C1 further right and up/down, there’s a huge area where moving C1 doesn’t affect the shape of the curve.

I was slightly curious about the P/C naming as well - is this a Hermite-like idea where P[03] are points and C[12] are similar to tangent vectors? Why not use P[0123]?

Probably one really obvious thing worth mentioning - Beziers are indeed very versatile, but it has to be said that one of the reasons they’re so popular is because the math is so simple, right? Decomposable into linear steps, integer exponents, with a couple multiplies of only your parameter you can evaluate them with a matrix multiply. They’re trivial to draw. Add in the controllability and intuitiveness and simplicity of computing other properties of the curve (such as finding roots & inflections & bounding boxes, splitting curves, etc.), and it makes sense they’re very popular. Hyperbeziers look interesting, and I don’t have intuition on their uses yet, but I assume their rendering involves heavier math than Beziers - since the curvature & angle equations have a divide & square root? Can they be split or subdivided easily?

You’ve been in search of a better curve for a long time. I’m wondering how you think about and where you stand on subdividing curves like Bezier vs finding a more perfect interpolation. Obviously there are tradeoffs, but are you aiming at problems that can’t be solved in practice using subdivision/approximation? I’d also be curious to hear your thoughts on hyperbeziers vs NURBS.