Skip to content

Instantly share code, notes, and snippets.

View fPkX6F1nGTX's full-sized avatar

Seth Bradford Wagenman fPkX6F1nGTX

View GitHub Profile
@fPkX6F1nGTX
fPkX6F1nGTX / pointTriangleDistance.py
Created August 13, 2021 14:00 — forked from joshuashaffer/pointTriangleDistance.py
Computes the distance between a point an triangle. Python.
#!/usr/bin/env python
#
# Tests distance between point and triangle in 3D. Aligns and uses 2D technique.
#
# Was originally some code on mathworks
import numpy
from numpy import dot
from math import sqrt