I would like to plan a small road network for an imaginary city, and I am looking for a way to create curved road segments. I am familiar with cubic Bezier curves, but I am not sure if it's the best fit for this problem, and it's not trivial to offset. Circle arcs are easy to calculate and offset, but they are not as flexible and hard to chain. What kind of splines do enginieers use, when they plan roads?
3 Answers
Circular arcs are not used except in special situations, because the sudden change in curvature from a straight road to a circular arc would mean drivers had to quickly turn the steering wheel to the correct position to follow the circular arc, hold the wheel steady, and quickly turn back to straight at the end of the arc. There would also be problems if the road was banked around the curve (which is standard practice for high speed roads) since the bank angle can't suddenly jump from zero to the correct value for the circular arc.
The standard shape is a spiral curve, where the driver follows the curve by turning the wheel gradually to enter and leave the curve.
You could probably make a reasonable approximation to the standard spiral from Bezier curves, once you realize what you are trying to achieve.
There are lots of web references to the design process for spiral curves, including designing the road camber around the curve (which may be irrelevant for your project).
See http://cc4w.net/spiral/SpiralTraining.pdf for example.
Roads are usually designed using catenary curves. https://sketchup.engineeringtoolbox.com/catenery-curve-c_169.html
Road curves are designed around vehicle velocities and they are not uniform. As vehicles approach a curve they tend to slow down and then accelerate out of the bend which means a non uniform curve is best suited to the purpose. This can be parabolic or more accurately, catenary. The curves are usually calculated using differential calculus.
Clothoid?
I recall hearing that some roadway curves are designed using the Clothoid Spiral AKA the Spiral of Cornu AKA https://en.wikipedia.org/wiki/Euler_spiral in which the (radius of) curvature varies linearly with arclength.
Caveat: this is from ages ago (AKA grad school); YMMV.