From: Ian Jackson Date: Sat, 30 Dec 2017 12:34:04 +0000 (+0000) Subject: helixish: get sense of phi right X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=94c25a51f3a6bbfcd93fd04934369235878e8bf9;p=moebius3.git helixish: get sense of phi right In "Railway problem", phi is the direction we _leave_ Q. Whereas in our original representation, we have a direction vector in the positive sense of the parameter (ie, for Q, the arrival direction). Signed-off-by: Ian Jackson --- diff --git a/helixish.py b/helixish.py index 17922d6..ecbc79a 100644 --- a/helixish.py +++ b/helixish.py @@ -102,7 +102,7 @@ class HelixishCurve(): railway_angleoffset = atan2(*q_plane[0:2]) # these two angles are unconventional: clockwise from north railway_theta = tau/4 - (atan2(*dp_plane[0:2]) - railway_angleoffset) - railway_phi = tau/4 - (atan2(*dq_plane[0:2]) - railway_angleoffset) + railway_phi = tau/4 - (atan2(*-dq_plane[0:2]) - railway_angleoffset) railway_cos_theta = cos(railway_theta) railway_cos_phi = cos(railway_phi)