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.

Drawing better-looking Bézier curves

257 pointsby dhotsonover 7 years ago

14 comments

dhotsonover 7 years ago
Hello :) I&#x27;m the author of this notebook if you have any questions.<p>I&#x27;m also currently working on a plugin for Adobe Illustrator based on this. Screenshot: <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;tIPTjLsr.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;tIPTjLsr.png</a>
评论 #16369074 未加载
评论 #16369487 未加载
评论 #16368151 未加载
评论 #16366671 未加载
评论 #16368110 未加载
评论 #16376507 未加载
ttdover 7 years ago
If you&#x27;re looking for more in-depth information on Bezier curves, I&#x27;ve found this document invaluable on more than one occasion, both for math and implementation suggestions: <a href="https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;</a>
评论 #16369777 未加载
评论 #16368779 未加载
评论 #16369589 未加载
mark-rover 7 years ago
One trick I learned from a graphics editor: if you have two Bezier segments and want to make a smooth transition between them, put the two control points on either side of the center equidistant from the center and on a straight line. The curve will be tangent to that straight line at the center point, and will have the same curvature where they meet.
ameliusover 7 years ago
I&#x27;m wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that &quot;pins&quot; the strip to a given (x,y) coordinate.<p>In a drawing program, the stiffness could be depicted by using grayscale values.
评论 #16366968 未加载
评论 #16367053 未加载
评论 #16366908 未加载
spepsover 7 years ago
Spiro Curves are a nice alternative: <a href="http:&#x2F;&#x2F;www.levien.com&#x2F;spiro&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.levien.com&#x2F;spiro&#x2F;</a>
评论 #16366282 未加载
评论 #16367315 未加载
ghusbandsover 7 years ago
Note for Chrome users: If you&#x27;ve enabled Strict Site Isolation in your chrome:&#x2F;&#x2F;flags (as mitigation for Spectre), it makes all of the sliders in these observablehq notebooks not work.
jordighover 7 years ago
xfig has x-splines (cross splines), and I&#x27;ve always wondered why they never got more popular elsewhere. Basically, they have an extra parameter at each endpoint that allows you to smoothly pick between approximation, smooth interpolation, or sharp interpolation, as odd as that may sound:<p><a href="http:&#x2F;&#x2F;wiki.povray.org&#x2F;uploaded&#x2F;5&#x2F;5e&#x2F;LeForgeronXSplines-10.1.1.44.5770.pdf" rel="nofollow">http:&#x2F;&#x2F;wiki.povray.org&#x2F;uploaded&#x2F;5&#x2F;5e&#x2F;LeForgeronXSplines-10.1...</a><p>Confusingly, there seem to be other splines called &quot;X-splines&quot; that appear to be completely unrelated, where the X seems to refer to the varying degree of the spline instead of just cubic.
egypturnashover 7 years ago
So for what it’s worth here’s the three rules of thumb I’ve followed for about fifteen years in Illustrator:<p>1. Pull curve handles out to about 1&#x2F;3 of the curve segment they control. 2. Don’t turn more than 90° between two control points. 3. Avoid S-curves between two control points.<p>Following these generally results in nice-looking curves that are easy to edit<p>A lot of “designers” these days like to present a rule of “only put your control points at 0&#x2F;90&#x2F;180&#x2F;270° and keep your curve handles axis aligned”, which makes <i>some</i> degree of sense in the arena of making fonts, but results in incredibly hard to manage curves as you get further away from circles.
评论 #16370801 未加载
Cenkover 7 years ago
I found Yanone’s SpeedPunk (<a href="https:&#x2F;&#x2F;yanone.de&#x2F;software&#x2F;speedpunk&#x2F;" rel="nofollow">https:&#x2F;&#x2F;yanone.de&#x2F;software&#x2F;speedpunk&#x2F;</a>) super useful in doing this kind of curvature work while designing typefaces.
pastaover 7 years ago
Maybe the side is down? Only white content on mobile.
评论 #16366247 未加载
评论 #16369010 未加载
virtualritzover 7 years ago
I thought this article would explain how to do curvature based tessellation of higher order curves.<p>That way you can draw better looking curves when approximating them with (a limited number) of (straight) segments.
评论 #16366270 未加载
bagospannersover 7 years ago
For more tasty Bézier fun: <a href="https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pomax.github.io&#x2F;bezierinfo&#x2F;</a>
Kiroover 7 years ago
Are the sliders working for you?
评论 #16367564 未加载
joehanover 7 years ago
Neat! Can someone tell me why the notebook style presentation like this is gaining popularity? (e.g., jupyter notebook)