Monday 11 November 2013

Ticker-Tape Tumble

Here is an expression I used to simulate the tumbling motion of ticker-tape.
The ticker tape need to tumble fast around its long axis, in my case the x-axis.


//which direction to tumble?userScalar1PP=rand(1);if(userScalar1PP<0.5){tumble_dirPP=1;}else {tumble_dirPP=-1;}

tumble_speedPP=rand(30,60);

rotStartPP=sphrand(360);rotIncrPP=<<(tumble_speedPP * tumble_dirPP),rand(-2,2),rand(-10,10)>>;

rotationPP=rotStartPP;

sizePP=rand(0.25,0.35);

indexPP=rand(3);

lifespanPP=99;

No comments:

Post a Comment