// the angular step that corresponds to a line of stepWidth length in pixels
step=(t)=>Math.atan(stepLength/radius(t))
// the maximum angle from the axis (after which the spiral certainly goes off the screen):
maxT=Math.log(Math.hypot(width/2,height/2)/a)/b
// radius of a logarithmic spiral (given an angle from the axis)
radius=(t)=>a*Math.exp(b*t)
// position of a point on a spiral given an angle from the axis and an offset angle (for rotation)
pos=(t,angle)=>{
constr=radius(t);
constx=r*Math.cos(t+angle);
consty=r*Math.sin(t+angle);
return{x,y};
}
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.