thi.ng.geom.triangle/circumcircle-raw returns nil for points that are the same:
(circumcircle-raw [0.5 0.5] [0.5 0.5] [0.5 0.5])
=> nil
causing a NPE in thi.ng.geom.utils.delaunay/triangle-spec :
(alter-meta! #'td/triangle-spec update :private not)
(td/triangle-spec [0.5 0.5] [0.5 0.5] [0.5 0.5])
Execution error (NullPointerException) at thi.ng.geom.utils.delaunay/triangle-spec (delaunay.cljc:40).
null
I can think of these options:
circumcircle-raw could return a zero-radius circle in this case - no errors but maybe undesirable
- check for zero radius in
triangle-spec and warn - slower but more friendly
- add docstring warning in
triangulate - at least users would be able to find out why