Skip to main content

Complete 2D shapes (Point, Line, Circle, Rectangle, Square, Rhombus, Parallelogram, Triangle, Ellipse)

Project description

📦 GeomLib - Advanced Geometry Library

A powerful and easy-to-use Python library for performing 2D and 3D geometric computations.


✨ Features

🔷 2D Geometry

  • Point, Line, Circle
  • Square, Rectangle, Rhombus
  • Parallelogram, Triangle, Ellipse

🔶 3D Geometry

  • Point3D, Sphere
  • Cube, Cuboid
  • Cylinder, Cone

📐 Mathematical Operations

  • Area, Perimeter
  • Volume, Surface Area
  • Distance calculations

🔍 Geometric Relations

  • Intersection checking
  • Containment tests

🔄 Transformations

  • Translation
  • Rotation
  • Scaling

➕ Vector Operations

  • Dot product
  • Cross product
  • Magnitude
  • Normalization

📥 Installation

Install directly from PyPI:

pip install geomlib-advanced

🚀 Quick Start

from geomlib import Point, Circle, Rectangle, Sphere

# -------------------
# 2D Geometry
# -------------------
circle = Circle(center=Point(0, 0), radius=5)

print("Circle Area:", circle.area())          # 78.54
print("Circle Perimeter:", circle.perimeter()) # 31.42

# -------------------
# 3D Geometry
# -------------------
sphere = Sphere(center=(0, 0, 0), radius=3)

print("Sphere Volume:", sphere.volume())           # 113.10
print("Sphere Surface Area:", sphere.surface_area())  # 113.10

# -------------------
# Shape Relationships
# -------------------
rect = Rectangle(Point(0, 0), width=10, height=5)

print("Point inside rectangle:", rect.contains(Point(2, 2)))  # True

💡 Example Output

Circle Area: 78.54
Circle Perimeter: 31.42
Sphere Volume: 113.10
Sphere Surface Area: 113.10
Point inside rectangle: True

📚 Use Cases

  • Educational purposes (learning geometry)
  • Competitive programming
  • Game development (collision detection)
  • Computer graphics and simulations
  • AI/ML projects involving spatial data

⚙️ Requirements

  • Python 3.7+

🛠️ Installation from Source

git clone https://github.com/007arjungangwar/geomlib.git
cd geomlib
pip install .

🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Arjun Singh Gangwar


⭐ Support

If you find this project useful, consider giving it a ⭐ on GitHub!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geomlib_advanced-0.0.2.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geomlib_advanced-0.0.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file geomlib_advanced-0.0.2.tar.gz.

File metadata

  • Download URL: geomlib_advanced-0.0.2.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for geomlib_advanced-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1f34b3ee5d771cba9ad5a6f73f3c62d4826b9f1ef264518853532770d3122e0e
MD5 5a63d8a8fd6b954844ad9d5f2041575b
BLAKE2b-256 46716c347c128b31d4c062339c50a66ec57eb774606a2a3c9bde27a0606e617c

See more details on using hashes here.

File details

Details for the file geomlib_advanced-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for geomlib_advanced-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 606636762b5ec2ae28e51874bb793081dd0f8b6daa39c2f386249cd61683d455
MD5 2fd2bc30b66ea546e69012fd8357058b
BLAKE2b-256 9c733e2fc2e79ab54f1b85b3f560e53de363aaf5e2d295a543d70ac3d64e03d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page