TPRobably
martes, 13 de diciembre de 2016
Pincel Rápido Diagonal
Pincel que dirige una línea rápida desde la esquina superior izquierda hasta la inferior derecha.
float w;
float h;
void setup(){
background(0);
noStroke();
size(600,600);
w = 0;
h = 0;
frameRate(20);
}
void draw(){
ellipse(w,h,20,20);
w = w + 5;
h = h + 5;
}
miércoles, 26 de octubre de 2016
Carrera
Carrera de líneas de colores, al usar random cada vez gana un color distinto:
float r;
float y;
float g;
float b;
float gl;
float c;
float ry;
float s;
float bl;
float w;
void setup(){
background(#222224);
noStroke();
size(550,550);
r = 0;
y = 0;
g = 0;
b= 0;
gl = 0;
c = 0;
ry =0;
s = 0;
bl = 0;
w = 0;
frameRate(20);
}
void draw(){
fill(255,0,0);
ellipse(r,50,20,20);
r = r + random(5);
fill(255,255,0);
ellipse(y,100,20,20);
y = y +random(5);
fill(0,255,0);
ellipse(g,150,20,20);
g = g + random(5);
fill(0,0,255);
ellipse(b,200,20,20);
b=b+random(5);
fill(#ADA400);
ellipse(gl,250,20,20);
gl = gl + random(5);
fill(#D2D1FA);
ellipse(c,300,20,20);
c = c + random(5);
fill(#FF5863);
ellipse (ry,350,20,20);
ry = ry + random(5);
fill (#472FE3);
ellipse (s,400,20,20);
s = s + random(5);
fill (0);
ellipse(bl,450,20,20);
bl = bl + random(5);
fill(255);
ellipse(w,500,20,20);
w = w + random(5);
}
martes, 25 de octubre de 2016
Segundero
Segundero a décimas:
float numero;
void setup(){
background(0);
size(200,200);
frameRate(100);
numero = 0;
}
void draw(){
if (mousePressed){
numero = numero + 0.01;
background(0);
textSize(20);
text(numero, width/2, height/2);
}}
Línea Diagonal Rápida
Línea diagonal rápida:
float w;
float h;
void setup(){
background(0);
noStroke();
size(600,600);
w = 0;
h = 0;
frameRate(20);
}
void draw(){
ellipse(w,h,20,20);
w = w + 5;
h = h + 5;
}
Pincel de Colores
Pincel de colores:
void setup(){
background(0);
noStroke();
size(600,600);
frameRate(1000);
}
void draw(){
if (mousePressed){
fill(mouseX,0,mouseY);
ellipse (mouseX,mouseY, 12,12);
}}
Línea Atada al Centro
Línea atada al centro:
void setup(){
size(600,600);
}
void draw(){
background(0,0,255);
stroke(255,255,255);
line(height/2,width/2, mouseX, mouseY);
}
Elipse Animada II
Elipse en crecimiento, cambia de posición según la posición del ratón:
int X = 0;
int Y = 100;
void setup() {
size(600, 600);
smooth();
}
void draw() {
background(0);
stroke(0);
fill(255,0,70);
ellipse(mouseX,mouseY,X,Y);
X = X + 1;
Y = Y +1;
}
Entradas antiguas
Inicio
Suscribirse a:
Comentarios (Atom)