From fb2c26e5ff8c21fa68b7f4375dfcb419524505b8 Mon Sep 17 00:00:00 2001 From: niksirbi Date: Fri, 10 Nov 2023 11:38:32 +0000 Subject: [PATCH] make circle polygons smoother --- wazp/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wazp/utils.py b/wazp/utils.py index 573bb38..da71640 100644 --- a/wazp/utils.py +++ b/wazp/utils.py @@ -893,7 +893,7 @@ def _get_points_on_circle( """ Returns the coordinates of n points equally spaced on a circle. The angle between two points is 2*pi/n radians. The number of points n - is at least 8, and is chosen proportional to the mean radius of the circle. + is at least 12, and is chosen proportional to the mean radius of the circle. Parameters ---------- @@ -913,7 +913,7 @@ def _get_points_on_circle( as evidenced by the radius being a tuple of two floats (x-radius, y-radius). """ mean_radius = (radius[0] + radius[1]) / 2 - n = 2 * math.floor(mean_radius / 200) + 8 + n = 2 * math.floor(mean_radius / 150) + 12 angle = 2 * math.pi / n x, y = center points = []