Tarea 9 Catalina Fairlie
De Casiopea
Título | Tarea 9 Catalina Fairlie |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 9 |
Asignatura | Imagen Escrita 2012, |
Del Curso | 1º Diseño 2012, Imagen Escrita 2012, |
Carreras | 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) | Catalina Fairlie |
Profesor | Herbert Spencer |
float x, y; float velx, vely; float acel;
void setup() {
size(500, 500); x = width/1; y = height/1; velx = random(-1, 1); vely = random(-10, 1); acel = .5;
}
void keyPressed() {
x = width/3; y = height/3; velx = random(-6, 5); vely = random(-5, 5);
}
void draw() {
x += velx; y += vely; if (mousePressed) { float acelx, acely; float dirAcel = atan2(mouseY-y, mouseX-x); velx += acel*cos(dirAcel); vely += acel*sin(dirAcel); } ellipse(x, y, 50, 50);
}