xxxxxxxxxx
27
let iter = 100
let step = 0.01
let x = 0.01
let r = 2.5
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
strokeWeight(1)
stroke(255,20)
}
function draw() {
translate(0, (height / 2)-350)
for (let i = 0; i < 1000; i++) {
x = Logistic(x, r)
point(frameCount/2, x * 700)
}
r += 0.00125
if (r > 4.5) {
noLoop()
}
}
function Logistic(x, r) {
return r * x * (1 - x)
}