float r=0;
float backR;
float backG;
float backB;
void setup(){
size(400,400);
backG=random(0,150);
backR=random(0,150);
backB=random(0,150);
background(0,random(0,255),random(0,255));
rectMode(CENTER);
noStroke();
smooth();
}
void draw(){
fill(backG,backR,backB,50);
rect(width/2,height/2,width,height);
fill(255);
translate(mouseX,mouseY);
rotate(r);
rect(0,0,100,100);
r=r+0.05;
}
viernes, 15 de diciembre de 2017
jueves, 7 de diciembre de 2017
Processing 1 (Epilepsia)
void setup(){
size(100,100);
}
void draw(){
background(random(0,255));
stroke(random(0,255),random(0,255),random(0,255));
line(0,100,mouseX,mouseY);
line(100,0,mouseX,mouseY);
line(100,100,mouseX,mouseY);
line(0,0,mouseX,mouseY);
line(50,50,mouseX,mouseY);
fill(random(0,255),random(0,255),random(0,255));
stroke(random(0,255),random(0,255),random(0,255));
ellipse(50,50,mouseX,mouseY);
}
size(100,100);
}
void draw(){
background(random(0,255));
stroke(random(0,255),random(0,255),random(0,255));
line(0,100,mouseX,mouseY);
line(100,0,mouseX,mouseY);
line(100,100,mouseX,mouseY);
line(0,0,mouseX,mouseY);
line(50,50,mouseX,mouseY);
fill(random(0,255),random(0,255),random(0,255));
stroke(random(0,255),random(0,255),random(0,255));
ellipse(50,50,mouseX,mouseY);
}
martes, 5 de diciembre de 2017
Processing
Ejercicio 4:
void setup(){
size(200,200);
background(50000000);
stroke(0,0,235);
}
void draw(){
line(0,0,50,0);
line(0,0,0,50);
line(50,50,0,50);
line(0,50,0,50);
line(50,0,50,50);
}
Ejercicio 5:
size(150,100);
quad(61,60,94,60,99,83,81,90);
rect(10,10,60,60);
triangle(12,50,120,15,125,60);
Ejercicio 6:
size(150,100);
fill(2550,0);
stroke(0,0,255);
quad(61,60,94,60,99,83,81,90);
rect(10,10,60,60);
triangle(12,50,120,15,125,60);
Ejercicio 7:
a)
ellipse(60,60,55,55);
rect(15,15,50,50);
b)
rect(15,15,50,50);
ellipse(60,60,55,55);
Ejercicio 8:
int valor1=0;
int valor2=100;
line(valor1,valor1,valor2,valor2);
line(valor1,valor2,valor2,valor1);
void setup(){
size(200,200);
background(50000000);
stroke(0,0,235);
}
void draw(){
line(0,0,50,0);
line(0,0,0,50);
line(50,50,0,50);
line(0,50,0,50);
line(50,0,50,50);
}
Ejercicio 5:
size(150,100);
quad(61,60,94,60,99,83,81,90);
rect(10,10,60,60);
triangle(12,50,120,15,125,60);
Ejercicio 6:
size(150,100);
fill(2550,0);
stroke(0,0,255);
quad(61,60,94,60,99,83,81,90);
rect(10,10,60,60);
triangle(12,50,120,15,125,60);
Ejercicio 7:
a)
ellipse(60,60,55,55);
rect(15,15,50,50);
b)
rect(15,15,50,50);
ellipse(60,60,55,55);
Ejercicio 8:
int valor1=0;
int valor2=100;
line(valor1,valor1,valor2,valor2);
line(valor1,valor2,valor2,valor1);
Suscribirse a:
Entradas (Atom)