jueves, 21 de diciembre de 2017
martes, 19 de diciembre de 2017
Circulo Colorines
void setup() {
background(255,255,255);
size(600,600);
}
void draw() {
fill(0);
stroke(random(0,255),random(255),random(255));
line(350,350,mouseX,mouseY);
}
background(255,255,255);
size(600,600);
}
void draw() {
fill(0);
stroke(random(0,255),random(255),random(255));
line(350,350,mouseX,mouseY);
}
Circulo Cambio Color
int x=50;
int y=50;
void setup(){
size(500,500);
}
void draw(){
background(250,0,200);
ellipse(x,y,50,50);
}
void keyPressed(){
if(key=='w' || key=='W'){
y--;
} else if(key=='s' || key=='S'){
y++;
} else if(key=='a' || key=='A'){
x--;
} else if(key=='d' || key=='D'){
x++;
}
}
void mousePressed(){
fill (0);
}
int y=50;
void setup(){
size(500,500);
}
void draw(){
background(250,0,200);
ellipse(x,y,50,50);
}
void keyPressed(){
if(key=='w' || key=='W'){
y--;
} else if(key=='s' || key=='S'){
y++;
} else if(key=='a' || key=='A'){
x--;
} else if(key=='d' || key=='D'){
x++;
}
}
void mousePressed(){
fill (0);
}
Cuadro Vueltas
float r = 0;
float backR;
float backG;
float backB;
void setup() {
size(400, 400);
backR = random(0,100);
backG = random(0,100);
backB = random(0,100);
background(random(0,255),random(255),random(255));
rectMode(CENTER);
noStroke();
smooth();
}
void draw() {
fill(backR, backG, backB, 50);
rect(width/2, height/2, width, height);
fill(255);
translate(mouseX, mouseY);
rotate(r);
rect(0, 0, 100, 100);
r = r + 1;
}
float backR;
float backG;
float backB;
void setup() {
size(400, 400);
backR = random(0,100);
backG = random(0,100);
backB = random(0,100);
background(random(0,255),random(255),random(255));
rectMode(CENTER);
noStroke();
smooth();
}
void draw() {
fill(backR, backG, backB, 50);
rect(width/2, height/2, width, height);
fill(255);
translate(mouseX, mouseY);
rotate(r);
rect(0, 0, 100, 100);
r = r + 1;
}
X
void setup() {
background(0,0,0);
size(600,600);
}
void draw() {
fill(0);
stroke(random(0,255),random(255),random(255));
line(0,600,mouseX,mouseY);
line(0,0,mouseX,mouseY);
line(600,0,mouseX,mouseY);
line(600,600,mouseX,mouseY);
}
background(0,0,0);
size(600,600);
}
void draw() {
fill(0);
stroke(random(0,255),random(255),random(255));
line(0,600,mouseX,mouseY);
line(0,0,mouseX,mouseY);
line(600,0,mouseX,mouseY);
line(600,600,mouseX,mouseY);
}
martes, 5 de diciembre de 2017
Procesing / Cuadrado con líneas
Cuadrado de Líneas
size(500,500);
background(50,50,50);
stroke(255,0,0);
line(100,10,10,10);
stroke(0,255,0);
line(10,10,10,100);
stroke(0,0,255);
line(10,100,100,100);
stroke(255,255,255);
line(100,100,100,10);
size(500,500);
background(50,50,50);
stroke(255,0,0);
line(100,10,10,10);
stroke(0,255,0);
line(10,10,10,100);
stroke(0,0,255);
line(10,100,100,100);
stroke(255,255,255);
line(100,100,100,10);
Suscribirse a:
Entradas (Atom)