- #1
Simon666
- 93
- 0
Does anyone know a good algorithm for calculating the closest points/distance between two line segments? I use some pretty general code:
http://geomalgorithms.com/a07-_distance.html
which works in most cases but fails horribly when line segments are nearly parallel. I've been messing with the SMALL_NUM value for division overflow to no avail. The calculated distance can still vary widely when nearly parallel.
http://geomalgorithms.com/a07-_distance.html
which works in most cases but fails horribly when line segments are nearly parallel. I've been messing with the SMALL_NUM value for division overflow to no avail. The calculated distance can still vary widely when nearly parallel.