Lightwave Community at SimplyLightwave

Lightwave Community at SimplyLightwave (http://simplylightwave.com/forum//index.php)
-   Animation (http://simplylightwave.com/forum//forumdisplay.php?f=16)
-   -   Random Motion on X & Y axis (http://simplylightwave.com/forum//showthread.php?t=5393)

NoStr0m0 31-10-2008 09:28 PM

Random Motion on X & Y axis
 
I have this point that needs to move on a grid by a random amount of spaces, in a random direction.

What I would like is to use some expressions so I wouldn't have to animate it myself, thus respecting the original algorithm idea, which is the randomness of the motions.

The problem that arises is the random() function generates a random number every frame, not only when it's called.
Is there a way to work around this function or make it generate a random value only once every k frames or keep the generated random value for those k frames?

I've been at this for two days now and probably I'm missing the obvious, so any suggestions are greatly appreciated.

Thank you!

Here are two images to get an idea of about the motion and the problem.


http://img371.imageshack.us/img371/4...nvalzo2.th.jpghttp://img371.imageshack.us/images/thpix.gif http://img201.imageshack.us/img201/8...mwalxh7.th.jpghttp://img201.imageshack.us/images/thpix.gif

NoStr0m0 01-11-2008 10:24 PM

Or at least another way to write that expression to only get Frame K, without the fractional parts. (meaning frame 1, without the 1,1;1,2...1,9)


All times are GMT. The time now is 12:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
SimplyLightWave.com 2011