Skip to main content

Disparate utilities for calculating coordinates and other elements of geometric constructions

Project description

Geometry Calculator

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


Table of Contents

Example

# Calculates an orthonormal basis of a space that spans a given set of
# points

import math
from pavpen.geometry_calculator.vector_field_implementations.tuple_vector_field_float_operations import (
    TupleVectorFieldFloatOperations,
)

result = OrthonormalBasisCalculator(
    vector_field_operations=TupleVectorFieldFloatOperations.for_3d(),
    float_tolerance=1e-8,
    points=((0, 0, 0), (0, 2, 0), (0, 0, -2)),
).calculate().basis_vectors

assert result == [(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 TupleVectorFieldFloatOperations.for_3d() returns an object which treats a tuple[float, float, float] as a 3-dimensional orthonormal vector.

Install

pip install pavpen-geometry-calculator

License

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

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.0.tar.gz (12.8 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.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pavpen_geometry_calculator-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 6134f059cfbbd9946a7ffda1833ae45329bf32bfe1d5109424c4e5e15e2bd65a
MD5 d950f3c18218f2bdf188be6e1a606cc6
BLAKE2b-256 2b2b98f110ea74e839e4f5bccabb38c341516ccb83fcc86dd52149240594600c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pavpen_geometry_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27a718d48289a9b8c99c4d457e91b3f2ab4e298334e677f9bfaf1fb2b04d6b25
MD5 c7a2b2b63ccc01d6593b3229529aa02b
BLAKE2b-256 7c2559d9c79f9a31aa63cfe097c1c7ce51031dcd4a0c31a44a5bae9c4a34e108

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