Skip to main content

Python Package for Geometry

Project description

pygeom

Geometry Definition and Calculation Package for Python

Contains:

  1. 2D and 3D vectors for vector dot products using "*" and vector cross products using "**".
  2. 2D and 3D cubic splines for calculating the various directions and curvatures at every point.
  3. 2D and 3D transformations and coordinate systems for transforming vectors and points.

Vector Example Code:

# Import Vector Class
from pygeom.geom3d import Vector

# Vector object creation
vec1 = Vector(2.0, 3.0, 1.0)
print(f'vec1 = {vec1:g}')

# Multiply vector by a scalar
vec2 = 2*vec1
print(f'vec2 = {vec2:g}')

# Vector attributes are x, y, and z
vec3 = Vector(vec2.y, vec2.z, vec2.z)
print(f'vec3 = {vec3:f}')

# Vector cross product
vec4 = vec1.cross(vec2)
print(f'vec4 = {vec4:g}')

# Vector cross product
vec5 = vec1.cross(vec3)
print(f'vec5 = {vec5:g}')

# Vector dot product
scal = vec1.dot(vec2)
print(f'scal = {scal:g}')

# Get vector magnitude
mag = vec5.return_magnitude()
print(f'mag = {mag:g}')

# Get the unit vector
uvec = vec5.to_unit()
print(f'uvec = {uvec:f}')

Vector Example Output:

vec1 = <2, 3, 1>
vec2 = <4, 6, 2>
vec3 = <6.000000, 2.000000, 2.000000>
vec4 = <0, 0, 0>
vec5 = <4, 2, -14>
scal = 28
mag = 14.6969
uvec = <0.27217, 0.13608, -0.95258>

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

pygeom-0.0.14.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

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

pygeom-0.0.14-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file pygeom-0.0.14.tar.gz.

File metadata

  • Download URL: pygeom-0.0.14.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pygeom-0.0.14.tar.gz
Algorithm Hash digest
SHA256 111503ec10d5853895ff8ccdf61949e883bca43439cfec9cf0f431da6198d078
MD5 2c75c009f37be88eaec8c236df5b099b
BLAKE2b-256 2c6b6cbddc71cd58219851b7108450922777c2cec39c25538875dd838ff49fd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygeom-0.0.14.tar.gz:

Publisher: publish-to-pypi.yml on Xero64/pygeom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygeom-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: pygeom-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pygeom-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 003b04a52314cc2400b0c9548afd8b39947ed9b1a6c0b259f475076dc161c354
MD5 2ae45cd274d7b7dd450b96f0b714502e
BLAKE2b-256 ab0f76983d51f9b287be679cd9f0d2cc90fb6f1c88c50a7bfef424fe003febcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygeom-0.0.14-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Xero64/pygeom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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