I am trying to generate a race track in Vertex Shader(constraint) and only using B-Spline/Bezier/Hermite curves. My problem is that when i try to widen the obtained curve by translating another instance of it (lets say translate the x value), at certain turns, the road gets thinner.
As input, i can only have a certain number of control points/knots with which to generate a 2-degree closed(start point = end point) curve B-spline. The closed curve (translated on Z) is shown in the picture attached. The camera is positioned right above it. Every vertex from the curve has Y = 0, seeing how the track is flat without any height(no perspective view).
Is there any possible way to keep the road's width on all its sections?
If these are curves controlled by spline handles (cubic beziers, like Illustrator curves) you might need to fine tune their lengths by whatever proportion the two adjacent vertices' distance has changed. One last gotcha if you "thicken" the path too much, the curves might misbehave and cross themselves.
– david van brink Oct 24 '14 at 01:18