Published
Edited
Nov 29, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
y = f(x)
Insert cell
f = (x) => x / sin(acos((h - x) / x) / 2)
Insert cell
df = x => csc(acos((h - x) / x) / 2) - ((cot(acos((h - x) / x) / 2)) * (csc(acos((h - x) / x) / 2)) / sqrt(x - 4))
Insert cell
theta = acos(CE / BC) / 2
Insert cell
alpha = (pi / 2) - theta
Insert cell
beta = 2 * theta
Insert cell
domain = [4.59, h]
Insert cell
CE = h - x
Insert cell
BC = x
Insert cell
A = geometric.pointTranslate(C, geometric.angleToDegrees(theta) - 180, y)
Insert cell
B = [w - x, h]
Insert cell
C = [w, x]
Insert cell
D = [w, 0]
Insert cell
E = [w, h]
Insert cell
h = 8
Insert cell
w = 12
Insert cell
margin = ({left: 46, right: 15, bottom: 36, top: 18})
Insert cell
chartheight = chartwidth * h / w
Insert cell
chartwidth = Math.min(width - 50, 340)
Insert cell
xscale = d3.scaleLinear([0, w], [0, chartwidth])
Insert cell
yscale = d3.scaleLinear([0, h], [0, chartheight])
Insert cell
trans = (point) => [xscale(point[0]), yscale(point[1])]
Insert cell
pi = Math.PI
Insert cell
sin = Math.sin
Insert cell
acos = Math.acos
Insert cell
sqrt = Math.sqrt
Insert cell
cot = x => 1 / Math.tan(x)
Insert cell
csc = x => 1 / Math.sin(x)
Insert cell
geometric = require("geometric@2")
Insert cell
import { fplot } from "ab43ad6e37e6975e"
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