perlin noise

warning: Creating default object from empty value in /mnt/web005/a1/00/51694400/htdocs/bwy/public_html/sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.pages.inc on line 34.

Moving clouds

A moving version of the Perlin noise clouds. Noise generation is pretty hard on the processor, though Gnash needs only about half as much CPU as the Adobe Flash player for the same result.

Perlin clouds in Gnash

Perlin clouds in Gnash

A rendering of Perlin noise clouds in Gnash 0.8.10dev. See also the SWF with source code, or a moving version.

Perlin clouds

A SWF created using only the following ActionScript (ming dialect). The moon could do with a bit of noise too! A screenshot is also available.

BitmapData = flash.display.BitmapData;

MovieClip.prototype.drawCircle = function(r, x, y) {

   this.moveTo(x + r, y);

   var segments = 8;
   var radians = Math.PI * 2 / segments;

   var a = Math.tan(Math.PI / segments); 

   for (var i = 0; i < segments; ++i) {
      var k = i + 1;
      var endx = r * Math.cos(k * radians);

Perlin noise

Also see a screenshot from Gnash. The ActionScript (ming dialect) code is as follows:

BitmapData = flash.display.BitmapData;

var width = 4;
var x = 0;
var y = 0;

getClip = function(trans) {
    var c = _root.createEmptyMovieClip("mc" + (y * width + x),
        getNextHighestDepth());
    c._x = x * 100;
    c._y = y * 100;
    var bd = new BitmapData(100, 100, trans);
    c.attachBitmap(bd, 1);
    if (++x > width) { x = 0; ++y; };
    return bd;
};

var seed = 142;

getClip(true).perlinNoise(100, 100, 1, seed, false, false);

Weekend adventures in noise

Perlin noise in Gnash

My graphic design skills are poor, a fact all the more frustrating because I have a good enough eye to recognize when something looks bad, but not the aptitude to improve it.

Unlike less restrained people, I haven't inflicted the unreadable crimes of Word Art on my fellow humans since I was a teenager (though as previous work on implementing gradients for the MovieClip drawing API shows, when you have an excuse, playing with garish gradients is still fun!). But along with other design-incompetents, I'm fascinated by adventurous graphics and patterns.

Perlin noise in Gnash

Perlin noise in Gnash

A screenshot of Gnash 0.8.10dev demonstrating the BitmapData.perlinNoise() function, new in the development sources. See the SWF in action. If you have Gnash and can't see it, you need a newer version!

Syndicate content