Hi Andrei,
> Thanx Michael, works great, but one thing is have to be fixed for example if curve have 50 units
> long it works good but if curve for example have 2000 units long it does not work, nothing
> distorting... I have to enter value by hands.
That doesn't have anything to do with the rebuild part, it's just how the script is currently set up, it uses a sort of base displacement of 0.2 units.
If you'd like something that's relative to the overall size of the curve rather than a more fixed size displacement, try changing the randomizePoints() function inside _DistortCurves.htm to this:
code:
function randomizePoints()
{
for ( var i=0; i<curves.length; i++ )
{
var size = scurves.item(i).getBoundingBox().diagonalLength / 20.0;
for ( var p=0; p<curves[i].length; p++)
{
curves[i][p].dx = size*(Math.random()-0.5)/5;
curves[i][p].dy = size*(Math.random()-0.5)/5;
curves[i][p].dz = size*(Math.random()-0.5)/5;
}
}
lastdistort=-1;
}
This version puts in a scale factor that's related to the bounding box size of the object so the displacement on your 2000 unit long curve should work a bit more naturally this way.
- Michael
|