PHPackages                             sobhanmohammadi/geometry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sobhanmohammadi/geometry

ActiveLibrary

sobhanmohammadi/geometry
========================

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 combinations.

v1.2.0(1mo ago)00MITPHPPHP &gt;=7.4

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/sobhanmohammadi-dev/geometry-library)[ Packagist](https://packagist.org/packages/sobhanmohammadi/geometry)[ Docs](https://github.com/Sobhanmohammadi/Geometry)[ RSS](/packages/sobhanmohammadi-geometry/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

📐 Sobhanmohammadi Geometry
==========================

[](#-sobhanmohammadi-geometry)

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

 [![](https://camo.githubusercontent.com/1f31674ec019f48dfc3950233579143252c18c77cc58b58ea13bec6113550d63/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://camo.githubusercontent.com/1f31674ec019f48dfc3950233579143252c18c77cc58b58ea13bec6113550d63/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870) [![](https://camo.githubusercontent.com/9fa399fbb9f9a3b1f70319ffff1ff42eeab66db191f1307cb108e3bbb0b047cd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507265636973696f6e2d42434d6174682d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/9fa399fbb9f9a3b1f70319ffff1ff42eeab66db191f1307cb108e3bbb0b047cd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507265636973696f6e2d42434d6174682d626c75653f7374796c653d666f722d7468652d6261646765) [![](https://camo.githubusercontent.com/49d1aadd45cadb2c02adf11e989a64d77add72c68dba6c400f43b8f0b703224e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4341532d506f77657265642d6f72616e67653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/49d1aadd45cadb2c02adf11e989a64d77add72c68dba6c400f43b8f0b703224e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4341532d506f77657265642d6f72616e67653f7374796c653d666f722d7468652d6261646765) [![](https://camo.githubusercontent.com/80d3c741ee341dc1e7cf90e39115b95795230c4a163eeac9cb99c0e07ffda9d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d31333725323070617373696e672d737563636573733f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/80d3c741ee341dc1e7cf90e39115b95795230c4a163eeac9cb99c0e07ffda9d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d31333725323070617373696e672d737563636573733f7374796c653d666f722d7468652d6261646765)

---

✨ Overview
----------

[](#-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
==========

[](#-features)

Supported Shapes
----------------

[](#supported-shapes)

ShapeStatus◼ Square✅▭ Rectangle✅◇ Rhombus✅▱ Parallelogram✅🔺 Triangle✅⏢ Trapezoid✅⚪ Circle✅---

🔥 Core Capabilities
-------------------

[](#-core-capabilities)

### Geometry

[](#geometry)

- Area calculation
- Perimeter calculation
- Radius &amp; diameter
- Diagonals
- Heights
- Medians
- Centers:
    - Centroid
    - Circumcenter
    - Orthocenter
    - Incenter

### Algebra Engine

[](#algebra-engine)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance92

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e87e0310dfd6b9383486168b87122fb28cd8283adae26ddc290786408080cee?d=identicon)[sobhanmohammadi-dev](/maintainers/sobhanmohammadi-dev)

---

Top Contributors

[![sobhanmohammadi-dev](https://avatars.githubusercontent.com/u/200896399?v=4)](https://github.com/sobhanmohammadi-dev "sobhanmohammadi-dev (5 commits)")

---

Tags

geometryphpmathcasgeometryimmutableprecisionbcmathalgebrassatrianglecircleshapestrapezoidrhombusparallelogramlaw-of-sineslaw-of-cosines

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sobhanmohammadi-geometry/health.svg)

```
[![Health](https://phpackages.com/badges/sobhanmohammadi-geometry/health.svg)](https://phpackages.com/packages/sobhanmohammadi-geometry)
```

###  Alternatives

[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k8.0M58](/packages/markrogoyski-math-php)[phpseclib/bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension

16822.0M30](/packages/phpseclib-bcmath-compat)[krowinski/bcmath-extended

Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers. Also wraps existing BCMath functions. (more http://php.net/manual/en/book.bc.php) Supports scientific notations

791.2M27](/packages/krowinski-bcmath-extended)[prestashop/decimal

Object-oriented wrapper/shim for BC Math PHP extension. Allows for arbitrary-precision math operations.

179.3M9](/packages/prestashop-decimal)[ionux/phactor

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate &amp; verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

5395.3k30](/packages/ionux-phactor)[php-decimal/php-decimal

Correctly-rounded arbitrary precision decimal floating point

781.1M13](/packages/php-decimal-php-decimal)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
