Radial Perlin Noise
29th October 2007
I have been messing around with perlin noise, creating a radial effect for a game I’m working on. The result is a RadialPerlin class for creating radial perlin noise bitmaps like this.
Flash required: You need version 9 or later of the free Flash player from Adobe to use this content. To download and install the free player from Adobe's web site click here.
The code is in a single class called RadialPerlin, used like this
var perlin:RadialPerlin = new RadialPerlin( 100, 3,
Math.random() * 100000, false, 15, false, true );
perlin.draw( 0, 0 );
var bmp:Bitmap = new Bitmap( perlin.bitmapData );
addChild( bmp );
Download the RadialPerlin class and demo.
The RadialPerlin object is initialised with some values (details of the parameters are in the class file) then drawn into a BitmapData object using its draw method. The draw method takes a couple of offset parameters – one for the distance from the centre and the other for the rotation. You can then grab the BitmapData object from the RadialPerlin object via its bitmapData property and do what you like with it.
The code is licenced under the MIT license. Have fun, and if you make something interesting with it let me know.
Tags: Actionscript, Free code, Perlin noise

3 Comments add your own
Combine that with DisplacementMapFilter and you might have the perfect water ripple effect.
Doug McCune | 29th October 2007 at 17:00
Great effect. Word of caution though: it is killing FireFox’s performance. Watching video and or scrolling on other tabs that I have open is very jerky. When I close this tab everything runs smooth.
polyGeek | 31st October 2007 at 11:51
works fine in Safari
rdas7 | 30th January 2008 at 12:30
Leave a Comment comment policy
XHTML: you can use these tags - <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>Subscribe to the comments via RSS Feed