Plot.plot({
height: 400,
width: 400,
inset: 100,
x: { axis: false, domain: [-1, 1] },
y: { axis: false, domain: [-1, 1] },
color: {
type: "cyclical",
scheme: "Rainbow",
range: [0, 1]
},
marks: [
Plot.dot([{ x: 0, y: 0 }], { x: "x", y: "y", r: 120, fill: "#f0f0f0" }),
Plot.dot([{ x: 0, y: 0 }], { x: "x", y: "y", r: 80, fill: "white" }),
Plot.dot(data, {
x: "x",
y: "y",
r: 5,
fill: (d, i) => {
console.log(d.turns % 1);
return d.turns % 1;
}
})
]
})