Files
FreeJ/scripts/processing/basic/functions.pde
Jaromil ae7b1ad056 progresses on processing script
processing-js 0.4 has been merged in some relevant parts
basic and topic scripts added for test
color handling fixed, more scripts show up now
2010-02-12 18:36:54 +01:00

26 lines
434 B
Plaintext

void setup()
{
size(200, 200);
background(51);
noStroke();
smooth();
noLoop();
}
void draw()
{
draw_target(68, 34, 200, 10);
draw_target(152, 16, 100, 3);
draw_target(100, 144, 80, 5);
}
void draw_target(int xloc, int yloc, int size, int num)
{
float grayvalues = 255/num;
float steps = size/num;
for(int i=0; i<num; i++) {
fill(i*grayvalues);
ellipse(xloc, yloc, size-i*steps, size-i*steps);
}
}