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.1.1.dev46.tar.gz (115.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file pavpen_geometry_calculator-0.1.1.dev46.tar.gz.

File metadata

File hashes

Hashes for pavpen_geometry_calculator-0.1.1.dev46.tar.gz
Algorithm Hash digest
SHA256 ceffc2264ecffcbf429b5de599fcfbee34c7971889beab520b2b4dbe1dc38821
MD5 a41085fa4d27878014cbb6f8cce61e46
BLAKE2b-256 6f31a0126f4f96eb5021315b6dd7dd9123151a0e14be1d40e4a71ea8dd2b6889

See more details on using hashes here.

File details

Details for the file pavpen_geometry_calculator-0.1.1.dev46-py3-none-any.whl.

File metadata

File hashes

Hashes for pavpen_geometry_calculator-0.1.1.dev46-py3-none-any.whl
Algorithm Hash digest
SHA256 8760b99a0c9b208eb32c36f3284f4c1dd1182b748028f2ce4cd9aef90908b50b
MD5 7faaa1f0d0ca316cb4a1d52257caa361
BLAKE2b-256 527cab02fb346a74c1ebd28061839757e599bee111c4de2b5300dd47dd1c4519

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