Public
Edited
Aug 17, 2023
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: 450,
aspectRatio: 1,
x: { domain: [-1, 1] },
y: { domain: [-1, 1] },
axis: null,
marks: [
Plot.line(angles, {
x: (i) => Math.sin(n * d * i) * Math.cos(d * i),
y: (i) => Math.sin(n * d * i) * Math.sin(d * i),
stroke: "black",
strokeWidth: 0.33
}),
Plot.line(angles, {
x: (i) => Math.sin(n * i) * Math.cos(i),
y: (i) => Math.sin(n * i) * Math.sin(i),
stroke: "red",
strokeWidth: 2.5
})
]
})
Insert cell
angles = d3.ticks(0, 360, 360).map((d) => (d * Math.PI) / 180)
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