HOME | DD

wonderwhy-ER β€” Flow 1.1 by-nc-nd

Published: 2009-11-28 18:05:13 +0000 UTC; Views: 28632; Favourites: 228; Downloads: 285
Redirect to original
Description Original work and code
So I stumbled on this some work at wonderfl.net some time ago and wanted to play with the code. Seems it is a ported to AS3 from Processing experiments. Works pretty fast but it does not behave as good as I would like...

Changes I made to the code
Here first version. Did not do much. Made it bigger, added my FPS counter, changed drawing methods, made some optimizations and made it show 20K of particles instead of 6kin original, made it repeating (left side connected to right, top to bottom, particles reappear on other side of the screen when they leave it). Also added "time to live" to particles so that when it expires they reappear in other random place. This way no space is left without particles for long (something I did not like in original version).

Planing to play with it more adding some effects, colors, objects you can drag to stage (particle emitters, walls, constant pressure or speed fields) etc etc. Will see how it goes

Controls
Just click and drag to create wind.
Double click to restart.

Update 1.1
Added colors and blur effect, become little bit more heavy on CPU. Fixed little bug with particles kind of teleporting when crossing screen border at high speed.
Related content
Comments: 122

SonicTheHedgeTrimmer [2016-01-25 02:24:12 +0000 UTC]

Like stirring the creamer in your coffeeΒ 

πŸ‘: 0 ⏩: 0

sodemo [2013-10-31 02:45:57 +0000 UTC]

and whats really col is if you just go crazy all over it until you almost cant see anything and watch the whole thing come in its so cool

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to sodemo [2013-10-31 07:46:05 +0000 UTC]

Yeah, its kinda cool

πŸ‘: 0 ⏩: 0

WanderingWolverine [2012-03-28 03:47:21 +0000 UTC]

I has made something with this!

Look look! [link]

Isnt it pwetty

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to WanderingWolverine [2012-03-30 09:08:45 +0000 UTC]

Hehe

πŸ‘: 0 ⏩: 1

WanderingWolverine In reply to wonderwhy-ER [2012-03-30 09:19:14 +0000 UTC]

^-^

πŸ‘: 0 ⏩: 0

Frost-Paw123 [2012-03-25 13:47:10 +0000 UTC]

preeetty!

πŸ‘: 0 ⏩: 0

move-me-more [2012-02-27 23:05:41 +0000 UTC]

after so many years, i still LOVE your work. inspiration is timeless.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to move-me-more [2012-02-27 23:41:49 +0000 UTC]

Hah, thanks

πŸ‘: 0 ⏩: 0

FantasyLover321 [2011-04-26 03:34:56 +0000 UTC]

Really cool!

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to FantasyLover321 [2011-04-26 05:55:03 +0000 UTC]

Thanks

πŸ‘: 0 ⏩: 0

sh0g0 [2010-11-23 20:43:09 +0000 UTC]

...

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to sh0g0 [2010-11-23 20:47:28 +0000 UTC]

πŸ‘: 0 ⏩: 1

sh0g0 In reply to wonderwhy-ER [2010-11-23 20:52:07 +0000 UTC]

das soooooo cooooool

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to sh0g0 [2010-11-23 21:33:36 +0000 UTC]

Haha I am "playing" with this right now [link]
I guess you would like it too

πŸ‘: 0 ⏩: 0

REzao [2010-06-22 17:20:50 +0000 UTC]

nossa q legal eem cara

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to REzao [2010-06-22 19:42:48 +0000 UTC]

Ehmm sorry I don't understand

πŸ‘: 0 ⏩: 1

nebutrash In reply to wonderwhy-ER [2018-02-14 03:59:34 +0000 UTC]

He said "wow, really cool, dude!" Β 

πŸ‘: 0 ⏩: 0

lightbird [2010-06-19 22:02:12 +0000 UTC]

Actually, if you drag it from bottom to top, it looks like a sped-up nuclear bomb explosion

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to lightbird [2010-06-20 08:03:40 +0000 UTC]

Hehe yeah it is

πŸ‘: 0 ⏩: 0

ginkner [2010-05-26 07:00:33 +0000 UTC]

I am soooo gonna try this shit.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to ginkner [2010-05-26 07:32:11 +0000 UTC]

Yeah its pretty cool But some ideas behind it are more important as they allow to do a range of other effects beside flow.

πŸ‘: 0 ⏩: 1

ginkner In reply to wonderwhy-ER [2010-05-26 14:27:47 +0000 UTC]

I know. The whole force map concept is extraordinarily powerful. currently I'm using parametric equations to generate a force based on position, but it's rather unwieldy.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to ginkner [2010-05-26 18:14:29 +0000 UTC]

Yeah... Basically that's all there is in particle physics, particles and force fields You can do a lot combining those two Magnetism comes to mind too

πŸ‘: 0 ⏩: 0

kichakicha [2010-03-31 13:57:16 +0000 UTC]

Damn This Is Cool

πŸ‘: 0 ⏩: 0

Mobilelectro [2010-01-02 05:15:19 +0000 UTC]

That is really cool, if the Painter Program had a brush tool like that which could be frozen just when it looked right.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to Mobilelectro [2010-01-02 09:43:51 +0000 UTC]

Yeah some procedural and/or physical brushes that are interactive could make painting both more fun and more productive. But it will also lengthen learning time a lot...

πŸ‘: 0 ⏩: 0

9tailsdemonfox [2009-12-27 12:08:18 +0000 UTC]

cool thing. does it generate something like a "wind map" or do the particles ask each other for collision or something like that?

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to 9tailsdemonfox [2009-12-27 20:32:34 +0000 UTC]

