Cylinder
class Cylinder @JvmOverloads constructor(val position: Point = Point.ORIGIN, val radius: Double = 1.0, val height: Double = 1.0, val vertices: Int = 20) : Shape
A cylindrical shape created by extruding a circular cross-section along the z-axis.
The circular base is approximated as a regular polygon; the vertices parameter controls the resolution of that approximation. Higher values produce a smoother appearance at the cost of more polygons.
Parameters
position
The center of the base circle (default Point.ORIGIN)
radius
The radius of the circular cross-section (must be positive, default 1.0)
height
The extent along the z-axis (must be positive, default 1.0)
vertices
The number of sides used to approximate the circle (minimum 3, default 20). Higher values produce a smoother cylinder but generate more polygons.