Published
Edited
Oct 19, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
IFS = {
let t = 137.5 * degree;
let r0 = 0.98;
let r1 = 0.1;
return new IteratedFunctionSystem([
rotate(t).compose(scale(r0)),
shift([1, 0]).compose(scale(r1))
]);
}
Insert cell
Insert cell
IFS.render_stochastic({ colors: true })
Insert cell
The IFS knows some things about itself, such as its dimension and probability list for a uniform distribution:
Insert cell
{
let s = IFS.dimension;
let [p0, p1] = IFS.plist;
return { s: s, p0: p0, p1: p1 };
}
Insert cell
Insert cell
IFS.render_stochastic({
plist: [1 / 2, 1 / 2],
colors: true
})
Insert cell
Insert cell
Insert cell
import { shift, scale, rotate, degree } from "@mcmcclur/affinefunction-class"
Insert cell
import { IteratedFunctionSystem } from "@mcmcclur/iteratedfunctionsystem-class"
Insert cell
import {
viewof start,
viewof clear as clear_sierpinski,
canvas as SierpinskiCanvas
} from "@mcmcclur/construction-of-the-serpinski-triangle"
Insert cell
import { pedalIFS } from "@mcmcclur/the-sierpinski-pedal-triangle"
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