From 93ffb9cf26341b1d017a1d0fb2483f9f45cff886 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Nov 2017 23:46:35 +0000 Subject: [PATCH] introduce cp1scale, cp2scale Signed-off-by: Ian Jackson --- moebius.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/moebius.py b/moebius.py index 37b7676..0fd9ce3 100644 --- a/moebius.py +++ b/moebius.py @@ -66,9 +66,12 @@ class MoebiusHalf: theta = u * tau cp = [None] * 4 cp[0] = m.edge .point(theta) - cp[1] = cp[0] + 0.75 * m.edge .dirn (theta) cp[3] = m.midline.point(theta*2) - cp[2] = cp[3] + np.linalg.norm(cp[3]) * m.midline.dirn (theta*2) + ncp3 = np.linalg.norm(cp[3]) + cp2scale = ncp3 + cp1scale = 0.75 + cp[1] = cp[0] + cp1scale * m.edge .dirn (theta) + cp[2] = cp[3] + cp2scale * m.midline.dirn (theta*2) return BezierSegment(cp) def point(m, iu, t): ''' -- 2.30.2