Public
Edited
Apr 6, 2023
6 stars
A Julia set on the Riemann sphereThe Z-CurveBarnsley's fernA stochastic digraph IFS algorithmSelf-affine tilesThe TwindragonThe Eisenstein fractionsA self-affine tile with holesSelf-affine tiles via polygon mergeGolden rectangle fractalsBifurcation diagram with critical curvesThe tame twindragonIllustrations for the proof of Green's theoremNon-orientability of a Mobius stripExamples of parametric surfacesPenrose tilingThe extended unit circlePenrose three coloringNewtons's method on the Riemann sphereConic sectionsDivisor graphsThe dance of Earth and VenusIterating multiples of the sine functionBorderline fractalsSelf-similar intersectionsBox-counting dimension examplesMandelbrot by dimensionInverse iteration for quadratic Julia setsInteger Apollonian PackingsIllustrations of two-dimensonal heat flowThe logistic bifurcation locusThe eleven unfoldings of the cubeA unimodal function with fractal level curvesGreen's theorem and polygonal areaThe geometry and numerics of first order ODEsThe xxx^xxx-spindleAnimated beatsRauzy FractalsHilbert's coordinate functionsPluckNot PiDrum strikeThe Koch snowflakeFractalized squareA Taylor series about π/4\pi/4π/4PlotX3D HyperboloidA PlotX3D animationModular arithmetic in 5th grade artSimple S-I-R ModelThe Poisson KernelPoly-gasketsClassification of 2D linear systems via trace and determinantJulia sets and the Mandelbrot setWater wavesFourier SeriesDisks for a solid of revolutionOrbit detection for the Mandelbrot setTracing a path on a spherePlot for mathematiciansFunctions of two variablesPartial derivativesDijkstra's algorithm on an RGGGradient ascentUnfolding polyhedraTangent plane to a level surfaceA strange discontinuityExamples of level surfacesMcMullen carpetsHills and valleysThe definition of ⇒Double and iterated integrals
MST in an RGG
Trees are bipartiteFractal typesettingd3.hierarchy and d3.treeK23 is PlanarPolar CoordinatesParametric region generatorParametric Plot 2DContour plotsGreedy graph coloringGraph6A few hundred interesting graphsThe Kings ProblemFirst order, autonomous systems of ODEsRunge-Kutta for systems of ODEs
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Computation of a minimum spanning tree
krus = cy.elements().kruskal((e) => e._private.data.length2)
Insert cell
// The computation of the tree will be performed by Cytoscape
cy = {
let nodes = G.nodes.map((n) => ({ data: { id: `n${n.index}` } }));
let edges = G.links.map(function (e) {
let source_node = `n${e.source.index}`;
let target_node = `n${e.target.index}`;
return {
data: {
source: source_node,
target: target_node,
id: `${source_node}--${target_node}`,
length2: e.length2
}
};
});
return cytoscape({
elements: {
nodes: nodes,
edges: edges
}
});
}
Insert cell
// Generation of the random geometric graph.
G = {
new_graph;
let N = Math.round(1000 * s);
let R = 4000;
let seed = 0.1234;
seed = Math.random();
let random_source_x = d3.randomLcg(seed);
let random_source_y = d3.randomLcg(seed / 2);
let random_x = d3.randomUniform.source(random_source_x)(0, w);
let random_y = d3.randomUniform.source(random_source_y)(0, h);
let pts = d3.range(N).map(() => [random_x(), random_y()]);

let nodes = pts.map((p, i) => ({
x: p[0],
y: p[1],
index: i,
cy_data: { id: `n${i}` }
}));

let links = nodes
.map((node, i) => nodes.slice(i + 1).filter((n) => dist2(node, n) < R))
.map((a, i) =>
a.map((o) => ({
source: nodes[i],
target: nodes[o.index],
length2: Math.sqrt(dist2(nodes[i], nodes[o.index])),
cy_data: { id: `n${i}--n${o.index}` }
}))
)
.flat();

nodes.forEach(
(o) =>
(o.valence = links.filter(
(l) => l.source.index == o.index || l.target.index == o.index
).length)
);

let max_valence = d3.max(nodes.map((o) => o.valence));
let root_node = nodes.filter((o) => o.valence == max_valence)[0];
let G = { nodes, links, max_valence, root_node };

return G;

function dist2(o1, o2) {
return (o1.x - o2.x) ** 2 + (o1.y - o2.y) ** 2;
}
}
Insert cell
Insert cell
s = r ** 2
Insert cell
r = w / 1000
Insert cell
w = width < 1100 ? width : 1100
Insert cell
h = 0.625 * w
Insert cell
Insert cell
cytoscape = require("cytoscape")
Insert cell
import { Scrubber } from "@mbostock/scrubber"
Insert cell
Insert cell
revealed = {
let div = d3
.create("div")
.attr("id", "reveal_it")
.style("text-align", "center")
.style("opacity", reveal)
.text(
reveal < 1 ? "Revealing??" : "Or, more importantly, just really cool!!"
);
return div.node();
}
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