
A Primer on Bézier Curves (2013) - davidbarker
http://pomax.github.io/bezierinfo/
======
agumonkey
This is amazingly exhaustive, and for those still hungry, there's always the
Nurbs Book
[http://www.springer.com/computer/image+processing/book/978-3...](http://www.springer.com/computer/image+processing/book/978-3-540-61545-3)

~~~
TheRealPomax
although as a Springer book it's a bit pricey =( (I'll be trying to add
rational B splines and NURBS to the primer soon..ish... there's a few other
topics that still need expanding first)

~~~
agumonkey
Yeah, I used it while in college thanks to their library.

------
kghose
This is a very nice tutorial. One small point. Coordinates are expressed in a
"X/Y" format which was very confusing to me because I was thinking of them as
ratios. It might be better to print them the commonly used tuple convention
(X,Y)

~~~
TuringTest
The tutorial doesn't work for me. It provides a thorough explanation of the
polynomials, but it fails to explain the very basics of how the curves are
laid out on the plane.

It does a nice work of explaining how a _circle_ is drawn, but its explanation
of how x and y are calculated for a Bézier curve doesn't make sense to me:
"Bézier curves use the "binomial polynomial" for both x and y." If the same
function on "t" is used for both x and y, they would always have the same
value, and the "curve" is always a diagonal with 45 degrees. What am I
missing? I can't infer it from the tutorial.

Also, it introduces the idea of a "control point" and starts using it, but
never manages to _define_ what it is, or how it is represented in the equation
or graphically. It merely labels some curves as "P1", "P2"... in the graphs
and telss that these somehow change the shape of the curves, and tells us that
they have an associated linear "wi" weight; but again, the way in which the
(x1, y1) pairs are connected to the binomial and polynomial term is never
spelled out, and left as an exercise to the reader.

Things are further complicated by the mysterious "strength" parameter "S" in
the graphs, which is also unexplained, never used again, and appears right
when we're trying to understand the difficult concept of a control point to
further confuse things. I had followed the tutorial quite well up to that
point, but that section lost me completely.

~~~
colomon
Haven't read the article, but I do know a bit about these curves. Bézier
curves do indeed use the "binomial polynomial" for both x and y. That
polynomial defines how the control points are used (with t) to calculate the
point on the curve.

So for the simplest example, a linear Bézier curve, the curve is a straight
line from the first control point to the second.

------
dclowd9901
One of my favorite side projects was building a bezier sprite pather for
Impact.js game engine (was working on a moth-balled top-down shooter).

[https://github.com/dclowd9901/impactjsBezier](https://github.com/dclowd9901/impactjsBezier)

This is one of the sites that contributed to that work. So strange to see it
appear out of context here.

------
jarek-foksa
Are there any creative tools that would make use of quadratic Bezier curves?
While cubic Beziers are easier to tweak, it is much easier to draw smooth
shapes with quadratic Beziers. They seem to be also easier to implement (only
one control point), not sure why major vector and pixel graphics editors don't
support them.

Ideally I would prefer to have an option to draw paths with either quadratic
or cubic Bezier segments, but edit paths normalised to cubic Bezier segments.

~~~
mistercow
I used quadratic curves to render strokes in TabletDraw, although that's not
user level.

Another advantage of quadratic curves is that they can be converted to a
parabolic function plus a rotation. That opens the door for all sorts of
optimization that is much harder with cubic bezier curves, which are not
guaranteed to be functions.

~~~
TheRealPomax
Not entirely true, but not entirely false either: the quadratic has degenerate
cases where it can't be represented by a single quadratic polynomial, and
regardless of the order, each dimension in a nth order Bezier curve is
guaranteed to be a plain old nth order polynomial function.

Most properties for the cubic curve as a whole come from evaluating each
dimension independently, which still allows for a fair number of
optimizations, and we can classify cubics in a few canonical forms that let us
do even more optimizations ("a geometric characterization of parametric cubic
curves" by Stone and DeRose is a good read on that)

So a cautionary note: finding the angle necessary to turn a quadratic curve
into a parabola (for unbalanced curves) can cost as much as using an optimized
canonical cubic, where the user's input only defines the linear transform that
you throw at the graphics context to make sure the curve you then draw matches
the curve the user expected.

------
gopalv
Is it some sort of coincidence that both Bezier and Casteljau were working for
car companies?

Renault & Citroen feels like they were design powerhouses in this context,
with numerical industrial design.

The curves were like compressed specifications, instead of being "make it look
like this" with a sculpted model. That said, cars from the same era built by
aerodynamics engineers also resulted in beautiful curves (like a Jaguar E
Type).

~~~
jacquesm
Sheetmetal fabrication is hard, and knowing what you can and can not make out
of a single sheet is not obvious. For that reason car companies were very
early in the game to use computers to gain an edge over their competitors by
making others 'impossible' shapes with repeatable accuracy and resulting
material thickness. Deformation results in variable material thickness and if
you want to input curves into a computer (so your numerically controlled mill
can make the tool-and-die used to stamp the part) then it helps if you can do
so easily. That's where the Bezier curves (and splines) come in, they allow
you to specify a complex curve using only a few points.

I used them extensively for a computer program that cut sails for sailing
vessels, the problems are roughly similar (only you can't really deform cloth
all that much so you're going to end up cutting panels, the end result looks
much the same as a 2 dimensionally deformed sheet of metal though).

~~~
agumonkey
Reminds me of the picture here [http://blog.martindoms.com/2012/04/25/splines-
and-curves-par...](http://blog.martindoms.com/2012/04/25/splines-and-curves-
part-i-bezier-curves/)

How people designed curved surface thanks to material tension and knots.

------
delinka
Combine this with what we learned from Pixar about smoothing surfaces and it
appears that Pixar has adapted the Bezier curve to 3D.

I'm always a little geeked-out by unification like this. :D

~~~
TheRealPomax
3d Beziers have been a thing for a long time already though! In modelling,
NURBS surfaces are typically used (the non-uniform rational B-spline, where
the rational B-spline part is a "rationalised" bezier, which is a whole
section that I've not had the time to write yet...)

~~~
gdubs
I think what the parent comment was saying is that the smoothing algorithm
used in subdivision modeling is very similar to bezier. Actually, subdivision
surfaces are very similar to B-splines [1], but are much more convenient to
use than NURBS -- which require the modeler to maintain consistent rows of
control points throughout the model. ILM's use of patch modeling in films like
Jurassic Park are incredible examples of working around these constraints. (I
believe they side-stepped the continuity issue with their proprietary
"enveloping" software which allowed them to blend discontinuous B-spline patch
surfaces together.)

Love this post btw -- extremely impressive / educational.

1:
[http://graphics.pixar.com/library/Geri/paper.pdf](http://graphics.pixar.com/library/Geri/paper.pdf)

~~~
TheRealPomax
That's a nice paper. Filed!

