perlin noise
Moving clouds
Submitted by bwy on Sun, 17.07.2011 - 19:23A 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
Submitted by bwy on Sun, 17.07.2011 - 13:02A rendering of Perlin noise clouds in Gnash 0.8.10dev. See also the SWF with source code, or a moving version.
Perlin clouds
Submitted by bwy on Sun, 17.07.2011 - 12:58A 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
Submitted by bwy on Sun, 17.07.2011 - 11:40Also 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
Submitted by bwy on Sun, 17.07.2011 - 11:34My 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
Submitted by bwy on Sun, 17.07.2011 - 11:30A 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!