/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://kollafoss.sketchpad.cc/sp/pad/view/ro.mrYrel8P3fD/rev.168
*
* authors:
* smári
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/*
This sketch builds on a prior work, "Modified clone of 'mynstur2'", created by Eysteinn Tjörvi Kristinsson & Bjarni Ole Apel Ingason & Sigurbjörg Emily Sigurðardóttir
http://kollafoss.sketchpad.cc/sp/pad/view/ro.4xlpMYKBO3rD8wB/rev.250
*/
/*
This sketch builds on a prior work, "mynstur2", created by Sigurbjörg Emily Sigurðardóttir
http://kollafoss.sketchpad.cc/sp/pad/view/ro.4H-eyNnPMW2MXGc/rev.7
*/
float a = 0;
float b = 0;
float c = 0;
float co = 0;
void setup() {
background(255);
colorMode(HSB,50 ,50 ,50);
size(500, 500);
smooth(1000);
strokeWeight(1);
frameRate(10000);
noFill();
rectMode(CENTER);
}
float margin;
void draw() {
stroke(random(255), co,random(255), 1);
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);
ellipse(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;
}
}