Yeah wind/pressure map with which particles interact. No direct interaction.

πŸ‘: 0 ⏩: 0

Schweinskopfsuelze [2009-12-21 22:23:02 +0000 UTC]

wow, I didn't think flash can handle things like that, always surprising

I never tried anything particle related myself though.
Love it.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to Schweinskopfsuelze [2009-12-22 07:19:02 +0000 UTC]

Well it is a very simple version. It's just a speed field... No real flow and inertia But as a result it is fast and already can be useful

πŸ‘: 0 ⏩: 0

javamocha [2009-12-13 20:16:41 +0000 UTC]

more fluid dynamics

very cool

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to javamocha [2009-12-13 21:37:15 +0000 UTC]

πŸ‘: 0 ⏩: 0

eliskan [2009-12-06 02:11:59 +0000 UTC]

Is there any way to make the spawning particles maintain the speed of the particles around them? I think they're kinda slowing down the other particles as they appear

This is awesome though, you never cease to amaze me

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to eliskan [2009-12-06 10:40:13 +0000 UTC]

Mmm no they are not slowing neighbors. They actually do not interact at all. They are just effected by speed field. Tough their speeds are reset when they reappear.

πŸ‘: 0 ⏩: 1

eliskan In reply to wonderwhy-ER [2009-12-06 21:47:32 +0000 UTC]

Right so they do interact with eachother through the speed field, correct? So when the new particles spawn with 0 speed, wouldn't that cause particles around them to slow down too?

Maybe I don't understand the math behind this haha I love it though Very cool

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to eliskan [2009-12-06 21:55:17 +0000 UTC]

No particles do not effect speed field back Speed field effects particles but particles do not effect speed field. So particles do not interact at all. May be you just get and illusion of them slowing neighbors for whatever the reason...

Hmm tough may be I understand what you mean... You mean that it slows down eventually?

πŸ‘: 0 ⏩: 1

eliskan In reply to wonderwhy-ER [2009-12-07 02:47:38 +0000 UTC]

Yeah it looked like the speed field was slowing down because of spawned particles but it sounds like it just looked like that because of automatic friction..

Maybe add a parameter on here to adjust the speed field dampening, just for fun? I think it's fun to see perpetually moving flows as well (for example you click and drag once and then sit back and watch it for the next ten minutes)

lol yes it just appears to be caused by the other particles but now I think I see what you mean, it's just an illusion lol

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to eliskan [2009-12-07 07:36:17 +0000 UTC]

I was not even seeing that because I know a reason it slows down... Unfortunately what you described is not possible in almost all fluids... Here I mean that they constantly exchange with energy and seek equilibrium so any oscillations may be slowly but dissipate trough whole fluid.

Actually my first tough was to make it dissipates slower if possible but first tries failed. Model is very simple and there isn't much to change there... May be later will take a look again at what I can change...

πŸ‘: 0 ⏩: 0

frateroshi [2009-12-04 14:11:39 +0000 UTC]

works pretty damn well! i'm viweing on my laptop, which has a pretty bad GPU, and it looks great. you sir, are a flash wizard!

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to frateroshi [2009-12-05 00:22:16 +0000 UTC]

GPU has nothing to do with flash at the moment. Or almost nothing.

πŸ‘: 0 ⏩: 1

frateroshi In reply to wonderwhy-ER [2009-12-07 17:38:04 +0000 UTC]

hmm; what makes flash programs run faster/slower on different machines? is it CPU or RAM limitations?

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to frateroshi [2009-12-07 17:40:57 +0000 UTC]

Hmm actually there are other problems too. For example in IE flash runs slower for no reason... As for CPU/RAM I think both have impact but CPU is more important I think...
You have some problems? I run in on kind of old notebook(3 years old) and it runs fine here.

πŸ‘: 0 ⏩: 1

frateroshi In reply to wonderwhy-ER [2009-12-07 17:51:21 +0000 UTC]

ok thanks! i haven't had any problems with your stuff. you are very conscious of reasource efficiency, but i'm not so good at that! i have problems with stuff i make running badly of my friends' computers. right now, a game project i am working on is in danger of being scrapped for being too reasource heavy.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to frateroshi [2009-12-07 18:22:24 +0000 UTC]

Ouh Well for now I sit at kind of old notebook so I have kind of a tool to see how bad is it... Probably will need to to do some comparisons between computers when I will be switching to see how well should it run for not ruining people with older computers experience... I mean like 60FPS for me means 30FPS for them so I need to aim for 60 even tough I am aiming for 30

πŸ‘: 0 ⏩: 0

Monation [2009-12-03 20:58:04 +0000 UTC]

Holy moly man, this is incredible. I wish I could have this on a touchscreen hanging on the wall, like an interactive piece of art.

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to Monation [2009-12-03 21:02:27 +0000 UTC]

Hehe may be some day you will
Lol like ordering it as a "print"

πŸ‘: 0 ⏩: 0

YoungLink19 [2009-12-03 07:10:58 +0000 UTC]

So it has colour now and the particles and HUD has filters (glow and... blur?) on it. Nice

Do you specialize in AS3, or do you specialize in ECMAScript in general, or do you do in-general multimedia programming?

πŸ‘: 0 ⏩: 1

wonderwhy-ER In reply to YoungLink19 [2009-12-03 07:17:45 +0000 UTC]

Mmm. Well I do know other languages like Java/C# etc but for last 4 years I mostly work with AS3. Thinking on starting learning Unity 3D tough.

πŸ‘: 0 ⏩: 0

anagodaps [2009-12-02 21:56:33 +0000 UTC]

wo vellos őitas tev tieőām ir sanācis

πŸ‘: 0 ⏩: 1


| Next =>