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
>>> # 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 atuple[float, float, float]as a 3-dimensional orthonormal vector.
- In the above example
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pavpen_geometry_calculator-0.1.1.dev46.tar.gz.
File metadata
- Download URL: pavpen_geometry_calculator-0.1.1.dev46.tar.gz
- Upload date:
- Size: 115.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.4 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceffc2264ecffcbf429b5de599fcfbee34c7971889beab520b2b4dbe1dc38821
|
|
| MD5 |
a41085fa4d27878014cbb6f8cce61e46
|
|
| BLAKE2b-256 |
6f31a0126f4f96eb5021315b6dd7dd9123151a0e14be1d40e4a71ea8dd2b6889
|
File details
Details for the file pavpen_geometry_calculator-0.1.1.dev46-py3-none-any.whl.
File metadata
- Download URL: pavpen_geometry_calculator-0.1.1.dev46-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.4 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8760b99a0c9b208eb32c36f3284f4c1dd1182b748028f2ce4cd9aef90908b50b
|
|
| MD5 |
7faaa1f0d0ca316cb4a1d52257caa361
|
|
| BLAKE2b-256 |
527cab02fb346a74c1ebd28061839757e599bee111c4de2b5300dd47dd1c4519
|