Public
Edited
Aug 19, 2024
9 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 fractals
Bifurcation diagram with critical curves
The 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 integralsMST in an RGGTrees 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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
scales = {
let w = width < 900 ? width : 900;
let h = 0.625 * w;
let rmin = 2.6;
let rmax = 4;
let pad = 30;
let x_scale = d3
.scaleLinear()
.domain([rmin, rmax])
.range([pad, w - pad]);
let y_scale = d3
.scaleLinear()
.domain([0, 1])
.range([h - pad, pad]);
let pts_to_path = d3
.line()
.x(d => x_scale(d[0]))
.y(d => y_scale(d[1]));

return {
w: w,
h: h,
rmin: rmin,
rmax: rmax,
pad: pad,
x_scale: x_scale,
y_scale: y_scale,
pts_to_path: pts_to_path
};
}
Insert cell
f = (r, x) => r * x * (1 - x)
Insert cell
function F(n, r) {
let x = 0.5;
for (let i = 0; i < n; i++) {
x = f(r, x);
}
return x;
}
Insert cell
function FF(n, r, eps) {
let x = 0.5 + eps;
for (let i = 0; i < n; i++) {
x = f(r, x);
}
return x;
}
Insert cell
function cobweb_pic(r, opts_in = {}) {
let f = x => r * x * (1 - x);
let { w = 300, h = 300 } = opts_in;
let opts = {
xdomain: [0, 1],
ydomain: [0, 1],
marginTop: (10 * w) / 300,
marginRight: (10 * w) / 300,
marginBottom: 0, //(10 * w) / 300,
marginLeft: 0, //(10 * w) / 300,
inset: 6,
insetTop: 6,
insetRight: 6,
insetBottom: 0,
insetLeft: 0,
width: w,
height: h,
strokeWidth: 2.5,
xticks: [0],
yticks: false
};
let x_scale = d3.scaleLinear(opts.xdomain, [
opts.marginLeft + opts.insetLeft,
opts.width - opts.marginRight - opts.insetRight
]);
let y_scale = d3
.scaleLinear(opts.ydomain, [
opts.height - opts.marginBottom - opts.insetBottom,
opts.marginTop + opts.insetTop
])
.nice();
let pts_to_path = d3
.line()
.x(function(d) {
return x_scale(d[0]);
})
.y(function(d) {
return y_scale(d[1]);
});

let plot = funplot([f, x => x], opts);

let x0 = 0.5;
let cobweb = make_cobweb(f, x0, 0, 1);
let svg = d3.select(plot);
svg
.append("path")
.attr("d", pts_to_path(cobweb))
.style("stroke", "black")
.style("stroke-width", 0.4)
.style("fill", "none")
.style("opacity", 0.4);
svg
.append("line")
.attr("x1", 0)
.attr("x2", w)
.attr("y1", y_scale(0))
.attr("y2", y_scale(0))
.attr("stroke", "black");
svg
.append("line")
.attr("y1", 0)
.attr("y2", h)
.attr("x1", x_scale(0))
.attr("x2", x_scale(0))
.attr("stroke", "black");
svg
.append("circle")
.attr("cx", x_scale(x0))
.attr("cy", y_scale(x0))
.attr("fill", "#3d3")
.attr("stroke", "black")
.attr("r", 3);

return plot;
}
Insert cell
function make_cobweb(f, x0, xmin, xmax) {
let x = x0;
let y = x;
let bail = 1500;
let cobweb = [[x, y]];
let i = 0;
while (i < bail && xmin <= y && y <= xmax) {
y = f(x);
cobweb.push([x, y]);
x = y;
cobweb.push([x, y]);
i++;
}
return cobweb;
}
Insert cell
max_period = super_attracting_parameters.slice(-1)[0].period
Insert cell
super_attracting_parameters = await FileAttachment(
"superAttractingLogisticParameters@2.csv"
).csv({ typed: true })
Insert cell
import { funplot } from "@mbostock/funplot"
Insert cell
import { Range } from '@observablehq/inputs'
Insert cell
tippy_style = html`
<link rel="stylesheet" href="${await require.resolve(
`tippy.js/themes/light.css`
)}">
`
Insert cell
tippy = require("tippy.js@6")
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