primitiveCylinder

Syntax

  • primitiveCylinder()
  • primitiveCylinder(sides)
  • primitiveCylinder(sides, radius, height)

Parameters

  1. sidesfloat
    Number of subdivisions of the cylindrical surface. There must be at least 3 sides. The default value is 16.
  2. radiusfloat
    Radius of the cylinder.
  3. heightfloat
    Height of the cylinder.

Description

The primitiveCylinder operation inserts a cylinder geometry into the scope of the current shape.

  • If radius and height aren’t given the bounding box coincides with the scope. Zero scope sizes are handled the same way as in the i operation.
  • If dimensions are specified the cylinder is positioned in the xz-center of the scope lying on y=0.

The cylinder has texture coordinates on the first texture layer (COLORMAP).

Examples

The inserted cylinder has 16 sides and is fit into the current scope. The scope’s zero size is modified relative to the average of the two non-zero sizes.

Lot-->
   primitiveCylinder()
   texture("builtin:uvtest.png")
Cylinder with 16 sides fit into scope

The inserted cylinder has 8 sides, a radius of 10, a height of 15 and is positioned in the xz center.

Lot-->
   primitiveCylinder(8,10,15)
   texture("builtin:uvtest.png")
Cylinder with 8 sides positioned in the xz center

Was this article helpful?