From 0293c17b3bf5b2d20513b7dc4a18ce6561b186a3 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Mon, 16 Nov 2020 13:05:52 +0400 Subject: [PATCH] Reduce line widths in AABB and projection demos --- geom/demos/aabb.py | 10 +++++----- geom/demos/vec_proj.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/geom/demos/aabb.py b/geom/demos/aabb.py index c2b2dbf..00aeee7 100644 --- a/geom/demos/aabb.py +++ b/geom/demos/aabb.py @@ -45,10 +45,10 @@ class AABBDistance: distance = length(gap_x, gap_y) text_screen(surface, WHITE, (10, HEIGHT - 20), f"Distance: {distance}") - rect_a.draw(surface, YELLOW, 4) - rect_b.draw(surface, WHITE, 4) + rect_a.draw(surface, YELLOW, 1) + rect_b.draw(surface, WHITE, 1) line(surface, RED if distance < 0 else GREEN, - rect_a.get_center(), rect_b.get_center(), 2) + rect_a.get_center(), rect_b.get_center()) class PointAABBDistance: @@ -86,6 +86,6 @@ class PointAABBDistance: distance = length(gap_x, gap_y) text_screen(surface, WHITE, (10, HEIGHT - 20), f"Distance: {distance}") - rect_a.draw(surface, YELLOW, 4) + rect_a.draw(surface, YELLOW, 1) line(surface, RED if distance < 0 else GREEN, - rect_a.get_center(), (cx, cy), 2) + rect_a.get_center(), (cx, cy)) diff --git a/geom/demos/vec_proj.py b/geom/demos/vec_proj.py index 252a27b..4574a31 100644 --- a/geom/demos/vec_proj.py +++ b/geom/demos/vec_proj.py @@ -26,7 +26,7 @@ class VecProj: proj = dot(lcx, lcy, lx, ly) / llen nearest_point = add(x1, y1, *scale(lnx, lny, proj)) - line(surface, GREEN, (cx, cy), nearest_point, 5) - line(surface, WHITE, (cx, cy), (x1, y1), 5) - line(surface, YELLOW, (x1, y1), (x2, y2), 5) - line(surface, RED, (x1, y1), nearest_point, 5) + line(surface, GREEN, (cx, cy), nearest_point, 2) + line(surface, WHITE, (cx, cy), (x1, y1), 2) + line(surface, YELLOW, (x1, y1), (x2, y2), 2) + line(surface, RED, (x1, y1), nearest_point, 4)