From 72d025c1f8c62467496bb4e659d75033dbebaad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 20:24:25 +0300 Subject: [PATCH] explain heuristic --- IV/wm.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IV/wm.sql b/IV/wm.sql index b0c4cd9..34c2527 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -194,8 +194,10 @@ begin -- distance from head's 1st vertex should be larger than from 2nd vertex exit when st_distance(ptail, phead[2]) < st_distance(ptail, phead[3]); - -- bend with smaller baseline wins when two neighboring bends can - -- have gentle inflections. + -- Between two bends, bend with smaller baseline wins when two + -- neighboring bends can have gentle inflections. This is a heuristic + -- that can be safely removed, but in practice has shown to avoid + -- creating some very bendy lines. exit when st_distance(st_pointn(bends[i], 1), st_pointn(bends[i], -1)) < st_distance(st_pointn(bends[i-1], 1), st_pointn(bends[i-1], -1));