Yes, what you want to do may work, and your drawing shows how it works quite well. The pseudocode will look something like this:
curveLength = <length of entire curve>; tileLength = <length of 1 tile>; currentLength = 0; while (currentLength < curveLength) { currentTileLength = 0; startPt = prevPt = calculateBezierAt(0.0); for (t = delta; (t < 1) && (currentTileLength < tileLength); t += delta) // delta is up to you. I often use 1/100th { nextPt = calculateBezierAt(t); distance = distanceBetween(prevPt, nextPt); currentTileLength += distance; currentLength += distance; prevPt = nextPt; } endPt = prevPt; // Calculate quad here }
To calculate each quad, you need to create perpendiculars at the start and end points. You then have 4 points for your ATV.
Note that I simplified by assuming there is only one bezier. Usually you will have many of them related to each other, so it will be a little harder to sort them out than I said above, but it should not be too difficult.
Also note that if you have either very tight angles or the curve goes back, you may get poor results. Presumably, you will avoid this if you yourself generate curves.
source share