Algosim documentation: cylinder


Creates a new cylinder.



cylinder() creates a circular cylinder (quadratic surface) with radius 1 and height 1 parallel to the z axis, extending from z = 0 to z = 1.

cylinder(a, f, d, α) translates the cylinder by a, scales it by diag(f), aligns it with d, and rotates it an amount α about its axis.


If omitted, a defaults to ❨0, 0, 0❩, f to ❨1, 1, 1❩, d to ❨0, 0, 1❩, and α to 0.

The object is shown in the current scene and a reference to the object is returned.

The AdjustVisual function can be used to adjust the appearance of the cylinder. See Visual settings for a list of applicable settings.



Image 1

cylinder(❨5, 5, 0❩, ❨.5, .5, 10❩, ❨−.2, .1, 1❩)

Image 2

cylinder(❨0, 0, 0❩, ❨1, 1, 5❩);
AdjustVisual(ans, "show parameter curves": true)

Image 3


To create a solid cylinder, use solid("cylinder") instead.

See also