hn-classics/_stories/2010/14201894.md

53 lines
1.9 KiB
Markdown
Raw Normal View History

---
created_at: '2017-04-26T10:23:46.000Z'
title: Animated Bézier Curves (2010)
url: https://www.jasondavies.com/animated-bezier/
author: arm
points: 106
story_text:
comment_text:
num_comments: 9
story_id:
story_title:
story_url:
parent_id:
created_at_i: 1493202226
_tags:
- story
- author_arm
- story_14201894
objectID: '14201894'
2018-06-08 12:05:27 +00:00
year: 2010
---
2018-02-23 18:19:40 +00:00
[Source](https://www.jasondavies.com/animated-bezier/ "Permalink to Animated Bézier Curves - Jason Davies")
# Animated Bézier Curves - Jason Davies
Animated Bézier Curves - Jason Davies
[Jason Davies][1] → Animated Bézier Curves
# Animated Bézier Curves
Play with the control points to modify the curves!
These animations illustrate how a parametric [Bézier curve][2] is constructed. The parameter _t_ ranges from 0 to 1. In the simplest case, a first-order Bézier curve, the curve is a straight line between the control points.
For a second-order (quadratic) Bézier curve, first we find two intermediate points that are _t_ along the lines between the three control points. Then we perform the same interpolation step again and find another point that is _t_ along the line between those two intermediate points. Plotting this last point yields a quadratic Bézier curve. The same steps can be repeated for higher orders.
Inspired by a [similar animation on Wikipedia][3]. Thanks to [Mike Bostock][4] for the suggestion, and for citing me in his [D3 paper][5]!
Want to know more about Bézier curves? I highly recommend Mike Kamermans' interactive online book, [A Primer on Bézier Curves][6].
© [Jason Davies][1] 2010 | [Privacy Policy][7]
[1]: https://www.jasondavies.com/
[2]: http://en.wikipedia.org/wiki/Bezier_Curve
[3]: http://en.wikipedia.org/wiki/Bezier_Curve#Constructing_B.C3.A9zier_curves
[4]: https://bost.ocks.org/mike/
[5]: http://vis.stanford.edu/files/2011-D3-InfoVis.pdf
[6]: https://pomax.github.io/bezierinfo/
[7]: https://www.jasondavies.com/privacy/