Monday, May 15, 2006

A pleasent wee bit o code. To change the grid size easily.


int gridsize=15; ///////////////////change this number to change the grid size

float stage= 625.0;
float gridadd=stage/gridsize;
float currenty = 0.0;
float currentx =0.0;

size(int(stage),int(stage));
background(255);
stroke(0);

for(int i=0;i<=gridsize;i++){
currentx=currentx+gridadd;
line(0,currentx,stage,currentx);
}

for(int i=0;i<=gridsize;i++){
currenty=currenty+gridadd;
line(currenty,0,currenty,stage);
}


flickr pic has a pic of how the grid was used... its going to make a physical thing move... arduino is now ordered

0 Comments:

Post a Comment

<< Home