# File: p3d_coordbipolcyl.py # Author: Petr Sorfa # Desc: A parametric surface import am # import the Animation Master extension import math # import the math extension am.begin() # Initialize the AM session a = 1.0 for wi in range(1): w = wi + 1.0 am.surface_begin() for ui in range(10): u = ui*2.0*math.pi/9.0 row = [] for vi in range(10): v = vi*3.0/9.0 - 1.5 if (abs(v) < 0.2): # Prevent an error condition python v = v*0.5/abs(v) x = (a*math.sinh(v))/(-math.cos(u) + math.cosh(v)) y = (a*math.sin(u))/(-math.cos(u) + math.cosh(v)) z = math.sin (vi*math.pi/9.0) row += [x, y, z] am.surface_add(row) am.surface_end() am.end() # Finish the AM session