From: Ian Jackson Date: Sat, 4 Nov 2017 23:46:35 +0000 (+0000) Subject: introduce cp1scale, cp2scale X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=93ffb9cf26341b1d017a1d0fb2483f9f45cff886;p=moebius3.git introduce cp1scale, cp2scale Signed-off-by: Ian Jackson --- 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): '''