This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

BlackholeGF
BlackholeGF presents ...

2009/12/20

Gas/Fluid and Vortex Simulator

This simlulation is designed to simulate whirlpools etc. but I discovered that it can also produce some awesome effects.

Particles will be spawned from the centre.

Use enter to toggle between vortex and random modes.

Up and down arrow keys change vortex speed.

Backspace removes spawner if you want to see the effect without particles being constantly added. Press it again to re-add it.

C removes all particles if it begins to lag.

The simulation can produce some great effects. Try having it at a relatively fast speed and setting back to a low one for a 3D-ish effect where particles form bands.

You may notice that the simulation can sometimes form very square formations, and at slowest speeds this is most noticeable. I did try to fix this, but it stopped the rest of the simulation from functioning correctly.

UPDATE:

I have now fixed the freezing particles, made the controller invisible and gave it a white background.

UPDATE 2:

Screen is now 2000*2000 so you can create larger vortexes.
As the screen is not square the particle spread is equal in height and width.
Now if you press backspace again the spawner will re-appear.

UPDATE 3:

Fixed the problem of strangeness at very high speeds and put a limit on how slow it can go and how fast.

4349 views / 756 in the last 7 days

Tags: simulation 3d fluid gas effects particle effect

Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sun Dec 20 15:41:43 UTC 2009
lirkilirki

2009/12/20

Pretty cool. Is there a particle grow limit because it looked as if it stopped after prob like 100-200.
spacebluespaceblue

2009/12/20

You can tell the greenfoot thing to hide itself by changing its image to new GreenfootImage(1, 1). That gives you a transparent 1 by 1 pixel image.
A new version of this scenario was uploaded on Sun Dec 20 19:13:12 UTC 2009
A new version of this scenario was uploaded on Sun Dec 20 19:48:14 UTC 2009
spacebluespaceblue

2009/12/20

Hey that thing is huge now.
A new version of this scenario was uploaded on Mon Dec 21 09:48:57 UTC 2009
A new version of this scenario was uploaded on Mon Dec 21 09:55:08 UTC 2009

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.