Two Sided 3D Plane in FP10

Actionscript 3.0 | 30 Dec 2008 | 7 comments

Actionscript 3.0 | 30 Dec 2008 | 7 comments

Two Sided 3D Plane in FP10

Creating Double Sided 3D DisplayObjects

Two Sided 3D Plane in FP10

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

Actionscript 3.0 | 14 Dec 2008 | 13 comments

Actionscript 3.0 | 14 Dec 2008 | 13 comments

Perlin Noise Flow Field

Flocking Behaviours using Perlin Noise

Perlin Noise Flow Field

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

flash | 10 Dec 2008 | 5 comments

flash | 10 Dec 2008 | 5 comments

Masking Transparent Bitmaps

Transparent Bitmaps & Gradient Alpha masks

Masking Transparent Bitmaps

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

Actionscript 3.0 | 06 Nov 2008 | 14 comments

Actionscript 3.0 | Interfaces | 06 Nov 2008 | 14 comments

AS3 G94 Circular Menu

AS3 version of the Circular Group94 menu

AS3 G94 Circular 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

Actionscript 3.0 | 11 Oct 2008 | 11 comments

Actionscript 3.0 | 11 Oct 2008 | 11 comments

BitmapData Colour Palette

Extracting the colour palette from an image

BitmapData Colour Palette

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

Actionscript 3.0 | 10 Oct 2008 | 9 comments

Actionscript 3.0 | 10 Oct 2008 | 9 comments

BitmapData Average Colours

Finding the average colours in an image

BitmapData Average Colours

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

Papervision3D | 12 Aug 2008 | 26 comments

Papervision3D | 12 Aug 2008 | 26 comments

3D Ribbons in Papervision

Ribbon3D class for 3d lines and ribbons in PV3D

3D Ribbons in Papervision

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

Actionscript 3.0 | 06 Jun 2008 | 95 comments

Actionscript 3.0 | 06 Jun 2008 | 95 comments

AS3 webcam Motion Tracking

Tracking an object’s movement

AS3 webcam Motion Tracking

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

Actionscript 3.0 | 06 May 2008 | 8 comments

Actionscript 3.0 | 06 May 2008 | 8 comments

2D Cellular Automata

Actionscript 3 Game of Life

2D Cellular Automata

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

Actionscript 3.0 | 29 Apr 2008 | 8 comments

Actionscript 3.0 | 29 Apr 2008 | 8 comments

Alphabet Particles AS3

Psychedelic Sesame Street

Alphabet Particles AS3

Download Source Code (AS3)

Ok, so there’s not much to say here! // Read More