Render a cylinder.

This function draws a cylinder with the center of its base at the origin (0,0,0) and its height in the positive y-direction.

syntax

cylinder(radius, height)

parameters

radius radius of the base of the cylinder
height height of the cylinder

optional arguments

style rendering style: "wireframe" (default) or "solid"
texture Texture object(s)

examples

draw a wireframe cylinder

def display():
   lighting(False)
   color(1.0, 1.0, 1.0)
   cylinder(1.0, 4.0)

draw a solid cylinder

def display():
   lighting(True)
   material(1.0, 1.0, 1.0)
   cylinder(1.0, 4.0, style='solid')