xxxxxxxxxx
55
//PARAMETRIC CURVES RESPECTING TIME
//very roughly inspired by https://www.youtube.com/watch?v=1-QXuR-XX_s
var points = [];
let mult = 0.005;
function setup() {
colorMode(HSB);
createCanvas(windowWidth, windowHeight, WEBGL);
background(30);
frameRate(15);
let density = 5;
let space = width / density;
for(let x = 0; x < width; x += space){
for(let y = 0; y < height; y+= space){
for(let z = 0; z < height; z+= space){
let p = createVector(x, y, z);
points.push(p);
}
}
}
}
let t = 0;
let r = 15;
let c = 0;
function draw() {
let f = 0;
orbitControl();
// noStroke();
stroke(200);
strokeWeight(3);
fill(255);
background(30);
while(f < 30){
for(let i = 0; i < points.length; i++){
// let angle = map(noise(points[i].x * mult, points[i].y * mult), 0, 1 , 0, 720);
t += 0.5;
// points[i].add(createVector(cos(angle), cos(angle)));
let pointCopy = points;
// pointCopy[i].add(createVector(cos(t), sin(t));
// ellipse(points[i].x, points[i].y, 3);
// line(points[i].x, points[i].y, points[i].x+10*cos(angle), points[i].y + 10*sin(angle));
// line(points[i].x, points[i].y, points[i].x+10*sin(angle), points[i].y + angle);
point(points[i].x+r*cos(3*t), points[i].y+r*sin(2*t), points[i].z+r*sin(3*t));
}
// rotateY(frameCount * .01);
f++;
}
}