Mostrando entradas con la etiqueta codigo. Mostrar todas las entradas
Mostrando entradas con la etiqueta codigo. Mostrar todas las entradas

viernes, 3 de febrero de 2012

sketch 01





int i,j;
void setup() {
  size(800,600,P3D);
  background(255);
}
void draw() {
  stroke(100,0,0);
  strokeWeight(1);
  smooth();
  fill(255);
  i=mouseX-25;
  j=mouseY-25;
  triangle(i,(random(300)),(random(480)),j,i,350);
  delay(100);
}
  







  




sketch 02




void setup() {
  size(500,550);
  background(30,(random(140)),90);
  rectMode(CENTER);
  rect((random(600)),(random(220)),80,50);//random
  }

void draw() {
  stroke(20,(random(120)),120,70);//color del borde
  strokeWeight(8);//ancho del borde
  smooth();
  fill((random(200)),70,200,90);//color del fondo
  rectMode(CENTER);
  rect(mouseX,mouseY,80,50);//random
  fill((random(300)),(random(190)),18,90);//el ultimo numero hace trasparencia
  ellipse((random(900)),(random(320)),50,50);
  delay(300);
}

sketch 03


int i,j;
void setup() {
  size(800,600,P3D);
  background((random(50)),(random(50)),50);
}
void draw() {
  stroke(0);
  strokeWeight(2);
  smooth();
  fill(255);
  stroke((random(100)),(random(200)),0);
  strokeWeight(random(2));
  smooth();
  fill((random(200)),(random(200)),200,200);
  i=mouseX-100;
  j=mouseY-50;
  triangle((random(i)),(random(-PI)),(random(PI)),(random(j)),(random(i)),(random(PI)));
  delay(10);
 spotLight(255, 255, 109, // Color
0, (random(40)), 200, // Position
0, -0.5, -0.5, // Direction
  PI/2, 2); // Angle, concentration
rotateY(map((random(150)), 0, width, 0, PI));
rotateX(map((random(150)), 0, height, 0, PI));
smooth();
}

sketch 04


int x,x2,x3,x4,x5,x6;

void setup() {
  size(800,800);
  background(0);
}

void draw() {
  background(255);
  delay(350);
  x=mouseX;
  x2=x*2;
  x3=x*3;
  x4=x*4;
  x5=x*5;
  x6=x*6;
  stroke((random(250)),(random(250)),80,100);
  strokeWeight(random(30));
  smooth();
  line(x,0,x,200);
  line(x2,0,x2,800);
  line(x3,0,x3,600);
  line(x4,0,x4,800);
  line(x5,0,x5,400);
  line(x6,0,x6,800);
  line(0,x,200,x);
  line(0,x2,800,x2);
  line(x3,(random(400)),x3,600);
  line((random(x4)),0,(random(x4)),800);
  line(x5,0,x5,400);
  line(x6,0,x6,800);
}