> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://kollafoss.sketchpad.cc/sp/pad/view/ro.6VLvX6fQ3Fe/rev.226
 * 
 * authors: 
 *   Sigurbjörg Emily Sigurðardóttir

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



//Takes time to look right




float a = 0;
float b = 0;
float c = 0;
float co = 0;

void setup() {
  background(0);
  colorMode(HSB,50 ,50 ,50);
  size(500, 500);
  smooth(1000);
  strokeWeight(1);
  frameRate(10000);
  noFill();
  rectMode(CENTER);
}

float margin;

void draw() {
  
  stroke(30, co, 30, 5);

  margin = map (sin(c),-1,1,20, 100);
  
  float x0 = map(sin(a), -1, 1, margin, width - margin);
  float y0 = map(cos(a), -1, 1, margin, height - margin);
  
  float x1 = map(sin(b), -1, 1, margin, width - margin);
  float y1 = map(cos(b), -1, 1, margin, height - margin);

  
  //background(100);
  //stroke(150, 255 ,255);
  //point(x0, y0);
  //point(x1, y1);
  
  triangle(x0, y0, x1, y1);
  //ellipse(x0, y0, 20, 20);
  //ellipse(x1, y1, 20, 20);
  

  a = a + 0.009;  //random(1.000001, 3.000001)/30;
  b = b + 0.04;
  c = c + 0.003;
  
  co = co + 1;
  if (co > 100) {
    co = 0;
  }
}