////////////////////////////////////////////////////////////////////
/*linear landscape .2*/
////////////////////////////////////////////////////////////////////
/*linear landscape .2*/
////////////////////////////////////////////////////////////////////
import processing.pdf.*;
boolean paused = false;
boolean record = false;
boolean paused = false;
boolean record = false;
//movimiento en los bordes del sketch
float mov1, mov2,mov3;
float vel1 = 5;
float vel2 = 7 ;
float sentido = 1;
float sentido2 = 1;
// elipses
float posx1 = 200;
float posx2 = 600;
float posx3 = 400;
//noise
float x1,y1,varx1,vary1;
float ruidox1 = 0.005;
float ruidoy1 = 0.0003;
float x2,y2,varx2,vary2;
float ruidox2 = 0.005;
float ruidoy2 = 0.0007;
void setup() {
size(800,800);
beginRecord(PDF, "Capturas/" + "line"+ random(88) +".pdf");
background(#24242d);
smooth();
}
size(800,800);
beginRecord(PDF, "Capturas/" + "line"+ random(88) +".pdf");
background(#24242d);
smooth();
}
void draw() {
// elipses estaticas puntos de anclaje
fill(#FF0062);
noStroke();
//strokeWeight(1);
ellipse (x1,y1,2,2);
//ellipse (posx2, height/2,10,10);
// elipses estaticas puntos de anclaje
fill(#FF0062);
noStroke();
//strokeWeight(1);
ellipse (x1,y1,2,2);
//ellipse (posx2, height/2,10,10);
//1.Calcular la posición en x, y
//1.1 Variamos variación
varx1 += ruidox1;
vary1 += ruidoy1;
varx2 += ruidox2;
vary2 += ruidoy2;
//2.Calculamos posición
x1 = noise(varx1) * width;
y1 = noise(vary1) * height;
x2 = noise(varx2) * width;
y2 = noise(vary2) * height;
//1.1 Variamos variación
varx1 += ruidox1;
vary1 += ruidoy1;
varx2 += ruidox2;
vary2 += ruidoy2;
//2.Calculamos posición
x1 = noise(varx1) * width;
y1 = noise(vary1) * height;
x2 = noise(varx2) * width;
y2 = noise(vary2) * height;
//calculamos movimiento en ciclo
if (mov1 >= 800) {
mov1 = 800;
mov2 += vel1 * sentido;
}
if(mov2 >= 800){
sentido = -1;
}
if(mov1 < 0){
mov1 = 0;
mov2 += vel1 * sentido;
}
if (mov2 <= 0) {
mov2 = 0;
sentido = 1;
}
mov1 += vel1 * sentido;
mov3 += vel2 * sentido;
mov3 += vel2 * sentido;
//elipses de 0, width y de 0, height
noFill();
noStroke();
ellipse(mov2, mov1, 5, 5);
ellipse(mov1, mov2, 5, 5);
// elipses de width,0 y de height,0
ellipse(width, mov1, 5, 5);
ellipse(mov1, height, 5, 5);
noFill();
noStroke();
ellipse(mov2, mov1, 5, 5);
ellipse(mov1, mov2, 5, 5);
// elipses de width,0 y de height,0
ellipse(width, mov1, 5, 5);
ellipse(mov1, height, 5, 5);
// linea 1 borde superior // colores #FF0062, #5000FF, #0052FF, #00CEFF, #24242d
stroke(#FF0062,30);//magenta
strokeWeight(1);
line(posx3,y2, mov1, mov2);
//linea 2 borde izquierdo
stroke(#5000FF, 30);//morado
strokeWeight(1);
line(y1,height/2,mov2, mov1);
// linea 3 borde inferior
stroke(#0052FF, 30); // azul fuerte
strokeWeight(1);
line(posx3,y2, mov3, width);
//linea 4 borde derecho
stroke(#00CEFF, 30);
strokeWeight(1);
line(y2,height/2, height, mov3);
stroke(#FF0062,30);//magenta
strokeWeight(1);
line(posx3,y2, mov1, mov2);
//linea 2 borde izquierdo
stroke(#5000FF, 30);//morado
strokeWeight(1);
line(y1,height/2,mov2, mov1);
// linea 3 borde inferior
stroke(#0052FF, 30); // azul fuerte
strokeWeight(1);
line(posx3,y2, mov3, width);
//linea 4 borde derecho
stroke(#00CEFF, 30);
strokeWeight(1);
line(y2,height/2, height, mov3);
}