17 Aralık 2010 Cuma

Processing Ekranı Bölme

void setup()
{
size(500,500);
background(200,225,0,100);
noLoop();
}

void draw()
{
int yatayBol = 5;
int duseyBol;
duseyBol = 4;

float yatayUz;
float duseyUz;

yatayUz=width/yatayBol;
duseyUz=height/duseyBol;

for(int i=0 ; i<5 ; i=i + 1)
{
for(int j=0;j<4;j++)

{
rect(i*yatayUz,j*duseyUz,yatayUz,duseyUz);
}

}


}

Hiç yorum yok:

Yorum Gönder