Motion algorithm

hi, i’m trying to get some particles moving in a nice random motion style, unfortunatly the only two types of random motion i know are brownian motion and motion you get using perlin noise. It so happens that brownian motion doesnt look that nice, and the [URL=“http://www.sjeiti.com/?p=305”]as3 perlin noise classes by ron valstar run pretty slow when animating 1000 particles.

so, does anyone know how I could get some pretty random “nice” looking motion, I’m running out of google searches. :sen:

thanks

What exactly are you trying to do?

Here’s some particle movement:
http://www.zeuslabs.us/2006/05/09/introduction-to-particle-systems-using-actionscript-3/

I was trying to do this.
I just used sin/cos waves for each particle, and it looks pretty random, although it’s not, it does the trick though.
It will be needing more work to make it better.

phwhitfield, would you have any pointers on learning about strange attractors and such ? everytime I try and get into it, I really don’t know where or how to start.
cheers

I wouldn’t bother writing your own… too complex and time consuming. Use one that already exists :slight_smile: This is the effect you’re after, albeit with more particles and some darkening when not near the light areas of the face:

http://flintparticles.org/examples/mutual-gravity

I’ve seen the examples for that engine already, it’s not really what I’m after. What i was really trying to achieve was some sweet flocking motion like you see alot in robert hodgin’s videos… thats didnt work out, so i just “modified” the brownian motion code a little to make it look a little smoother.

Those flint examples had terrible performance.

The particle engine I wrote has like 6000 particles running at 60 fps.

Dom - are you using 100% bitmap rendering? Because with only 1200 particles, I would have thought it would faster than it does, I’m only getting around 20fps.

well i set the fla to 20fps since i’m using a timer to update every 5ms. I got it up to 3354 with still the same performance.
but no, i’m constantly drawing a sprite that’s not been added to the display list, but contains all the particles being drawn to the bitmapData (if that makes any sense)