Two Sided 3D Plane in FP10
Two Sided 3D Plane in FP10
Creating Double Sided 3D DisplayObjects
Flash Player 10 is required to view the demo
Download the PaperSprite class for creating two sided DisplayObjects using the Flash Player 10 3D API (Updated 02.01.2009) // Read More
Perlin Noise Flow Field
Perlin Noise Flow Field
Flocking Behaviours using Perlin Noise
Download the source code of this demo…
It was a rainy Sunday and I found myself playing around with perlin noise for a couple of hours.
The idea was to create a simple flow field using the BitmapData perlinNoise method, and use this to influence the movement of autonomous agents. There is no complex vector math or steering behaviours, just some simple logic for how a particle or agent reacts to the current pixel it is positioned over. // Read More
Masking Transparent Bitmaps
Masking Transparent Bitmaps
Transparent Bitmaps & Gradient Alpha masks
Original image by Edwin Tofslie
I was having a few gradient alpha mask disabilities today and thought I should share my misery and consequential solution with anyone who might run into the same problems! // Read More
AS3 G94 Circular Menu
AS3 G94 Circular Menu
AS3 version of the Circular Group94 menu
Download the source code (Demo included)
I’ve received quite a few requests to update my circular group94 style menu to AS3 // Read More
BitmapData Colour Palette
BitmapData Colour Palette
Extracting the colour palette from an image
My previous post explained and provided a very simple method for extracting colours from a BitmapData image, by averaging the colours in specific areas.
This can have several applications, for example it features in a large amount of prototypes for the update to my Motion Tracking engine. However, if you want to create an accurate and representative colour palette from an image it has several flaws, the most obvious being that by averaging colours, you are actually removing or diluting the striking but perhaps less frequent colours in the image – the very colours which often make an image’s colour palette so exiting!
So, if we’re to extract an exciting and more representative palette from an image, we need a more intelligent algorithm; one which takes into account what makes a colour palette interesting – the contrasts and juxtapositions of colours within the image. // Read More
BitmapData Average Colours
BitmapData Average Colours
Finding the average colours in an image
If you want a very simple way of extracting a colour palette from an image, one technique would be to average the colour values within specific areas.
Averaging colour values is almost identical to averaging numbers, except with the added initial step of finding the red, green and blue components of the colour. To do this we can use bitwise operators, in this case bitwise shift, to perform fast operations on each bit inside the unsigned integer returned by getPixel or getPixel32. If you want to know more about bitwise operators, Moock has written a detailed and, as ever, very clear article on where, when and why to use bitewise operations. You can read it here.
So once you’re familiar with how to shift the bits of an integer, you can easily get the RGB values from a 24 bit hexadecimal by moving the bits to the right by a certain amount using the bitwise right shift operator (>>). // Read More
3D Ribbons in Papervision
3D Ribbons in Papervision
Ribbon3D class for 3d lines and ribbons in PV3D
There’s been some great experimentation with 3d lines and ribbons in Papervision3D, notably Felix Turner’s Ribbon3D and of course the Audi A5 website.
A project I’m currently working on requires the drawing of ribbons in 3D space, and it’s such a simple yet beautiful effect that I thought it was time to have a quick go at it myself. // Read More
AS3 webcam Motion Tracking
AS3 webcam Motion Tracking
Tracking an object’s movement
Update
Ok, you can now grab the MotionTracker source code (AS2 & AS3). Version 2 eventually will include the other methods for detecting and tracking motion which I mentioned. For now I have just included code for the technique used in the demo. // Read More
2D Cellular Automata
2D Cellular Automata
Actionscript 3 Game of Life
Inspired by Conway’s game of life (to which I was a late comer but now a devotee!), I decided to program a 2 dimensional Cellular Automaton in Actionscript 3.
I had been reading up on complexity theory for a recent project and the Cellular Automata just kept on rearing its head. Of course it displays the fundamental qualities of complexity; starting with an object following a set of simple rules and then creating multiple instances to form complex and unpredictable patterns. // Read More
Alphabet Particles AS3








