14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 7y ago · link · parent
Perhaps 2019 is the time to start the Rust Foundation, as mentioned by boats and others[0]. If so, you'd clearly be one of the founders. I would put my name into the ring for that as well, as we're now in somewhat similar circumstances. All it needs is some money, a lot for a pizza cook perhaps but a pittance by Silicon Valley standards.
Wherever our paths lead, I hope they continue to intersect!
comment 7y ago · link · parent
Long story short, it looks doable, but is a lot of work to get right and has almost no chance of beating out numerical integration in performance.
comment 7y ago · link · parent
One reason to compute with excess accuracy is so that you can compute partial derivatives of arclength with respect to some parameter in the inner loop of an optimizer, to drive Newton or related solving. If the estimate has significant errors, then it can throw off the outer optimization loops. Of course, this only makes sense if it's cheap to compute the inner terms; if you have to pay dearly for accuracy, then use a more robust optimizer.
comment 7y ago · link · parent
So, this would be a good topic for someone else to show off their math skills :)
comment 7y ago · link · parent
1600.
How long is that Bézier?(raphlinus.github.io ↗)
164 points · by raphlinus · 7y ago · 18 comments
comment 7y ago · link · parent
Part of why I put it up with no instructions is to get feedback on how intuitive it is to use without any explicit instruction. I've gotten mixed response; some people seem to get it, others don't. So thanks for this bit of feedback. There's a basic help panel now.
comment 7y ago · link · parent
[0] https://www.gnu.org/philosophy/selling-exceptions.en.html
comment 7y ago · link · parent
comment 7y ago · link · parent
So whether this spline is better for, say, animation, is what I consider a fascinating research question. Hopefully putting it out there will start to get answers.
comment 7y ago · link · parent
The problem with MEC is that it tends to optimize for low tension; for inputs that are not well behaved, it sometimes optimizes for infinitely low tension, ie an infinitely long road. So there are other metrics, like Minimum Variation of Curvature, that work better for actual spline use, even though they have an energy metric that's "worse."
These curves are absolutely useful for path planning. A lot of the literature on "clothoids" from a hundred years or so ago is on transition curves for railroads. The G2 continuity condition basically means that you never have to suddenly turn the steering wheel to follow the curve, it's always moving continuously.
comment 7y ago · link · parent
Higher degree Béziers illustrate the "curse of too many parameters." Yes, they're very expressive, and yes you can have very high degrees of continuity, but it's also easy to make very wiggly or lumpy curves. I don't know of anyone who uses them, certainly not for font design.
comment 7y ago · link · parent
This is one of those "deep UX" questions I find fascinating.
comment 7y ago · link · parent
comment 7y ago · link · parent
There has been some work on this. Apple's Pages uses an implementation of the Hobby spline, demonstrating that it can be used in real consumer products. I think if you put these two side-by-side though, mine comes out quite a bit better; when you push the Hobby spline you get curvature extrema quite a distance from the control points, and mine doesn't do that.
Hobby's work has of course been an inspiration for mine for a long time, and it holds up academically quite well too - it has just the right blend of practical and aesthetic considerations and theoretical analysis; his solver runs in linear time and there's a proof it always converges (as long as tension values are within a reasonable range).
And of course there's the k-Curve work from Adobe. I think it is a step forward from Hobby in some ways (more robust) but a step back in others (it's not as smooth and most especially doesn't form true inflections).
1612.
Show HN: A new spline(raphlinus.github.io ↗)
341 points · by raphlinus · 7y ago · 72 comments
comment 7y ago · link · parent
Probably very little of that original code in the current version though.