cylinder
Generate coordinate matrices for a unit cylinder.
Syntax
Section titled “Syntax”[X, Y, Z] = cylinder[X, Y, Z] = cylinder(r)[X, Y, Z] = cylinder(r, n)Description
Section titled “Description”Returns coordinate matrices for a cylinder. Optional r (a scalar or radius profile vector) controls radius along the height — a constant for a regular cylinder, varying for a vase / horn / cone shape. Default n = 20 faces.
Examples
Section titled “Examples”[X, Y, Z] = cylinder(1);[X, Y, Z] = cylinder([1 0.5 1]); % hourglass profile