Tarea 9 Catalina Fairlie

De Casiopea


TítuloTarea 9 Catalina Fairlie
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 9
AsignaturaImagen Escrita 2012,
Del Curso1º Diseño 2012, Imagen Escrita 2012,
CarrerasDiseñ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
ProfesorHerbert 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);

}