Skip to content

Commit

Permalink
Add notes about using circular arcs instead of bezier curves
Browse files Browse the repository at this point in the history
The README contains my plans to use bezier curves to represent curved roads. I later read lots of papers about this and decided circular arcs would be a cleaner way to go, and wrote up my notes here: http://www.redblobgames.com/articles/curved-paths/
  • Loading branch information
amitp committed Aug 1, 2013
1 parent 68aa6fd commit 92c7605
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README
Expand Up @@ -68,7 +68,8 @@ represent positions (on a path of length L, a vehicle can have 0 <=
position < L). We need to map position to world location and
orientation. If a vehicle follows a fixed speed, its position
variable can be incremented by V*dt, and it will properly follow the
path from 0 to L.
path from 0 to L. (Consider using piecewise circular curves to avoid
needing an approximation with line segments.)

Vehicles are trucks, trains, cranes, and ships. Vehicles may be linked
together in a chain. Each car has a begin/end position on a path, as
Expand Down Expand Up @@ -134,4 +135,8 @@ There are also approximations of cubics using quadratics:
<http://timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm>

Bezier “easing” happens to be what we need for moving along a curve at
a constant rate. <http://www.algorithmist.net/beziereasing.html>
a constant rate. <http://www.algorithmist.net/beziereasing.html>

I later found that circular arcs were a cleaner way to represent curves
if I want to avoid dealing with approximations with short line segments.
I wrote up notes here: <http://www.redblobgames.com/articles/curved-paths/>

0 comments on commit 92c7605

Please sign in to comment.