Skip to main content

Disparate utilities for calculating coordinates and other elements of geometric constructions

Project description

Geometry Calculator

Measure test coverage Code coverage report

Calculate coordinates, and other elements of a collection of geometric constructions.


Table of Contents

Example

>>> # Calculate an orthonormal basis of a space that spans a given set of
>>> # points
>>>
>>> import math
>>> from pavpen.geometry_calculator import OrthonormalBasisCalculator
>>> from pavpen.geometry_calculator.vector_field_implementations import (
...    TupleFloatVectorFieldOperations,
... )
>>>
>>> OrthonormalBasisCalculator(
...    vector_field_operations=TupleFloatVectorFieldOperations.for_3d(),
...    float_tolerance=1e-8,
...    points=((0, 0, 0), (0, 2, 0), (0, 0, -2)),
... ).calculate().basis_vectors
[(0.0, 1.0, 0.0), (0.0, 0.0, -1.0)]

Notes

  • Algebraic operations are separate from the objects storing vectors. This allows treating existing objects as vectors without having to modify their inheritance hierarchy, or wrap them.
    • In the above example TupleFloatVectorFieldOperations.for_3d() returns an object which treats a tuple[float, float, float] as a 3-dimensional orthonormal vector.

Installation

pip install pavpen-geometry-calculator

License

Geometry Calculator is distributed under the terms of the MIT license.

Documentation

See the API documentation site.

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

pavpen_geometry_calculator-0.2.0.tar.gz (115.0 kB view details)

Uploaded Source

Built Distribution

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

pavpen_geometry_calculator-0.2.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file pavpen_geometry_calculator-0.2.0.tar.gz.

File metadata

  • Download URL: pavpen_geometry_calculator-0.2.0.tar.gz
  • Upload date:
  • Size: 115.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.4 HTTPX/0.28.1

File hashes

Hashes for pavpen_geometry_calculator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 378be52b6378b7760d2ace75637b18c34589dd156626908fc1ebb4fc44d93e26
MD5 57f91902a996877a73de54b5e5d69c11
BLAKE2b-256 bf27aeb52a113b73f2eb0b50cc3a57399d1bd6a802d3300166bccf1f564ca6c5

See more details on using hashes here.

File details

Details for the file pavpen_geometry_calculator-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pavpen_geometry_calculator-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 483ba431cca0b15085788f1ea05e9ad817ee9d5a9a9fa3ede3839509edbda99f
MD5 ea3b796f82232bf8b65d9bdf4b542028
BLAKE2b-256 414bcebb427f78775c086c2fca802b76a53b3b4c59cf9734b83c789d281a2cac

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