# File: p3d_boehemiandome.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 = 0.5 b = 1.5 c = 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*2.0*math.pi/9.0 x = a*math.cos(u) y = b*math.cos(v)+a*math.sin(u) z = c*math.sin(v) row += [x, y, z] am.surface_add(row) am.surface_end() am.end() # Finish the AM session