Public
Edited
Apr 26, 2022
5 stars
Also listed in…
Math
Insert cell
Insert cell
Insert cell
Insert cell
lines(T)
Insert cell
// Intial rotation
T = 0.8 * Math.PI
Insert cell
// Number of threads
N = 60
Insert cell
function lines(t) {
let t2 = t / 2;
return d3.range(N).map(function(i) {
let theta = (2 * Math.PI * i) / N;
return [
[2 * Math.cos(theta + t2), 2 * Math.sin(theta + t2), 0],
[2 * Math.cos(theta - t2), 2 * Math.sin(theta - t2), 4]
];
});
}
Insert cell
import { Scrubber } from "@mbostock/scrubber"
Insert cell
import { Range } from "@observablehq/inputs"
Insert cell
import { path_list_to_coordString } from '@mcmcclur/x3dom-utilities'
Insert cell
import {
show_x3d,
create_indexedLineSet,
create_sphere
} from "@mcmcclur/plotx3d"
Insert cell
style = html`
<style>
canvas {
outline: none
}
output {
display: 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