Wednesday, 11 March 2009

script from today

for($i=0;$i<=20;$i++)
{
polySphere -ch on -o on -r $i ;
}

///////////////////////////////////
//change the number it counts by
for($i=0;$i<=20;$i+=2)
{
polySphere -ch on -o on -r $i ;
}

///////////////////////////////////
//count backwards
for($i=20;$i>=0;$i-=1)
{
polySphere -n ("ball_"+$i) -ch on -o on -r $i ;
move -a $i 0 0 ("ball_"+$i);
}
////////////////////////
///////////////////////////////////
//using names
for($i=0;$i<=20;$i++)
{
polySphere -n ("ball_"+$i) -ch on -o on -r $i ;
move -a $i 0 0 ("ball_"+$i);
}
///////////////////////////////////
//adding multiplier
for($i=0;$i<=20;$i++)
{
polySphere -n ("ball_"+$i) -ch on -o on -r $i ;
move -a ($i*5) 0 0 ("ball_"+$i);
}

///////////////////////////////////
//move scale rotate
for($i=0;$i<=20;$i++)
{
string $name = ("ball_"+$i);
polySphere -n $name-ch on -o on -r $i ;
move -a 0 ($i*5) 0 $name;
rotate -a 0 ($i*10) 0 $name;
scale -a 1 1 ($i*3) $name;
}
///////////////////////////////////
//move scale rotate make more
for($i=0;$i<=200;$i++)
{
string $name = ("ball_"+$i);
polySphere -n $name-ch on -o on -r $i ;
move -a 0 ($i*5) 0 $name;
rotate -a 0 ($i*10) 0 $name;
scale -a 1 1 ($i*0.01) $name;
}

///////////////////////////////////
//move scale rotate make more with variables
int $total = 200;
float $moveFactor = 5;
float $rotateFactor = 10;
float $scaleFactor = 0.01;
for($i=0;$i<=$total;$i++)
{
string $name = ("ball_"+$i);
polySphere -n $name-ch on -o on -r $i ;
move -a 0 ($i*$moveFactor) 0 $name;
rotate -a 0 ($i*$rotateFactor) 0 $name;
scale -a 1 1 ($i*$scaleFactor) $name;
}
///////////////////////////////////////////////
//2d sin curve
int $totalBoxes = 300;
float $sinMultiply = 5;
float $zFactor = 1.2;
for($x=1;$x<=$totalBoxes;$x++)
{
float $xMove = sin($x);
string $whateverYouWant = ("box_"+$x);
polyCube -n $whateverYouWant;
move -a ($xMove*$sinMultiply) 0 ($x*$zFactor) $whateverYouWant;
}
///////////////////////////////////////////////
//3d sin curve
int $totalBoxes = 300;
float $sinMultiply = 5;
float $zFactor = 2;
for($x=1;$x<=$totalBoxes;$x++)
{
float $xMove = sin($x);
string $whateverYouWant = ("box_"+$x);
polyCube -n $whateverYouWant;
move -a ($xMove*$sinMultiply) ($xMove*$sinMultiply) ($x*$zFactor) $whateverYouWant;
}

//////////////////////////////////////////////////
//connect to input
int $totalBoxes = 30;
float $zFactor = 1.2;
for($x=1;$x<=$totalBoxes;$x++)
{
string $whateverYouWant = ("box_"+$x);
string $expText = ("box_"+$x+".translateY = sensorInput.sensor1*"+($x*10));
polyCube -n $whateverYouWant;
move -a 0 0 ($x*$zFactor) $whateverYouWant;

expression -s $expText -o box_1 -ae 1 -uc all ;
}
/////////////////////////////////////
//connect to input expression different
int $totalBoxes = 30;
float $zFactor = 1.2;
for($x=1;$x<=$totalBoxes;$x++)
{
string $whateverYouWant = ("box_"+$x);
string $expText = ($whateverYouWant+".translateY = sensorInput.sensor1*"+($x*10));
polyCube -n $whateverYouWant;
move -a 0 0 ($x*$zFactor) $whateverYouWant;

expression -s $expText -o box_1 -ae 1 -uc all ;
}
/////////////////////////////////////
//connect to input expression sinWave
int $totalBoxes = 30;
float $zFactor = 1.2;
for($x=1;$x<=$totalBoxes;$x++)
{
float $sinWave = sin($x);
string $whateverYouWant = ("box_"+$x);
string $expText = ($whateverYouWant+".translateY = sensorInput.sensor1*"+($sinWave*10));
polyCube -n $whateverYouWant;
move -a 0 0 ($x*$zFactor) $whateverYouWant;

expression -s $expText -o box_1 -ae 1 -uc all ;
}
/////////////////////////////////////
//connect to input expression sinWave increasing
int $totalBoxes = 200;
float $zFactor = 1.2;
for($x=1;$x<=$totalBoxes;$x++)
{
float $sinWave = sin($x);
string $whateverYouWant = ("box_"+$x);
string $expText = ($whateverYouWant+".translateY = sensorInput.sensor1*"+($sinWave*$x));
polyCube -n $whateverYouWant;
move -a 0 0 ($x*$zFactor) $whateverYouWant;

expression -s $expText -o box_1 -ae 1 -uc all ;
}

No comments:

Post a Comment