14 Commits
Author SHA1 Message Date
ashviz915Christian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
6421e9cb73 Fix ellipse perimeter calculation (#13690)
* Ellipse perimeter calculation

Updated the perimeter calculation for the Ellipse class to use Ramanujan's approximation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improve documentation for Side and ellipse perimeter

Updated docstring for Side class and added reference for ellipse perimeter calculation.

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-22 05:56:43 +02:00
alex-buchananAlexBpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Claussgithub-actionscclauss
26f49ab010 Braikenridge-Maclaurin Construction of a Conic (#11205)
* Added conic construction file

* Conic section code finalized for preliminary review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixing ISC001 issue

* Fixing variable declaration

* Modify generate method to return a formatted string

Changed the return type of the generate method to str and updated its implementation to return a formatted string instead of printing it.

* updating DIRECTORY.md

* updating DIRECTORY.md

* Clean up comments and improve docstring formatting

Removed commented-out documentation and updated docstring formatting.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add imports for dataclass and numpy

---------

Co-authored-by: AlexB <acbucha@clemson.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-21 17:28:15 +02:00
Jeel Gajeraandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> a79cd96598 chore(geometry): add angle conversion, ellipse eccentricity, polygon geometry, and triangle class (#13447)
* chore(geometry): add angle conversion, ellipse eccentricity, polygon geometry, and triangle class

- Added `Angle.to_radians()` and `Angle.from_radians()` for degree-radian conversion.
- Improved `Ellipse.perimeter` with Ramanujan’s approximation and added `eccentricity` property.
- Enhanced `Polygon` with vertex generation, perimeter, and area computation.
- Updated `Rectangle` to construct all four sides and support complete vertex/area logic.
- Introduced new `Triangle` class with validation, perimeter, and Heron’s area formula.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-14 23:17:59 +02:00
baadf5ec30 Geometry - shoelace formula (#12118)
* Compute the area of a polygon.

* updating DIRECTORY.md

* updating DIRECTORY.md

---------

Co-authored-by: simin75simin <simin75simin@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-14 06:34:22 +02:00
c9a815a41f Triangle Centers (#11201)
* Addition to the Geometry Folder with Triangle that calculates the different triangle centers

* Addition to the Geometry Folder with Triangle that calculates the different triangle centers

* Original triangle center w/fixes for automated testing

* triangles, added more fixes for automated testing

* trying to rename triangle.py

* Fixed a documentation error

* Removed a space I suspect is preventing the automated code reviewer from completing

* Fixed a documentation error

* updating DIRECTORY.md

* Apply suggestion from @cclauss

---------

Co-authored-by: AlexB <acbucha@clemson.edu>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-13 08:00:52 +02:00
Jubayer Ahmed SojibandChristian Clauss 38be0a6986 Add Rotating Calipers algorithm for convex polygon diameter (#15275)
* Add Rotating Calipers algorithm for convex polygon diameter

* refactor: define Point as NamedTuple class to adhere to naming conventions

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-11 18:42:34 +02:00
Jubayer Ahmed SojibChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3825c3e809 Add Andrew's Monotone Chain convex hull algorithm (#15165)
* Add Andrew's Monotone Chain convex hull algorithm

* Apply suggestion from @cclauss

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-09-11 18:39:03 +02:00
Ali AlimohammadiandJohn Law 33a8e0f21a feat: add Ramer-Douglas-Peucker polyline simplification algorithm (#14372)
* feat: add Ramer-Douglas-Peucker polyline simplification algorithm

* Use descriptive parameter names

* Update geometry/ramer_douglas_peucker.py

* Update geometry/ramer_douglas_peucker.py

* Update ramer_douglas_peucker.py

* Update ramer_douglas_peucker.py

* Update ramer_douglas_peucker.py

---------

Co-authored-by: John Law <johnlaw.po@gmail.com>
2026-05-20 00:43:43 +01:00
Ali AlimohammadiandJohn Law abf7168f57 feat: add Segment Intersection algorithm (#14416)
* feat: add Segment Intersection algorithm

* fix: use descriptive parameter names

---------

Co-authored-by: John Law <johnlaw.po@gmail.com>
2026-05-18 22:53:15 +01:00
Ali Alimohammadipre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>John LawChristian Clauss
f527d43d6d feat: add Graham Scan convex hull algorithm (#14251)
* feat: add Graham Scan convex hull algorithm

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: address pre-commit issues

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* chore: Algorithm-Keeper's comments addressed

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-03-07 22:35:52 +00:00
Ali Alimohammadiandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> ac05f1248c feat: add Jarvis March (Gift Wrapping) convex hull algorithm (#14225)
* Add Jarvis March (Gift Wrapping) convex hull algorithm

* Use descriptive parameter names per algorithms-keeper review

* Update jarvis_march.py

* Update jarvis_march.py

* fix: add pytest marker

* Update jarvis_march.py

* feat: removed doctests and created a separate test file for CI to pass

* Update jarvis_march_unit.py

* Update jarvis_march.py

* Update jarvis_march_unit.py

* feat: added test folder with tests to pass CI checks

* fix: duplicate points handled

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: fixed ruff errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-07 19:47:34 +00:00
Matejpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Tianyi Zheng
f24ddba5b2 Implemented doctests for geometry-related classes (#12368)
* Implemented doctests for geometry-related classes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed unused noqa directive

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactored sudoku_solver.py

* refactored sudoku_solver.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* context manager for file handling changed too in from_file function

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-12-30 07:04:28 -08:00
Maxim Smolskiy f437f92279 Enable ruff INP001 rule (#11346)
* Enable ruff INP001 rule

* Fix

* Fix

* Fix

* Fix

* Fix
2024-04-02 21:13:56 +02:00
MargaretChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
3999abfea3 adding a geometry module (#11138)
* adding a geometry module

* fixing errors and adding type hints

* Create code_review_feedback.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* implementing suggestions

* fixing ruff errors

* Update geometry/code_review_feedback.py

* Update geometry/code_review_feedback.py

* Update geometry/geometry.py

* Apply suggestions from code review

* Delete geometry/code_review_feedback.py

* Update geometry/geometry.py

* Update geometry/geometry.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-24 19:00:21 +01:00