Public
Edited
Nov 2, 2023
1 fork
2 stars
Insert cell
Insert cell
// Define an IFS
IFS = new IteratedFunctionSystem([
scale(0.5),
scale(0.5, [1, 0]),
scale(0.5, [0, 1])
])
Insert cell
// The easiest way to visualize is with IFS.render_stochastic
IFS.render_stochastic({ colors: true })
Insert cell
// IFS.render_deterministic is another option
IFS.render_deterministic({
max_depth: 4,
init: [
[0, 0],
[1, 0],
[0, 1]
],
fill_colors: true
})
Insert cell
// All built on top of the following imports
import {
IteratedFunctionSystem,
scale,
shift,
rotate,
reflect,
pi,
degree
} from "@mcmcclur/iteratedfunctionsystem-class"
Insert cell
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