grokkingstuff Home Blog Projects Wiki Calculators About

Planar geometry: circles, ellipses & polygons

modified2026-07-22statusfinished

Six 2D mensuration solvers: circle sectors & segments, the circle through three points, ellipse geometry, parallelogram/rhombus, regular polygons, and coordinate distance/slope.

Index

Circle segment, arc, chord & sector solver

[8.1] Governing equations

$$s = r\theta,\quad c = 2r\sin\tfrac{\theta}{2},\quad h = r\!\left(1-\cos\tfrac{\theta}{2}\right),\quad A_{\text{seg}} = \tfrac12 r^2(\theta-\sin\theta)$$

Arc length, chord, sagitta (segment height), apothem, and sector/segment area from radius $r$ and central angle $\theta$ (radians). Source: 1728 Software Systems & Engineering ToolBox.

r c θ
FIG. 01 — circular sector: radius r, central angle θ, chord c subtending the arc
Arc length s
Chord length c
Sagitta (segment height) h
Apothem d
Sector area
Segment area

Three-point circle center & equation

[8.2] Governing equations

$$(x_i-h)^2+(y_i-k)^2=R^2\quad(i=1,2,3)$$

The unique circle through three non-collinear points; center $(h,k)$ is the intersection of the perpendicular bisectors. Source: 1728 Software Systems.

(h,k) P1 P2 P3
FIG. 02 — the circumscribed circle passing through three boundary points
Center (h, k)
Radius R
Circumference
Area
Equation

Ellipse area, perimeter & eccentricity

[8.3] Governing equations

$$A=\pi a b,\quad P\approx\pi(a+b)\!\left[1+\frac{3h}{10+\sqrt{4-3h}}\right],\quad h=\frac{(a-b)^2}{(a+b)^2}$$

Exact area and Ramanujan's second perimeter approximation (error < $10^{-5}$). Eccentricity $e=\sqrt{1-(b/a)^2}$ with $a\ge b$. Source: 1728 Software Systems.

a b F
FIG. 03 — ellipse: semi-major axis a, semi-minor axis b, foci F
Area
Perimeter (Ramanujan II)
Eccentricity e
Focal distance c

Parallelogram & rhombus geometry

[8.8] Governing equations

$$d_{1,2}=\sqrt{a^2+b^2\mp 2ab\cos\theta},\quad A=ab\sin\theta,\quad h=b\sin\theta$$

Diagonals, area, height and perimeter from sides $a,b$ and the included angle $\theta$. A rhombus is the case $a=b$. Source: 1728 Software Systems.

a b θ d₁ d₂
FIG. 04 — parallelogram with sides a, b, included angle θ, diagonals d₁, d₂
Area
Height (on base a)
Perimeter
Diagonal d₁ (short)
Diagonal d₂ (long)

Regular N-gon polygon solver

[8.9] Governing equations

$$\theta_{\text{int}}=\frac{(n-2)180^\circ}{n},\quad r_{\text{in}}=\frac{s}{2}\cot\frac{\pi}{n},\quad R=\frac{s}{2}\csc\frac{\pi}{n},\quad A=\frac{n}{4}s^2\cot\frac{\pi}{n}$$

All properties of a regular $n$-gon from the side length $s$. Source: 1728 Software Systems & Engineering ToolBox.

R r
FIG. 05 — regular hexagon with circumradius R and inradius (apothem) r
Interior angle
Exterior angle
Perimeter
Inradius (apothem)
Circumradius R
Area

2D coordinate distance & slope

[8.15] Governing equations

$$d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2},\quad m=\frac{y_2-y_1}{x_2-x_1},\quad \phi=\arctan m$$

Euclidean distance, midpoint, slope, angle of inclination, and line equation between two points. Source: 1728 Software Systems.

P1 P2 d
FIG. 06 — distance triangle between points P1 and P2
Distance d
Midpoint
Slope m
Angle of inclination
Line equation