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 : BitmapData Average Colours »

Posted on 10 Oct 2008
17 Comments
8 Trackbacks

Bandcamp Music Visualisations

One of the most interesting projects I have worked on recently has just been launched!

It’s called Bandcamp, and is the brain child of Ethan Diamond and Shawn Grunberger, both from Oddpost (which you’ll know these days as Yahoo! Mail).

In short, Bandcamp is a “free hosted publishing platform for musicians”, although there is much more to it than that, including… Read : Bandcamp Music Visualisations »

Posted on 18 Sep 2008
10 Comments
0 Trackbacks

Papervision Ribbon3D

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 : 3D Ribbons in Papervision »

Posted on 12 Aug 2008
43 Comments
13 Trackbacks

AS3 Motion Tracking and Detection

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.

Download: AS3 Webcam Motion Tracking
Read : AS3 Webcam Motion Tracking »

Posted on 06 Jun 2008
187 Comments
23 Trackbacks

2D Cellular Automata

Inspired by Conway’s game of life, 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 : 2D Cellular Automata »

Posted on 06 May 2008
12 Comments
4 Trackbacks

About me

Soulwire is a weblog by Justin Windle; a Creative Technologist at Lean Mean Fighting Machine, London – I often Tweet, Flik, Link and Vim.

Twitter <follow>

September 7th 2010 - 8:39am

RT @likewings: Epic google today