public synchronized void cylinder (double base_radius, 
    double top_radius, double height, int slices, int stacks) {

    this.base_radius = base_radius;
    this.top_radius = top_radius;
    this.height = height;
    this.slices = slices;
    this.stacks = stacks;

    dr = (top_radius - base_radius) / stacks;
    dtheta = 2.0 * Math.PI / slices;
    dz = height / stacks;
    nsign = orientation == INSIDE ? -1.0f : 1.0f;
    nz = (base_radius - top_radius) / height;

    switch (draw_style) {
    case FILL: cylinder_fill (); break;
    case LINE: cylinder_line (); break;
    case SILHOUETTE: cylinder_silhouette (); break;
    default: throw new java.lang.Error ("");
    }
  }