Published
Edited
Apr 9, 2019
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
{
const star = radius =>
[0, .4, .8, .2, .6, 0].map(d =>
round(radius*Math.cos(2*Math.PI*d - .5*Math.PI), 3)
+","+
round(radius*Math.sin(2*Math.PI*d - .5*Math.PI), 3)
)
return star(1);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dataMaker = (stepSize,nPoints) => {
let data = []
for(let i = 0; i < nPoints; i++){
data.push(i*(stepSize/nPoints))
}
data.push(0)
return data
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

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.
Learn more