// for the sake of performace we should investigate manipulating the pixel array instead, putImageData
ctx.fillRect(x,y,1,1)
}
import{slider}from"@jashkenas/inputs"
viewofx=slider({
title:"X"
})
//viewof r = slider({
// min: 2,
// max: 16,
// step: 2,
// title: "R"
//})
functionxcalc(x,r){
varresult=r*x*(1-x);
returnresult;
}
{
letr=1
letxcurrent=x
for(leti=0;i<=100;i++){
array[i]=xcalc(xcurrent,r)
xcurrent=xcurrent*r*(1-xcurrent)
if(i%25==0){r=r+1}
}
}
array=[]
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.