TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Beyond Bézier Curves (2013)

132 pointsby chenglouabout 5 years ago

10 comments

pippyabout 5 years ago
A few years back I wrote a basic bezier curve library with boolean operations in C&#x2F;C++. Bezier curves are fantastic when you get started, they&#x27;re easy to deal with and the math is well documented online.<p>However the edge cases are nightmares to deal with. Intersection (and similar operations) typically work by approximating via subdivision, so you&#x27;ll never get an accurate answer, which is important when dealing with boolean operations. You&#x27;ll wind up piling on hacks. One edge case I wound up being due to a floating point arithmetic error, which was fun because my computer science degree finally wound up coming in handy.<p>It makes me appreciate the work that the guys who made paper.js. They&#x27;ve done some outstanding work, and it&#x27;s by far the most superior open source vector graphics framework out there.
评论 #22381075 未加载
评论 #22381420 未加载
评论 #22380800 未加载
评论 #22380880 未加载
delhantyabout 5 years ago
For a technical analysis of Hobby splines I recommend HN raphlinus&#x27;s PhD thesis Section 4.7 [0] referenced just yesterday in the submission on Google Font Analytics [1].<p>[0] <a href="https:&#x2F;&#x2F;levien.com&#x2F;phd&#x2F;thesis.pdf" rel="nofollow">https:&#x2F;&#x2F;levien.com&#x2F;phd&#x2F;thesis.pdf</a><p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22369500" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22369500</a>
评论 #22381201 未加载
m0therabout 5 years ago
<a href="http:&#x2F;&#x2F;i.stanford.edu&#x2F;pub&#x2F;cstr&#x2F;reports&#x2F;cs&#x2F;tr&#x2F;85&#x2F;1047&#x2F;CS-TR-85-1047.pdf" rel="nofollow">http:&#x2F;&#x2F;i.stanford.edu&#x2F;pub&#x2F;cstr&#x2F;reports&#x2F;cs&#x2F;tr&#x2F;85&#x2F;1047&#x2F;CS-TR-8...</a>
mcphageabout 5 years ago
I really prefer Catmull-Rom splines (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Centripetal_Catmull–Rom_spline" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Centripetal_Catmull–Rom_spline</a>). They’re not as attractive as Bézier curves, but the curve passes <i>through</i> the control points, which makes them a ton easier to draw.
评论 #22381211 未加载
jakearabout 5 years ago
&gt; Because they are perfectly compatible with industry-standard Béziers, there is very little disadvantage to be had.<p>Anyone know what &quot;compatible&quot; means as used here?<p>As an aside, I personally prefer NURBS, they feel much more &quot;pure&quot; if that makes any sense. Plus they can produce real circles, which is a pretty nice feature of a curve-system.
评论 #22380636 未加载
dicyteaabout 5 years ago
I wish there was a visual on how this works in practice
评论 #22382218 未加载
评论 #22383959 未加载
starmoleabout 5 years ago
Much better curves for editing are k-curves (see <a href="http:&#x2F;&#x2F;faculty.cs.tamu.edu&#x2F;schaefer&#x2F;research&#x2F;kcurves.pdf" rel="nofollow">http:&#x2F;&#x2F;faculty.cs.tamu.edu&#x2F;schaefer&#x2F;research&#x2F;kcurves.pdf</a>) which are starting to pop up in all new Adobe tools also.
评论 #22381205 未加载
评论 #22381790 未加载
评论 #22381289 未加载
lentil_soupabout 5 years ago
When I was fighting some splines at work I found this website very good and very interactive when explaining how Bezier curves work under the hood, a great resource!<p><a href="https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;</a>
joe_the_userabout 5 years ago
I always found Bezier curves strange - they seem awful as a way to approximate curves. When you &quot;draw&quot; with a Bezier curve in Illustrator (or Inkscape), the lines tend to fly all over the place - they can be an OK approximation but they&#x27;re often very unstable. The problem, I think, is that any polynomial or equivalent higher order is going to have this instability property.
MayeulCabout 5 years ago
Is this supported in inkscape?<p>I could see it useful as a way to interpret hand-drawn shapes such as graphs, or even letters.
评论 #22382818 未加载