xxxxxxxxxx
59
let x, y
let newx, newy
//parameters
let wx = 0.043333;
let wy = 0.053333;
let a = 0.7;
let scaleP = 2;
//size
h = 400;
function setup() {
createCanvas(h, h);
background(255);
strokeWeight(1);
for(let dy = 0; dy < h; dy++){
for(let dx = 0; dx < h; dx++){
x = scaleP*dx/h;
y = scaleP*dy/h;
for(let i = 0; i < 10; i++){
newx = (x + wx - a/((TWO_PI)*sin(TWO_PI*y) )) ;
newy = (y + wy - a/((TWO_PI)*sin(TWO_PI*x) )) ;
x = newx % h;
y = newy % h;
stroke(0, abs(newy*newx) % 256); //color (black), alpha
point(dx, dy);
}
}
}
}
function draw() {
}