Published
Edited
Dec 22, 2019
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
F = t => [
2 * Math.cos(t - a) - 0.05 * Math.sin(t * 30),
Math.sin(t - a) + 0.05 * Math.cos(t * 30)
]
Insert cell
G = t => [
3 * t * Math.cos(3 * a) - 1,
5 * t * Math.sin(3 * a) - 1.5 - 0.5 * t * t
]
Insert cell
diff = (t0, t1) => {
const f = F(t0),
g = G(t1);
return [f[0] - g[0], f[1] - g[1]];
}
Insert cell
solver = solve2d(diff, N)
Insert cell
solution = solver(0, 0)
Insert cell
F(solution[0])
Insert cell
G(solution[1])
Insert cell
import { solve2d } from "@fil/2d-newton-raphson"
Insert cell
import { slider } from "@jashkenas/inputs"
Insert cell
width = 600
Insert cell
height = 300
Insert cell
d3 = require("d3@5")
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