The TikZ and PGF Packages
Manual for version 3.1.10
Libraries
40 Three Dimensional Drawing Library¶

TikZ Library 3d ¶
\usetikzlibrary{3d} %
LaTeX
and plain
TeX
\usetikzlibrary[3d] % ConTeXt
This package provides some styles and options for drawing three dimensional shapes.
40.1 Coordinate Systems¶

Coordinate system xyz cylindrical ¶

/tikz/cs/angle=⟨degrees⟩ (no default, initially 0)

/tikz/cs/radius=⟨number⟩ (no default, initially 0)

/tikz/cs/z=⟨number⟩ (no default, initially 0)
The xyz cylindrical coordinate system allows to you specify a point in terms of cylindrical coordinates, sometimes also referred to as cylindrical polar coordinates or polar cylindrical coordinates. It is very similar to the canvas polar and xy polar coordinate systems with the difference that you provide an elevation over the \(xy\)plane using the z key.
The angle of the coordinate interpreted in the ellipse whose axes are the \(x\)vector and the \(y\)vector.
A factor by which the \(x\)vector and \(y\)vector are multiplied prior to forming the ellipse.
Factor by which the \(z\)vector is multiplied.

Coordinate system xyz spherical ¶

/tikz/cs/radius=⟨number⟩ (no default, initially 0)

/tikz/cs/latitude=⟨degrees⟩ (no default, initially 0) ¶

/tikz/cs/longitude=⟨degrees⟩ (no default, initially 0) ¶

/tikz/cs/angle=⟨degrees⟩ (no default, initially 0)
The xyz spherical coordinate system allows you to specify a point in terms of spherical coordinates.
Factor by which the \(x\), \(y\), and \(z\)vector are multiplied.
Angle of the coordinate between the \(y\) and \(z\)vector, measured from the \(y\)vector.
Angle of the coordinate between the \(x\) and \(y\)vector, measured from the \(y\)vector.
Same as longitude.
40.2 Coordinate Planes¶
Sometimes drawing with full three dimensional coordinates is not necessary and it suffices to draw in two dimensions but in a different coordinate plane. The following options help you to switch to a different plane.
40.2.1 Switching to an arbitrary plane¶

/tikz/plane origin=⟨point⟩ (no default, initially (0,0)) ¶
Origin of the plane.

/tikz/plane x=⟨point⟩ (no default, initially (1,0)) ¶
Unit vector of the \(x\)direction in the new plane.

/tikz/plane y=⟨point⟩ (no default, initially (0,1)) ¶
Unit vector of the \(y\)direction in the new plane.

/tikz/canvas is plane(no value) ¶
Perform the transformation into the new canvas plane using the units above. Note that you have to set the units before calling canvas is plane.
40.2.2 Predefined planes¶

/tikz/canvas is xy plane at z=⟨dimension⟩(no default) ¶

• plane origin={(0,0,⟨dimension⟩)},

• plane x={(1,0,⟨dimension⟩)}, and

• plane y={(0,1,⟨dimension⟩)}.
A plane with

/tikz/canvas is yx plane at z=⟨dimension⟩(no default) ¶

• plane origin={(0,0,⟨dimension⟩)},

• plane x={(0,1,⟨dimension⟩)}, and

• plane y={(1,0,⟨dimension⟩)}.
A plane with

/tikz/canvas is xz plane at y=⟨dimension⟩(no default) ¶

• plane origin={(0,⟨dimension⟩,0)},

• plane x={(1,⟨dimension⟩,0)}, and

• plane y={(0,⟨dimension⟩,1)}.
A plane with

/tikz/canvas is zx plane at y=⟨dimension⟩(no default) ¶

• plane origin={(0,⟨dimension⟩,0)},

• plane x={(0,⟨dimension⟩,1)}, and

• plane y={(1,⟨dimension⟩,0)}.
A plane with

/tikz/canvas is yz plane at x=⟨dimension⟩(no default) ¶

• plane origin={(⟨dimension⟩,0,0)},

• plane x={(⟨dimension⟩,1,0)}, and

• plane y={(⟨dimension⟩,0,1)}.
A plane with

/tikz/canvas is zy plane at x=⟨dimension⟩(no default) ¶

• plane origin={(⟨dimension⟩,0,0)},

• plane x={(⟨dimension⟩,0,1)}, and

• plane y={(⟨dimension⟩,1,0)}.
A plane with