SNOT road generator help
2013-11-01, 12:14 (This post was last modified: 2013-11-06, 5:11 by Michael Horvath.)
2013-11-01, 12:14 (This post was last modified: 2013-11-06, 5:11 by Michael Horvath.)
I'm writing a script to generate SNOT roads but I have encountered a problem. As you can see the bricks in the attached file follow a neat curve. However the rotation of the parts around the z-axis is backwards. How do I fix this in the bricks' rotation matrices? Here's the relevant bit of code in the script I wrote:
Code:
var fTime = 1/2
while (fTime <= 1)
{
var thisCoo = tCoordinates(fTime)
var thisDiv = tDerivatives(fTime)
thisDiv = vnormalize(thisDiv)
sOutString += '1 16 ' + thisCoo[0] + ' ' + thisCoo[1] + ' 0 ' + thisDiv[0] + ' ' + thisDiv[1] + ' 0 ' + (-thisDiv[1]) + ' ' + thisDiv[0] + ' 0 0 0 1 3004.dat\n'
fTime = bGetStuff(fTime, fTime + steps_distance_big, steps_distance_big, 1)[0]
}