Nice work, aeytom! Created a small stream in my hood that was so curvy that I didn't have the courage to create it until now. Your script makes it very easy.
However... to make that river look really good I had to make a little bit of variation in the width, so that curves are a bit wider that the straights.
To create this effect automatically, I took the liberty of adding a bit of code to your script. Now it takes an extra parameter, "variancy", expressed as an extra parameter in the name of the river. As in "20m 30v Spree". Shorter segments are a bit wider, longer segments are a bit more narrow now. I would love to have created the effect depending on the angle between consecutive segments but I am afraid I did not completely grasp how you do the math (in getEquation), and the effect is good enough as it is now, I think.
In order NOT to pollute this thread with endless copies of code I send you my version as PM, maybe you can have a look to see if it is any good.
