From 6821d6cb535b1f0b2b7be7eae8845ca6eed6c49e Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Mon, 19 Dec 2022 23:28:26 -0800 Subject: [PATCH] Add further algo notes --- chameleonic.p8 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chameleonic.p8 b/chameleonic.p8 index f594227..3993ee0 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -1108,6 +1108,14 @@ function rope:_drag1(n1,ax1_new,ay1_new) -- Really our goal is to figure out if moving the end of the -- path crosses over the anchor, which feels like a point/triangle -- collision + -- We also want to pick the anchor that the ray sweeps over first, not + -- the closest one. + -- Maybe we should + -- (1) sort by angle difference from the original line + -- (2) ignore cases where the angle is not between the two lines + -- (3) ignore cases where the created point is further from the original point + -- than the _intended_ one would be + -- _in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and _which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) != _which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)