Sunday, 11 January 2009

Lotsa processing, not a lotta blogging

Showing my age by failing to share my life with the world.

Just gots to do more blogging about my Processing progress!

I finally shipped the ECA for TT282 on cut off date of December 23 and so started spending much more time with Greenberg & the Processing IDE. I start M362 in February, so I had better get on with it! Don't want conflicting loyalties in my life.

I asked for my chunk choice tonight and will see if I can get it.

Below is some code that plays with color value as described on Greenberg page 402:
The apparent brightness of the colored rectangles varies with the background, apparently in an inverse relation to the luminance being allowed through the mid range alpha values.

Lower luminance pastels on a visible dark background look "brighter" than higher luminance pastels on a light background.

Some voodoo going on here with matrix transforms and rotation too. More than I fully comprehend yet.

Processing makes it so easy to experiment with stuff and then reverse engineer why it displays "that way" later. Very enjoyable stuff.

/* Spiral pastel rects 03 Jan 2008 */

float theta = TWO_PI/30;
int x, y, bkg = 255, bkgstep = 64;

void setup(){

void draw(){
// fade background from light to dark
// clear screen and step each time spiral hits right window edge
if(x > width){

bkg = abs((bkg - bkgstep)%255);
// reverse bkg fader at limits
if ((bkg < 32)||(bkg > 224)) bkgstep = -bkgstep;
x = 0;
y = 0;
// change spiral direction
theta = -theta;


// random pastel shade r,g & b = (64-255) with varying alpha (64 - 96)
64+random(191), 64+random(191),
64+random(191), 64+random(32)
// rect specfied with x, y centres and height & width
// x & y creep out and then mod into 0 again
// rect side sizes are random between 50 - 100 (in steps of 10)
50+random(5)*10, 50+random(5)*10
// rotate with a creeping x & y rect offset = spiral

Sunday, 2 November 2008

Blogged on

I have ordered the Processing book and await the delivery. I have downloaded the Processing IDE tonight and will post again once I have messed with it some more. I have not decided which chunk to bid for: I want one that is a stretch for me, but that I can hopefully bring some value to.