Trama Andres Ardaya
De Casiopea
Título | Trama Andres Ardaya |
---|---|
Asignatura | Imagen Escrita 2017 |
Del Curso | Imagen Escrita 2017 |
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. |
Nº | 2 |
Alumno(s) | Andres Ardaya |
<processingjs> float inc; int sides = 2048;
void setup() {
size(400, 700); inc = 2 / float(sides);
}
void draw() {
float a = 2; float b = 2; background(#123460); translate(width/4, height/1);
beginShape();
for (float t = 0; t < TWO_PI; t += inc) {
a = mouseX/4; b= map(mouseY, mouseX, 300, 2, 3); //Cardioide: //r=2a(1+cos(t)) float r=2*a*(b+cos(t));
float x = cos(t) * r; float y = sin(t) * r;
vertex(x, y); } endShape(); println(a); println(b);
} </processingjs>
float inc; int sides = 2048; void setup() { size(400, 700); inc = 2 / float(sides); } void draw() { float a = 2; float b = 2; background(#123460); translate(width/4, height/1); beginShape(); for (float t = 0; t < TWO_PI; t += inc) { a = mouseX/4; b= map(mouseY, mouseX, 300, 2, 3); //Cardioide: //r=2a(1+cos(t)) float r=2*a*(b+cos(t)); float x = cos(t) * r; float y = sin(t) * r; vertex(x, y); } endShape(); println(a); println(b); }