Hacker News new | past | comments | ask | show | jobs | submit login

Bezier curves.

Cubic bezier curves (generally the most common type) are represented by cubic polynomials x(t) and y(t) (or just one polynomial P(t) where the coefficients are vectors). The first derivative gives you the tangent and normal. The second derivative gives you the direction the normal will gradually become as t increases. The third derivative gives you the change in this change (the fourth derivative is zero). Curvature is also computed from the first and second derivatives: K = det(P', P'')/||P'||^3

Other kinds of bezier curves are similar. In quadratic ones the first and second derivatives are normal and normal change but the third derivative is zero. In higher-polynomial bezier curves the third derivative changes over time as the fourth is non-zero, and so on.

Source is a really interesting video on bezier curves which I highly recommend: https://www.youtube.com/watch?v=aVwxzDHniEw.




And these are common in everyday life due to screensavers, right?


Fonts, vector graphics, interpolation for animation and video games


I think that, nowadays, it’s more likely that fonts use quadratic Bézier curves (as in TrueType and its derivatives), rather than cubic ones (as in PostScript and Adobe’s Type 1 fonts), but since OpenType supports both (https://en.wikipedia.org/wiki/OpenType#Description) I may be wrong.

Similarly, SVG supports both quadratic and cubic Bézier curves.


And cars. Curves with higher-order continuity is why modern cars have such interesting smoothly curved surfaces.


This was the raison d'etre for Bézier curves. Its inventor and re-inventor worked at car companies.

https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Invention


Roads and tracks. Connecting straightaways and turns to at least second order (sometimes third, esp. for high speed trains) makes transitions much smoother as it reduces or eliminates jerk.

https://en.m.wikipedia.org/wiki/Jerk_(physics)

Even during driving, intuitively you don't yank the steering wheel to the desired position but produce a eased-in eased-out progressive movement that results in such a trajectory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: