Traingulo y circulo en movimiento trabajo N°6
De Casiopea
Título | triangulo y circulo en movimiento |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 6 |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Paulina Caballero |
Profesor | Herbert Spencer |
color c = color(0); float x = 0; float y = 100; float velocidad = 5;
void setup() {
size(700, 200);
}
void draw() {
background(255); move(); display();
}
void move() {
x = x + velocidad; if (x > 700) { x = 1; } if (y > 700) { y = 0; }
}
void display() {
fill(y); ellipse(x,100, 50, 80);
triangle(x,40,80,40,50,50);
}