From: Ian Jackson Date: Sat, 30 Dec 2017 13:51:29 +0000 (+0000) Subject: helixish: debugging output X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4556056fc6bcc421ecaee7cb61559827169e914c;p=moebius3.git helixish: debugging output Signed-off-by: Ian Jackson --- diff --git a/helixish.py b/helixish.py index 971c896..4d02275 100644 --- a/helixish.py +++ b/helixish.py @@ -124,6 +124,9 @@ class HelixishCurve(): ] railway_roots = np.roots(railway_polynomial) dbg('railway poly, roots:', railway_polynomial, railway_roots) + + vdbg_railway.circle([0,0,0], [0,0, dist_pq_plane], color=(.5,0,0)) + for railway_r_pq1 in railway_roots: # roots for r are calculated based on coordinates where # Q is at (1,0) but our PQ distance is different @@ -134,12 +137,17 @@ class HelixishCurve(): railway_polynomial[2] ) + vdbg_railway.circle([0,0,0], [0,0, railway_r], color=(1,0,0)) + def railway_CPQ(pq, dpq, railway_r): CPQ = pq + railway_r * np.array([-dpq[1], dpq[0]]) dbg('railway_CPQ', railway_r, pq, dpq, CPQ) vdbg_plane.circle( np.hstack((CPQ, [0])), [0, 0, railway_r], color = (1,1,1) ) + vdbg_plane.circle( np.hstack(( 2*np.asarray(pq) - CPQ, [0])), + [0, 0, railway_r], + color = (.5,.5,.5) ) return CPQ railway_CP = railway_CPQ([0,0], dp_plane, railway_r)