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.1.tar.gz (117.4 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.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pavpen_geometry_calculator-0.2.1.tar.gz
  • Upload date:
  • Size: 117.4 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.1.tar.gz
Algorithm Hash digest
SHA256 2baf9238f3626e8c0c93e2a6c76b996a0ccdd71936ee437a435fe53c1d97bb4b
MD5 226bbd70c1135d158db8e0b0ecc5f123
BLAKE2b-256 8e3a3b963ce3054d2213cb4ecd38ada15a606881a4b4fdecb471e50a76bf7d79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pavpen_geometry_calculator-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca4d9a06f4e60798b5cbe5a175335e1c9f4e053ff821a86bda6762fafa3aeb1
MD5 689e9d79d0a1f772dc05f2c33429ffb9
BLAKE2b-256 a06dc92040696b1f5a2b058c2d2cfed9c33f99fe5b0cf4904066c062e9aa6ee6

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