Published
Edited
Sep 1, 2022
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Run the animation
run = {
let rotation = d3
.select(create_arrow(0, p(now / 2000)))
.select(".rotate")
.attr("rotation");
d3.select(pic).select(".rotate").attr("rotation", rotation);
}
Insert cell
// The path
p = (t) => [
Math.cos(4 * t) * Math.sin(3 * t),
Math.sin(4 * t) * Math.sin(3 * t),
Math.cos(3 * t)
]
Insert cell
// Time step
delta = Math.PI / 400
Insert cell
style
Insert cell
import {
show_x3d,
create_tube,
create_sphere,
create_arrow,
style
} from "@mcmcclur/plotx3d"
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