Pakistan Transcended into Digital Code

by admin on April 9, 2008

TAKE 1: Particles (Actionscript)

I have seen many particle experiments out there nowadays. Some of the code that captures the essence of particle emulation and recursion is quite simple to concoct and implement. I love particle coding and was looking to get my hands dirty in the Flash IDE. Recently i found a simple class authored by SebDeelisle. All of us coders out there know the meaning of simplicity especially in code. Yeah keep it simple you all then build from there. Here is an example of some stars crescent shaoes floating around looking for their maker – Ha!
 

[kml_flashembed movie="/experiments/Step 7.swf" height="300" width="550" /]

TAKE 2: Pointillism (Processing)

crickfan.jpg

A basic image of some cricket fans with the ever so familiar crescent masks!

crick_process.jpg

The same cricket fans redone in processing with the code for pointillism attached. Not the best rendering but at this moment I’ll gladly take it.
/*
* Pointillism
* by Ahad Bokhari
*
* Mouse horizontal location controls size of dots.
* Creates a simple pointillist effect using ellipses colored
* according to pixels in an image.
*
* Created 5th April, 2008
*/

PImage a;

void setup()
{
a = loadImage(”crick.jpg”);
size(415,318);
noStroke();
background(255);
smooth();
}

void draw()
{
float pointillize = map(mouseX, 0, width, 2, 18);
int x = int(random(a.width));
int y = int(random(a.height));
color pix = a.get(x, y);
fill(pix, 126);
ellipse(x, y, pointillize, pointillize);
}

Leave a Comment