An immutable, precision-safe, extensible Geometry calculation library for PHP 7.4+, built entirely on top of the Sobhanmohammadi\CAS algebra engine. Includes 10 new shape-solving factories for Triangle, Rhombus, Parallelogram, and Trapezoid with support for ambiguous cases and multiple input combina

Maintainers

Package info

github.com/sobhanmohammadi-dev/geometry-library

Homepage

pkg:composer/sobhanmohammadi/geometry

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-07-22 05:24 UTC

This package is auto-updated.

Last update: 2026-07-22 05:25:40 UTC


README

A precision-first PHP geometry engine powered by CAS
Build, calculate and explain geometric shapes with exact algebraic evaluation.

✨ Overview

Sobhanmohammadi\Geometry is a modern PHP geometry library designed for:

  • 📏 Accurate geometric calculations
  • 🧮 CAS-powered algebra evaluation
  • 🎯 Configurable precision handling
  • 🔄 Unit conversion
  • 🧠 Step-by-step mathematical explanations
  • 🧩 Extensible shape architecture

Unlike traditional geometry libraries, formulas are not manually calculated inside shapes. All algebraic operations are delegated through a dedicated CAS gateway.

🚀 Features

Supported Shapes

Shape Status
◼ Square
▭ Rectangle
◇ Rhombus
▱ Parallelogram
🔺 Triangle
⏢ Trapezoid
⚪ Circle

🔥 Core Capabilities

Geometry

  • Area calculation
  • Perimeter calculation
  • Radius & diameter
  • Diagonals
  • Heights
  • Medians
  • Centers:
    • Centroid
    • Circumcenter
    • Orthocenter
    • Incenter

Algebra Engine

  • Exact expression evaluation
  • Linear equation solving
  • Symbolic explanations
  • Numeric explanations
  • Precision-aware calculations