
I was flicking through Joa Eberts site the other day and came across a post he did, speed coding 2; the product of which was a load of 2D perlin noise particles that looked.. well great! Kindly Joa gave me permission to dissect, modify and port it to haxe. Ultimately though I ended up recoding it all from scratch, I did however borrow the nice color transform code from the original though, they're damn nice.
Typically you'd call BitmapData.perlinNoise() to generate a 2 color, 2 octave fractal perlin noise image - you then take the 0-255 color values for both of the channels, scale them and use them as your x & y coordinates.
I decided to twist it a bit and try 3D, so in the experiments I'm generating a 3 color, 4 octave fractal perlin noise image then using the scaling the values to provide x,y,z coordinates. Then mapping each particle into a 3d space, calculating it's color by merging values of particles which land on the same display pixel together.
Enough of the going on anyways, I'll post the full code for the examples once I've cleaned and commented it - all done in haXe of course.
First off, we have a 3D version of Joa's original; in this one the particles are all mapped into an imaginary cube and some nice effects added : 3D perlin noise particles tracing a cube.
Next up I thought I'd try some variations:
- Lazer tracing a cube (runs v fast)
- Perlin Noise, In a Box!
Quite impressed with the base performance here from haxe, I get 100fps on the lazer tracing example, and circa 45-50 fps on the versions with effects or more complex algo's.
liking perlin noise (and haXe).














Let's say PHP is a 7 for ease-of-learning. Where would you put haXe?
Oh, well I have a 3D version too. Never put it online though ;) Yours looks really fast, cool stuff!
depends how well you know other languages, if you know as3/javascript or java/c then a 3 to get going, after that it's just fun so doesn't count as hard
would like to see that - think it can still be speeded up a lot to be honest, need to clean the code out - still debating flash.Memory vs vectors - place for each me thinks.
ps: think i still prefer yours!