Re:Mathematical Intuition Behind Bezier Curves
by dietrichepp on Sunday May 08, 2016 @04:19PM
(#11655571)
The geometric intuition is important but missing. Calculus and algebra is not everything.
Short version:
Imagine a line connecting A to B. Now imagine a point sliding across that line, starting at A and going to B.
Now consider a line A to B and a second line B to C. A point slides across each line: one from A to B, another from B to C. Now draw a line connecting these two points, and imagine a point sliding across that line.
This moving line starts as A to B, ends as B to C, so the point sliding along it goes from A to C along a curved path. This is a quadratic Bézier curve.
Re:Mathematical Intuition Behind Bezier Curves
by blahedo on Sunday May 08, 2016 @05:35PM
(#11655974)
The crucial insight I drew from the OP was that Bézier curves are essentially a weighted average of the endpoints and control points, with the weights shifting an a parametric way. Somehow that had never clicked before. Your comment gives a nice way to elabourate on how the parameterisation works.
Re:Mathematical Intuition Behind Bezier Curves
by jacobolus on Sunday May 08, 2016 @02:42PM
(#11655164)
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.)
Re:Mathematical Intuition Behind Bezier Curves
by theoh on Sunday May 08, 2016 @04:26PM
(#11655609)
Yes, this (Lyle Ramshaw's paper). My impression is that his work succeeds in finding the simplest human-comprehensible way of defining these objects. It's very much not the pragmatic "local hacker" approach to graphics, which can be forbidding.
It can be so discouraging for people to encounter this stuff (geometric modelling primitives) as a mysterious incantation, essentially as raw algebraic code. I think there's probably more scope to humanize it, as Ramshaw and DeRose's demonstrations suggest.
Re:Mathematical Intuition Behind Bezier Curves
by crispyambulance on Sunday May 08, 2016 @12:57PM
(#11654695)
To complement, here's a particularly lucid explanation of how bezier curves are constructed that appeals to geometric intuition: https://vimeo.com/106757336
Re:Mathematical Intuition Behind Bezier Curves
by dclowd9901 on Sunday May 08, 2016 @01:21PM
(#11654785)
Bezier curves are really cool and fun to learn. I actually had built an Impact.js bezier tool plugin for a shmup I was working on a while ago: https://github.com/dclowd9901/impactjsBezier
I did different things like toy with caching movement on the curve, having constant speed on the path, etc. There's even a bit of calculus in there, in estimating the length of the curve.
Re:Mathematical Intuition Behind Bezier Curves
by CountHackulus on Sunday May 08, 2016 @02:01PM
(#11654959)
I only really found out how easy and fast Bezier curves are recently when I was adding some smoothing pathing to a game. They're really impressively useful.
Re:Mathematical Intuition Behind Bezier Curves
by boulos on Sunday May 08, 2016 @11:32PM
(#11657439)
You probably want a Catmull-Rom or similar interpolating (instead of approximating) spline. It's much easier to control animation or other paths when you know it'll precisely go through the points you specify.
Re:Mathematical Intuition Behind Bezier Curves
by blt on Monday May 09, 2016 @01:06AM
(#11657743)
You also need to care about velocity when using splines as trajectories. In general, if you sample a spline at a constant delta-t, your speed through the world won't be constant.
Re:Mathematical Intuition Behind Bezier Curves
by CountHackulus on Monday May 09, 2016 @05:18PM
(#11663303)
This is especially true if you've got large smooth curves with small "sharp" curves that you want to keep a constant speed over. You can mostly just ignore it if all of your curves have a fairly constant curvature, but obviously test first.
Re:Mathematical Intuition Behind Bezier Curves
by boulos on Sunday May 08, 2016 @11:35PM
(#11657448)
I don't think this does a great job of building up an intuition of how these curves are derived. Instead, I'd recommend starting with quadratic (and noticing the constraints on the tangents) and then realize how the cubic is built up from that. Like all (later discovered) splines it's a really elegant and simple thing!
Short version:
Imagine a line connecting A to B. Now imagine a point sliding across that line, starting at A and going to B.
Now consider a line A to B and a second line B to C. A point slides across each line: one from A to B, another from B to C. Now draw a line connecting these two points, and imagine a point sliding across that line.
This moving line starts as A to B, ends as B to C, so the point sliding along it goes from A to C along a curved path. This is a quadratic Bézier curve.
Add another layer and you get cubic.
https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Constructing...
But clearly the geometric viewpoint isn't important to everybody, because the author of the post would have mentioned it if so!
See also, maybe: http://psychclassics.yorku.ca/Galton/imagery.htm http://www.nytimes.com/2015/06/23/science/aphantasia-minds-e... https://www.facebook.com/notes/blake-ross/aphantasia-how-it-...
How to connect simple concepts (I think almost everybody would understand linear interpolation, even in [a, 1-a] form) and get polynomials.
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)
I also enjoyed this interview with Tony DeRose: https://www.youtube.com/watch?v=mX0NB9IyYpU
It can be so discouraging for people to encounter this stuff (geometric modelling primitives) as a mysterious incantation, essentially as raw algebraic code. I think there's probably more scope to humanize it, as Ramshaw and DeRose's demonstrations suggest.
Talk: https://youtu.be/Zkx1aKv2z8o?t=15m54s
I did different things like toy with caching movement on the curve, having constant speed on the path, etc. There's even a bit of calculus in there, in estimating the length of the curve.