Public
Edited
Oct 31, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pic.update(step)
Insert cell
cantor_approximations = {
let current_approximation = [[0, 1]];
let all_approximations = [current_approximation];

for (let i = 0; i < 6; i++) {
current_approximation = cantor_step_up(current_approximation);
all_approximations.push(current_approximation);
}
return all_approximations;
}
Insert cell
function cantor_step_up(intervals) {
return intervals.map(partition).flat();
}
Insert cell
function partition([a, b]) {
let b1 = (2 * a + b) / 3;
let a1 = (a + 2 * b) / 3;
return [
[a, b1],
[a1, b]
];
}
Insert cell
import { step_input } from "59730aabd7354b99"
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