chiark / gitweb /
show Half nature
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Nov 2017 22:14:46 +0000 (22:14 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Nov 2017 22:15:44 +0000 (22:15 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
check.py
moebius.py

index 6bcf1a11de0cedb5b23e2b9f98a4bb5b500b3253..226825cb305cac352823542c4a5377f938f6aed3 100644 (file)
--- a/check.py
+++ b/check.py
@@ -10,7 +10,7 @@ from moebius import *
 
 n_u = 40
 
-m = Moebius(n_u)
+m = MoebiusHalf(n_u)
 
 ts = np.linspace(0, 1, 40)
 
@@ -24,4 +24,4 @@ for ix_u in range(0, n_u):
 
 for t in ts:
   c3 = curve( color=color.yellow, pos = [ m.point(ix_u, t)
-                                          for ix_u in range(0, n_u+1) ] )
+                                          for ix_u in range(0, n_u/2+1) ] )
index 8986fd2be3777ccca192538805c39edbd8deb228..f40ed016309d60e8e22f0d1a1f51d79f21816add 100644 (file)
@@ -51,11 +51,11 @@ class Twirler(ParametricCircle):
     r = tw.radius(theta)
     return cos(zeta) * r + sin(zeta) * tw._axis
 
-class Moebius:
+class MoebiusHalf:
   def __init__(m, n_u):
     '''
-     Moebius().edge is a Twirler for the edge,
-      expecting theta = u * tau (see Moebius().point)
+     MoebiusHalf().edge is a Twirler for the edge,
+      expecting theta = u * tau (see MoebiusHalf().point)
       with dirn pointing into the surface
     '''
     m.edge    = Twirler(origin,  unit_z, unit_x, -2, tau/2)