P
Pomax
pomax.github.io · Personal blog · on HN since 2013
Pomax is a developer who writes interactive guides on Bézier curves, fonts, and graphics, and builds JavaScript tools around them.
What HN saysHN commenters call his Bézier primer one of the best resources for anyone implementing Bézier curves.
70HN people shared it
39linked it in comments
57stories submitted
2.4Kstory points
5 months agolast shared
2013people per year2026
Most-shared posts
- 1A Primer on Bézier Curves53 people · 1.4K points · first shared 2013 · 61 comments on HN
- 2An introduction to Japanese5 people · 373 points · first shared 2016 · 122 comments on HN
- 3Flying planes in Microsoft Flight Simulator with a JavaScript autopilot (2023)3 people · 290 points · first shared 2023 · 64 comments on HN
- 4A bit of font generation: a brief excursion into OpenType3 people · 42 points · first shared 2014 · 9 comments on HN
- 5Bezier.js, for doing bezier curve things3 people · 3 points · first shared 2014 · discussion on HN
- 6Implementing strict three-point perspective2 people · 136 points · first shared 2021 · 51 comments on HN
- 7Digital colours and digital photography2 people · 92 points · first shared 2015 · 43 comments on HN
- 8Localization is hard (updating a not even particularly complex codebase)2 people · 2 points · first shared 2017 · discussion on HN
- 9OpenType: Let's learn how modern fonts work2 people · 1 points · first shared 2016 · discussion on HN
- 10Creating a MIDI pass-through recorder1 people · 13 points · first shared 2020 · 8 comments on HN
- 11I built a spice rack to fit our 72 mason jars of spices and herbs1 people · 12 points · first shared 2020 · discussion on HN
- 12Playing a MIDI-controlled drawbar synth organ. In the browser1 people · 5 points · first shared 2018 · 1 comments on HN
- 13Using flight simulation rudder pedals as MIDI pedals1 people · 3 points · first shared 2024 · 3 comments on HN
- 14Taking React to the Next Level: Mixins, Gulp, and Browserify1 people · 2 points · first shared 2015 · discussion on HN
- 15“Whose state is it, anyway?” – Further thoughts about React1 people · 2 points · first shared 2015 · discussion on HN
What HN people wrote when they linked it
WillAdams · 2025-02-25
I've been reading through a PDF on my Kindle Scribe which I downloaded from the original site --- it's a great overview, and most importantly, includes citations and references to the various papers where folks shared their research/progress.
These days of course, one would just get _The Essentials of CAGD_ and similar texts, or read: https://pomax.github.io/bezierinfo/ or watch: https://www.youtube.com/watch?v=jvPPXbo87ds
Highly recommended for anyone who wants an understanding of how modern CAD software came about.
For my part, I have found it invaluable in working on my current project as described at: https://news.ycombinator.com/item?id=43159236
TacticalCoder · 2023-10-20
> How to pack geometric shapes inside other shapes https://erich-friedman.github.io/packing/
Packing / bin-packing is very serious stuff: savings made there directly translate to less waste / reduced costs (for example when cutting shapes into sheets of metal in big factories).
> * Amazing reference on bezier curves https://pomax.github.io/bezierinfo/
And some beautiful graphs in there, notably those under section 26 "Curvature of a curve". Screenshot'ed for my own collection of good looking stuff!
barbariangrunge · 2023-06-26
I wrote an openGL font renderer once. It was a lot of fun. Bezier curves are such an elegant technique. The difference between what I wrote and what you'd use in a proper environment is pretty big, but I recommend it sometime.
Fonts are pretty much just third or fourth degree beziers, plus a way to shade between the lines iirc (i may have my terminology wrong). Try it out sometime, I did my curves using tessellation shaders.
Btw, you'll never find a better guide on beziers than here:
https://pomax.github.io/bezierinfo/
s1mon · 2022-12-17
I’ve been following Freya’s work [0] for a while. She works in the game industry working with Unity, hosts a bunch of Discord channels, and live streams about game math and shaders. This video is relatively long, but it’s one year in the making. If you ever wanted to understand a bit more about Béziers vs B-Splines and G2 vs C2, this is great place to start.
PS. I would also highly recommend these sources which have been covered before on HN:
Curves and Surfaces by Bartosz Ciechanowski [1]
A Primer on Bézier Curves by Pomax [2]
[0]
https://acegikmo.com/
[1]
https://ciechanow.ski/curves-and-surfaces/
[2]
https://pomax.github.io/bezierinfo/
sheereng · 2022-08-16
This Bézier primer is really interesting too, one of the best resources if you need to implement anything related to Bézier curves.
https://pomax.github.io/bezierinfo/
samwillis · 2022-08-16
Two other brilliant posts on Bézier curves (and other 2d/3d curve types):
- Curves and Surfaces by Bartosz Ciechanowski: https://ciechanow.ski/curves-and-surfaces/ (His whole site is a treasure trove of incredible explanations!)
- Primer on Bézier Curves: https://pomax.github.io/bezierinfo/
lentil_soup · 2020-02-21
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!
https://pomax.github.io/bezierinfo/
peterkelly · 2019-04-20
Another great resource on Bézier curves: https://pomax.github.io/bezierinfo/
TheRealPomax · 2018-09-11
That's hilarious, I was working on https://pomax.github.io/music-theory-js/public/ over the weekend (working on adding a chord arranger to complement the cell arranger, so you can write a C3-root I–V–vi–IV as literally a "C3 I" cell with some duration, followed by just dropping in V, vi, and IV cells with some duration.
bra-ket · 2018-06-02
for a great primer on Bézier Curves see https://pomax.github.io/bezierinfo/
greggman · 2017-07-20
Used "correctly" the web with JS is way better than the web without. There's plenty of sites that use JS great from actual apps to articles and tutorials with interactive examples. In fact personally I find myself disappointed when I see an article that would clearly be better with interactive diagrams but the authors are stuck thinking the web it just a transmitted book and not it's own medium but better strengths.
A couple of examples where IMO JS makes the page superior to one without
https://mattdesl.svbtle.com/drawing-lines-is-hard
https://bost.ocks.org/mike/algorithms/
https://pomax.github.io/bezierinfo/
jacobolus · 2016-05-08
For anyone with enough formal mathematics background to follow the argument, Lyle Ramshaw’s monograph, On multiplying points: the paired algebras of forms and sites, supplies the clearest formalism for understanding and working with Bézier curves and various CAGD surface primitives. http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-169.html (Note: ~150 page math book, takes some work to follow.)
Also check out the pomax bezier curve primer, which is filled with interactive diagrams and nice explanations of algorithms for doing anything you might like with Bézier curves, http://pomax.github.io/bezierinfo/ (previous discussions, https://news.ycombinator.com/item?id=11402656 https://news.ycombinator.com/item?id=8804691)
madethemcry · 2015-02-05
Well, there is at least another source with better visualizations AND explanations of bezier curves. So I'm not impressed at all.
The ultimate guide for bezier curves including great animations to explain the concept is from pomax:
http://pomax.github.io/bezierinfo/
I would go as far as to call it a bezier reference document. I learned both geomteric and numerical approaches to calculate, combine and draw bezier curves from this source. I am still amazed by the beauty of de Casteljau's algorithm.
The document has been submitted here before:
https://news.ycombinator.com/item?id=8804691
https://news.ycombinator.com/item?id=5714842
https://news.ycombinator.com/item?id=7997706
dleibovic · 2013-05-11
Another great article on bezier curves that I've used is: http://pomax.github.io/bezierinfo/
quag · 2025-08-29
It sounds like you've got something specific in mind when you say, "modeling". The term modeling is used in a lot of different situations to mean different things. For example, it could mean to make a 3d model in Blender, it could mean to pose for someone to paint you or to take a photo, with databases it's used to mean modeling the data, with statistics it's used to mean finding a way to simply represent and reason about the data (create a model of it).
The things you've listed out make me guess you want to write 2d or 3d image rendering software. Is that right?
If that's the case, there's no substitute for trying to recreate certain algorithms or curves using a language or tool that you're comfortable with. It'll help you build an intuition about how the mathematical object behaves and what problems it solves (and doesn't). All of these approaches were created to solve problems, understanding the theory of it doesn't quite get you there. If you don't have a good place to try out functions, I recommend https://thebookofshaders.com/05/ , https://www.desmos.com/calculator , or https://www.geogebra.org/calculator .
A good place to start is linear interpolation (lerp). It seems dead simple, but it's used extensively to blend two things together (say positions or colors) and the other things you listed are mostly fancier things built on top of linear interpolation.
https://en.wikipedia.org/wiki/Linear_interpolation
For bezier curves and surfaces here are some links I've…
delhanty · 2019-08-21
>I just added a weirdly missing short section on plain rational beziers
That's great! Thanks for writing and maintaining this document over the years!
Coincidentally, I was referencing the section on offsetting [0] just last week and read the following,
>There is a small class of polynomials where the square root is also a polynomial, but they're utterly useless to us: any polynomial with unweighted binomial coefficients has a square root that is also a polynomial. ...We can already create offset curves for points, we call them circles, and they have much simpler functions than Bézier curves.
and thought, something like: "That's correct because Bézier curves in the context of this document, SVG, HTML canvas and fonts means polynomial (i.e non-rational) Bézier curves."
But if you're now considering rational Bézier curves as in-scope for the document that changes things doesn't it ? E.g Circles represented as rational Bézier quadratics, and Pythagorean Hodographs [1].
[0] https://pomax.github.io/bezierinfo/#offsetting
[1] http://demonstrations.wolfram.com/G1HermiteInterpolationWithPythagorea…
jtolmar · 2018-05-31
For #1, try to explain it to a friend, preferably in person, possibly via a chat app, but definitely not via email. Then base your writing on the way you explained that. (But like, with complete sentences.) This is the best method I know for shaking off the instinct to sound like other people's writing (i.e: like technical papers) instead of just explaining things.
Here's three examples of excellent explanations via very different techniques:
[1] https://pomax.github.io/bezierinfo/ - Bezier curves, exhaustively technical but well-indexed and just really well explained
[2] https://directtovideo.wordpress.com/2011/02/25/ceasefire-all-falls-dow… - Advanced and unorthodox rendering techniques, narrative format, basically the opposite priorities of a paper (assumes you can fill in the gaps on how, details more what worked and why it's being used)
[3] http://archive.is/XjbUy (supposed to be at qntm.org/gay, but apparently being rewritten) Database normalization principles via the lens of making a database handle gay marriage, humorous
Also, if you're explaining sequential bayesian filtering by any chance (my specialty), I'd really like it if someone actually wrote down the awful formal version with the point-wise Bayes Theorem and the giant integral convolving over your state transition function, then explained how particle filters / kalman filters / hidden markov models get around how awful that is. It's how I introduce the topic at work but I don't have my slides handy out…
dahart · 2026-03-15
Here’s an interactive picture of how the splitting with lerps works: https://pomax.github.io/bezierinfo/#splitting
Did you ever doodle parabolas on graph paper by drawing straight lines? That’s one way to see why you can form nonlinear curves using only lerps. (For example https://mathcraft.wonderhowto.com/how-to/create-parabolic-curves-using…
Your thought is correct - this does (in a sense) move along the curve to produce new control points, and the subset does match the curve exactly. And the new control points are non-linear too! (The inner ones, anyway.) Pay attention to how the new control points are chosen - to split you take one control point from each level of the lerp tree.
llimllib · 2025-08-13
Pomax's primer on bézier curves is the reference they used: https://pomax.github.io/bezierinfo/
They do a pretty good job introducing the mathematics gently I think. But maybe work backwards from whatever you don't understand?
nox101 · 2024-04-11
Try https://pomax.github.io/bezierinfo/
I also learned from this one which I think is simpler but not as detailed
https://webglfundamentals.org/webgl/lessons/webgl-3d-geometry-lathe.ht…
amitp · 2023-10-20
Thanks! I celebrate weird hobby web sites. Here are some of my favorites:
* 59828 different definitions of "triangle center" https://faculty.evansville.edu/ck6/encyclopedia/ETC.html
* Amazing reference on bezier curves https://pomax.github.io/bezierinfo/
* Sunbeam radiant toaster http://automaticbeyondbelief.org/
* How to pack geometric shapes inside other shapes https://erich-friedman.github.io/packing/
* Pictures of library cards https://librarycards.tripod.com/id1.html
* All about pc fans https://nick-black.com/dankwiki/index.php?title=PC_Fans
* Cross sections of candy bars https://scandybars.tumblr.com/
* All kinds of info about bicycles https://www.sheldonbrown.com/
* Every type of plastic used by lego https://bricknerd.com/home/every-type-of-plastic-used-by-lego-5-20-22
* Ian's Shoelace Site https://www.fieggen.com/shoelace/
Nycto · 2023-09-10
Obligatory links for anyone that is interested in learning more about Bézier curves:
https://pomax.github.io/bezierinfo/
https://pomax.github.io/bezierjs/
https://github.com/Pomax/bezierjs
bradrn · 2023-09-03
I’m slightly surprised to see no-one has linked this yet: https://pomax.github.io/bezierinfo/
ygra · 2022-03-05
You can use cubic Bézier curves to approximate a circular arc: https://pomax.github.io/bezierinfo/#circles_cubic. In many cases that's even how circular arcs are rendered, even when they are represented with a different data structure. You'll often see the the constant 0.5522... which is for quarter circles. E.g. both WPF and Java's Swing render arcs with that approximation, perhaps others, but those where the places where I checked the source code recently.
The benefit of doing this for quarter-circle arcs directly may be that you save a bunch of trigonometry that otherwise has to happen (cf. the Pomax link).
phkahler · 2022-01-27
There is a nice C++ (GPLv3+) implementation of a lot of these algorithms in Solvespace here:
https://github.com/solvespace/solvespace/blob/master/src/srf/ratpoly.c…
I'll be having a read of this to see if we can improve on some of these. In particular I've wanting to add curve-curve intersection as in section 29:
https://pomax.github.io/bezierinfo/#curveintersection
I had already considered that exact approach, but there are cases (in CAD anyway) where portions of 2 curves may exactly overlap. In that case we'd want to identify the overlapping region and split the 2 curves into 3. These special cases might seem like corner cases and they are, but they come up in practice more than I'd like.
cobbal · 2021-12-12
For a really in-depth, online resource on Bézier curves, I constantly consult https://pomax.github.io/bezierinfo/
brundolf · 2021-07-30
For any who come after, I found this for formal Bezier functionality: http://pomax.github.io/bezierjs/
And this for what I was really looking for, natural and rich animations: https://github.com/michaelvillar/dynamics.js/
benrbray · 2018-12-08
See also Pomax's "A Primer on Bezier Curves":
https://pomax.github.io/bezierinfo/
bagospanners · 2018-02-13
For more tasty Bézier fun: https://pomax.github.io/bezierinfo/
ttd · 2018-02-13
If you're looking for more in-depth information on Bezier curves, I've found this document invaluable on more than one occasion, both for math and implementation suggestions: https://pomax.github.io/bezierinfo/