Skip to main content

Python library for 2d/3d coordinate geometry

Project description

utnamgeo

Python library to solve 2d/3d coordinate geometry

utnamtte

Installation

pip install utnamgeo

Requirements

pip install utnamtte

Ways to import

Method 1

import utnamgeo
print(utnamgeo.area_3d(...))

Method 2

from utnamgeo import area
print(area(...))

Method 3

from utnamgeo import area as xy
print(xy(...))

Centroid_2d

# Centroid_2d(x1, y1, x2, y2, x3, y3)
a = utnamgeo.Centroid_2d(0, 2,  3, 7, 6, 3)
print("x coordinate:",a.x)
print("y coordinate:",a.y)
Output: 3
        4

Centroid_3d

# Centroid_3d(x1, y1, z1, x2, y2, z2, x3, y3, z3)
a = utnamgeo.Centroid_3d(0, 2, 11, 3, 7, 4, 6, 3, 6)
print("x coordinate:",a.x)
print("y coordinate:",a.y)
print("z coordinate:",a.z)
Output: 3
        4
        7

Orthocentre_2d

# Orthocentre_2d(x1, y1, x2, y2, x3, y3)
a = utnamgeo.Orthocentre_2d(2,5,2,8,14,5)
print("x coordinate:",a.x)
print("y coordinate:",a.y)
Output: 2
        5

Orthocentre_3d

# Orthocentre_3d(x1, y1, z1, x2, y2, z2, x3, y3, z3)
a = utnamgeo.Orthocentre_3d(2, -5, -3, 2, 7, -3, 14, -5, 6)
print("x coordinate:",a.x)
print("y coordinate:",a.y)
print("z coordinate:",a.z)
Output: 2
       -5
       -3

▶️ Package's YouTube tutorial here

Change Log

0.0.1 (17/06/2023)

  • First Release

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

utnamgeo-0.0.1.tar.gz (7.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page