# File: p3d_cylinder.py # Author: Petr Sorfa # Desc: A parametric surface that produces a simple cylinder import am # import the Animation Master extension import math # import the math extension am.begin() # Initialize the AM session am.surface_begin() for ui in range(20): u = ui*2.0*math.pi/19.0 v = 4.0 row = [] for wi in range(2): w = wi x = math.sin(u) y = math.cos(u) z = w*v row += [x, y, z] am.surface_add(row) am.surface_end() am.end() # Finish the AM session