MODULUS / REFERENCE

Formulas: Geometry

Complete Android Modulus reference: formulas for Geometry.

Triangles

• P = a + b + c

• p = P / 2, α + β + γ = 180°, γext = α + β

• S = a · h / 2

• S = √(p(p − a)(p − b)(p − c)), where p = P / 2

• S = pr, S = abc / 4R

• S = ab sinγ / 2

• c² = a² + b² − 2ab cosγ

• a / sinα = b / sinβ = c / sinγ = 2R

• For a right triangle: c² = a² + b², S = ab / 2 = ch / 2, h = ab / c, h² = mn, c = m + n, m = c / 2

• ma = 1/2 √(2b² + 2c² − a²), la = √(bc((b + c)² − a²)) / (b + c), BD / DC = AB / AC

• ha = 2S / a, r = 2S / P, R = abc / 4S

• Equilateral: S = a²√3 / 4, h = a√3 / 2, r = a√3 / 6, R = a√3 / 3

• Midline: m = a / 2, the centroid divides the median as 2 : 1

• Coordinates: S = |x₁(y₂ − y₃) + x₂(y₃ − y₁) + x₃(y₁ − y₂)| / 2

• Centroid: G((x₁ + x₂ + x₃) / 3, (y₁ + y₂ + y₃) / 3)


Quadrilaterals

• Square: P = 4a, S = a², d = a√2

• Square: r = a / 2, R = a / √2 = d / 2

• Rectangle: P = 2(a + b), S = ab, d = √(a² + b²)

• Rectangle: a = d cosα, b = d sinα, S = d² sinα cosα

• Parallelogram: S = a · h = ab sinγ, P = 2(a + b)

• Parallelogram: d = √(a² + b² − 2ab cosγ)

• Rhombus: S = d1d2 / 2 = a · h, P = 4a

• Rhombus: d1 = 2a cos(α / 2), r = S / 2a

• Trapezoid: S = (a + b)h / 2 = mh, m = (a + b) / 2

• Isosceles trapezoid: h = √(c² − ((b − a) / 2)²), d = √(ab + c²)


Polygons and circles

• Regular n-gon: P = n · a

• ap = a / (2 tan(π / n)), R = a / (2 sin(π / n))

• Sn = n · a · ap / 2 = P · ap / 2

• φ = 360 / n, D = n(n − 3) / 2

• a = 2R sin(φ / 2), ap² = R² − (a / 2)²

• Interior angle: α = (n − 2) · 180 / n

• Exterior angle: β = 360 / n

• Sum of interior angles: Σ = (n − 2) · 180°, sum of exterior angles: 360°

• L = 2πr, S = πr²

• l = 2πr · φ / 360, Ssec = πr² · φ / 360, Psec = 2r + l

• c = 2r sin(φ / 2), Sannulus = π(R² − r²), Sseg = πr²·φ / 360 − r²sinφ / 2

• For a segment: h = r − r cos(φ / 2), c = 2√(2rh − h²), h = r − √(r² − (c / 2)²)

• Sseg = r² arccos((r − h) / r) − (r − h)√(2rh − h²)

• αins = φ / 2, αtan = φ / 2, c = 2√(r² − d²)

• αin = (φ₁ + φ₂) / 2, αout = (φ₁ − φ₂) / 2

• PA = PB, OP² = r² + t², α2tan = 180° − φ

• PT² = PA · PB, PA · PB = PC · PD, t² = ab, mn = pq

• Ellipse: S = πab, P ≈ π[3(a + b) − √((3a + b)(a + 3b))], e = √(1 − b² / a²)


Solids

• Cube: V = a³, S = 6a², d = a√3, dface = a√2

• Tetrahedron: V = a³ / (6√2), S = √3a², h = a√(2 / 3), r = a√6 / 12, R = a√6 / 4

• Rectangular prism: V = abc, S = 2(ab + ac + bc), d = √(a² + b² + c²)

• Base diagonal: dbase = √(a² + b²), right prism diagonal: d = √(dbase² + h²)

• Prism: V = Sbase · h, Slat = Pbase · h

• Pyramid: V = Sbase · h / 3, Slat = Pbase · l / 2, l² = h² + r², e² = h² + R²

• Regular pyramid: Pbase = na, R = a / (2sin(π / n)), r = a / (2tan(π / n)), Sbase = Pbaser / 2

• For a regular pyramid: α = arctan(h / r), β = arctan(h / R), γ = (n − 2) · 180 / n, rsph = 3V / Stot, Rsph = (h² + R²) / 2h

• Cylinder: V = πr²h, Slat = 2πrh, Sbase = πr², Stot = 2πr(h + r)

• Cylinder: Sax = 2rh, dax = √(h² + (2r)²), Pbase = 2πr, D = 2r, rsph = min(r, h / 2), Rsph = √(h² + (2r)²) / 2

• Cone: V = πr²h / 3, Slat = πrl, Stot = πr(l + r), l² = r² + h², Sax = rh

• Cone: Pbase = 2πr, D = 2r, rsph = rh / (r + l), Rsph = (h² + r²) / 2h

• Frustum cone: V = πh(R² + Rr + r²) / 3, Slat = π(R + r)l, Stot = Slat + π(R² + r²)

• Frustum cone: l² = h² + (R − r)², Sax = (R + r)h, P₁ = 2πR, P₂ = 2πr

• Frustum pyramid: V = h(S₁ + S₂ + √(S₁S₂)) / 3, Slat = (P₁ + P₂)l / 2, l² = h² + (r₁ − r₂)²

• Octahedron: V = √2a³ / 3, S = 2√3a², r = a√6 / 6, R = a√2 / 2

• Sphere: S = 4πr², V = 4πr³ / 3, ρ² = R² − d²

Values are provided for reference. Check the required unit system and conditions before engineering or laboratory use.