Sebastián Aguilera tarea 6
De Casiopea
Título | Sebastián Aguilera tarea 6 |
---|---|
Palabras Clave | tarea 6 |
Asignatura | Taller Inicial Común 1ª y 2ª Etapa, |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura, Diseño Gráfico"Diseño Gráfico" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property. |
Alumno(s) | Sebastián Aguilera |
Profesor | Herbert Spencer |
// Tomado en base a tarea de Gabriela torres
Car myCar;
void setup() {
size(700, 700); colorMode (HSB);
myCar = new Car();
}
void draw() {
background(0);
myCar.move(); myCar.display();
if (key == 's') { saveFrame("######.jpg"); }
}
class Car {
color c; float xpos; float ypos; float xspeed;
Car() { xpos = width/7; ypos = height/6; xspeed = 5; }
void display() { float c; //agregamos la psicodelia c = random(9,1000); // c se define en un número aleatorio entre 0 y 359 rectMode(ROUND); noStroke (); fill (c, 60, 480); // usamos c para el relleno del objeto ellipse(mouseX, xpos, mouseY, xpos); //definimos el objeto como un elipse }
void move() { xpos = xpos + xspeed; if (xpos > height) { xpos = 4; } }
}