#:use-module (dungeon-master geom triangle)
#:export (bowyer-watson))
-"Compute the Delaunay triangulation using Bowyer–Watson algorithm"
+"
+Compute the Delaunay triangulation using Bowyer–Watson algorithm
+https://en.wikipedia.org/wiki/Bowyer-Watson_algorithm
+"
(define (bowyer-watson vertices)
(receive (minx miny maxx maxy)
(let ((frame (list c1 c2 c3 c4)))
(receive (points triangles)
(calculate-triangulation
- (list c1 c2 c3 c4)
+ (list c4 c3 c2 c1)
(list (make-triangle c1 c2 c3)
(make-triangle c2 c3 c4))
vertices)