Public
Edited
Mar 31, 2023
Insert cell
Insert cell
Insert cell
viewof sinusoidalParams = Inputs.form({
wavelengths: Inputs.range([2, 88], {label: "Wavelengths", step: 1}),
amplitude: Inputs.range([0, 10], {label: "Amplitude", step: 0.01}),
radius: Inputs.range([1, 10], {label: "Radius", step: 1})
})
Insert cell
Insert cell
Insert cell
height = 400
Insert cell
lineFn = (t) => {
const x = sinusoidalParams.radius * Math.cos(t)
const y = sinusoidalParams.amplitude * Math.cos(sinusoidalParams.wavelengths * t) + sinusoidalParams.amplitude
const z = sinusoidalParams.radius * Math.sin(t)

return [x, y, z];
}
Insert cell
position = {
const points = [];

const r = 10;
for (const i of d3.range(361)) {
const t = i * Math.PI / 180;
points.push(...lineFn(t));
}

return points;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
threeVersion = "0.151.0"
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