Published
Edited
Jun 16, 2021
1 fork
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
coord_strings = d3
.range(0, 2 * Math.PI + 0.1, Math.PI / 8)
.map((T) =>
make_coord_string(
(x, t) => [
x,
Math.cos(t) * Math.exp(-(x ** 2)),
Math.sin(t) * Math.exp(-(x ** 2))
],
[-2.5, 2.5],
[0, T]
)
)
Insert cell
f = (x) => Math.exp(-(x ** 2))
Insert cell
Insert cell
// global = ({ spun: false, show_disks: false, N: 25 })

N = 25
Insert cell
import { Button, Toggle, Range } from "@observablehq/inputs"
Insert cell
import { create_tube } from "@mcmcclur/space-curves-and-tubes"
Insert cell
import {
create_indexedFaceSet,
create_indexedLineSet,
create_arrow,
create_cylinder,
show_x3d
} from "@mcmcclur/x3dom-primitives"
Insert cell
import {
create_surface,
make_coord_string
} from "@mcmcclur/parametric-surfaces"
Insert cell
d3 = require("d3-selection@2", "d3-array@2", "d3-format@2")
Insert cell
html`
<style>
canvas {
outline: none
}
</style>
`
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