Public
Edited
Apr 3, 2024
1 star
Insert cell
Insert cell
f = (theta) => Math.sin(3 * theta)
Insert cell
Insert cell
Insert cell
Insert cell
u = (r, theta) =>
integrate(
(phi) =>
(f(phi) * (1 - r ** 2)) / (1 + r ** 2 - 2 * r * Math.cos(theta - phi)),
-Math.PI,
Math.PI
) /
(2 * Math.PI)
Insert cell
function integrate(ff, a, b) {
return adaptiveSimpson(ff, a, b, {
tolerance: 1e-11,
maxDepth: 8,
minDepth: 7
});
}
Insert cell
import { show_x3d, create_surface } from "@mcmcclur/plotx3d"
Insert cell
import { adaptiveSimpson } from "@rreusser/integration@3056"
Insert cell
pi = Math.PI
Insert cell
sin = Math.sin
Insert cell
cos = Math.cos
Insert cell
abs = Math.abs
Insert cell
sqrt = Math.sqrt
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