Particle Attraction and Fluid Simulation

Quick Update before I head to bed –

Been work on an idea for particle attraction ( might have noticed some sketches in my previous blogs ).  Trying to figure out the best way to do particle / water / fluid simulation in flash.  As most of you might know, flash really isn’t the most powerful program in the universe, and it is struggling with this code.  I’m sure there must be another way to go about it, so I’ll have to keep thinking.

Here is a quick 20 particle demo I’ve been playing with tonight.

Attraction Demo [ SWF ]

Attraction Demo 2 [ SWF ]

The Particles will move to avoid eachother, whilst at the same time – will attempt to ‘flock’ around the centre dominant particle.  It’s extremely basic, uses some simple collision detection, and as you can see – at 20 particles, runs okay.  Once I move it up to 50 though, things get a little bit silly…

I’m almost tempted to pop open Processing and attempt to make this first game in that.  With the speed of OpenGL I should be able to render plenty of particles with little – to – no slowdown ( hopefully ). . . Though I would lose my awesome vectorness.

It’s something to contemplate.

I also thought I’d post something I normally wouldn’t , a very rough work in progress sketch for my next entertainer.  Just so you know I havn’t forgotten them and there still are more on the way.

– aA


About aA

I'm a 28 year old Designer from Brisbane, Australia. I've got a keen interest in Motion Graphics, Illustration, and Game Design. View all posts by aA

3 responses to “Particle Attraction and Fluid Simulation

  • Justin Broglie

    Or tutorials you think I should watch

  • Justin Broglie

    Hi! These are really cool creations. I am looking to create a flash-based portfolio for my Information Design class. I am studying Digital Media Design at UPenn.

    I want to dynamically add a bunch of dots (which are movieclips, on rollover they would expand and show a speech bubble with a particular projects info), to an irregular shape. I want them to be attracted to that regular shape, but able to be dragged away. From any state, the dots should be able to tween back to this shape. The shape I wanted to use was the Penn Student Design logo (as this is for Penn Student Design):

    Any ideas/help you could give me would be extremely appreciated.


    • aA

      Hey Justin,

      So essentially you want a series of objects to be attracted to a particular location. If they’re dragged away, then they’ll want to float back to the original location again.

      There’s really two things to this :

      1) attraction
      2) repulsion

      Each object will be attracted towards the centre point, while at the same time being pushed away from the other objects.

      I’d probably start by getting the attraction working, and getting dragging and releasing working, so you can get objects that all want to move to a central location.

      Then after that, work on the repulusion, In which you’ll have to apply a repulision force to each object when it comes within a parcicular range of another object.

      It’s a bit hard to describe.

      You’ll need a good understanding of vector maths to get it all working, try this :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: