Quantcast
Channel: FlexMonkey
Viewing all articles
Browse latest Browse all 257

Advection Swarm Chemistry with ActionScript Workers & Feathers UI

$
0
0

Here's an extension to my recent implementation of Hiroki Sayama's Swarm Chemistry: I've plugged in a fluid dynamics solver (a worker used in my Reaction Diffusion Advection experiment) so that particles (swarm members) radiate heat and add to the CFD density field which then feeds back velocities to the swarm chemistry model.

The swarm genomes now have two new properties:


  • Temperature defines how much heat individual swarm members radiate (in this CFD implementation, temperature and density are synonymous).
  • Advectability defines how much individual swarm members are affected by the CFD velocity field. At zero, the swarm members aren't affected at all and at negative values, members accelerate in the opposite direction to the CFD velocity.


There's (obviously) a lot more movement with the advection buffeting the particles around as you can see in these videos:






Again, I've used ActionScript Workers to run several tasks simultaneously: there's one to solve the swarm chemistry model, one to solve the fluid dynamics and another to render the image. At any one time all three are running while the UI remains completely responsive.

The new application lives here and the source code is available here.

As before - this application runs several orders of magnitude slower in the Flash Debug player compared to the regular player. I'm running it under the Chrome PPAPI 11.8 player and all the recipes run smoothly.

Viewing all articles
Browse latest Browse all 257

Trending Articles