mimarlıkta bilgisayar programlama
7 Ocak 2011 Cuma
Rastgele noktalar -hareketli
void setup()
{
size (400,400);
background(255);
//noLoop();
}
void draw()
{
int [][]renkler ;
renkler = new int[width][height] ;
for (int i=0 ; i {
for (int j=0 ; j {
renkler[i][j] = round (random(255));
}
}
for (int i=0 ; i {
for (int j=0 ; j {
stroke(255,renkler[i][j],renkler[i][j]);
point(i,j);
}
}
}
{
size (400,400);
background(255);
//noLoop();
}
void draw()
{
int [][]renkler ;
renkler = new int[width][height] ;
for (int i=0 ; i
for (int j=0 ; j
renkler[i][j] = round (random(255));
}
}
for (int i=0 ; i
for (int j=0 ; j
stroke(255,renkler[i][j],renkler[i][j]);
point(i,j);
}
}
}
array2
void setup()
{
size(400,400);
background(25,90,120);
//noLoop();
}
void draw()
{
int[][]renkler;
renkler= new int [width][height];
int noktaX= mouseX;
int noktaY= mouseY;
for (int i=0; i< width; i++)
{
for (int j=0; j< height; j++)
{
renkler[i][j] = round(dist(i,j,noktaX,noktaY))*255/100;
}
}
for(int i=0; i
point(j, i);
}
}
}
mouse odaklı nokta
void setup()
{
size (400,400);
background(0);
//noLoop();
}
void draw()
{
int [][]renkler ;
renkler = new int[width][height] ;
int noktaX = mouseX;
int noktaY = mouseY;
for (int i=0 ; i {
for(int j=0 ; j {
renkler[i][j] = round(dist (i,j,noktaX,noktaY)) * 255 /500;
}
}
for (int i=0 ; i {
for(int j=0 ; j {
stroke(renkler [j][i]);
point(j, i);
}
}
}
{
size (400,400);
background(0);
//noLoop();
}
void draw()
{
int [][]renkler ;
renkler = new int[width][height] ;
int noktaX = mouseX;
int noktaY = mouseY;
for (int i=0 ; i
for(int j=0 ; j
renkler[i][j] = round(dist (i,j,noktaX,noktaY)) * 255 /500;
}
}
for (int i=0 ; i
for(int j=0 ; j
stroke(renkler [j][i]);
point(j, i);
}
}
}
processing, x ve y ye bağlı ekran bölme
void setup()
{
size(400,400);
background(0);
//noLoop();
}
void draw()
{
int X,Y;
X=mouseX/5;
Y=mouseY/5;
for(int i=0 ;i {
for(int j=0 ;j {
fill(abs(round(X/2)-i)*10+ abs (round(Y/2)-j)*10);
stroke(abs(round(X/2)-i)*10+ abs (round(Y/2)-j)*10);
rect(width/X *i , height/Y*j,width/X,height/Y);
}
}
}
{
size(400,400);
background(0);
//noLoop();
}
void draw()
{
int X,Y;
X=mouseX/5;
Y=mouseY/5;
for(int i=0 ;i
for(int j=0 ;j
fill(abs(round(X/2)-i)*10+ abs (round(Y/2)-j)*10);
stroke(abs(round(X/2)-i)*10+ abs (round(Y/2)-j)*10);
rect(width/X *i , height/Y*j,width/X,height/Y);
}
}
}
gradient
void setup()
{
size(500,500);
background(0);
noLoop();
}
void draw()
{
int Xbol = 50;
int Ybol = 50;
for (int i=0; i
{
ctrl =255;
}
fill(ctrl);
stroke(ctrl);
rect(width/Xbol * i, height/Ybol*j , width/Xbol, height/Ybol);
}
}
}
Kaydol:
Kayıtlar (Atom)