cylinder
Creates a new cylinder.
Syntax
-
cylinder([a[, f[, d[, α]]]])
-
a
is a three-dimensional real vector -
f
is a three-dimensional real vector -
d
is a three-dimensional real vector -
α
is a real number
-
Description
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.
Hence,
-
a
specifies the position of centre of the cylinder’s bottom opening. -
f = (s, t, h)
specifies the half-axis lengthss
andt
and heighth
of the cylinder. -
d
specifies the axis of the cylinder. -
α
specifies the rotation of the cylinder 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.
Examples
cylinder()
cylinder(❨5, 5, 0❩, ❨.5, .5, 10❩, ❨−.2, .1, 1❩)
cylinder(❨0, 0, 0❩, ❨1, 1, 5❩); AdjustVisual(ans, "show parameter curves": true)
Notes
To create a solid cylinder, use solid("cylinder")
instead.