Sysquake Pro – Table of Contents

Sysquake for LaTeX – Table of Contents

# Library -
`polyhedra`

Library `polyhedra` implements functions which create solid shapes
with polygonal facesin 3D. Solids are displayed with
`plotpoly`.
They are defined by the coordinates of their vertices
and by the list of vertex indices for each face. Other solids, such as cylinder
and sphere, are generated with parametric equations and displayed with
`surf`.
Some solids have parameters, e.g. for the number of discrete values used for
parameters. When called without output argument, with an optional trailing
string argument for the edge style, the solid is displayed with the current scaling and
color map. With output arguments, arrays `X`, `Y`, `Z`
expected by `surf`,
`mesh` and `plotpoly`,
and index array expected by `plotpoly`, are produced. They can
be modified to move, scale or stretch the solids.

The following statement makes available functions defined in `polyhedra`:

use polyhedra

## Functions

### cube

Create a cube.

#### Syntax

use polyhedra cube; cube(style); (X, Y, Z, ind) = cube

#### Description

Without output argument, `cube` displays a cube,
i.e. a convex solid whose six faces are squares. By default, edges are not
drawn. An optional string input argument specifies the edge style.

With four output arguments, `cube` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`tetrahedron`,
`octahedron`,
`dodecahedron`,
`icosahedron`,
`plotpoly`

### dodecahedron

Create a regular dodecahedron.

#### Syntax

use polyhedra dodecahedron; dodecahedron(style); (X, Y, Z, ind) = dodecahedron

#### Description

Without output argument, `dodecahedron` displays a regular convex
dodecahedron, i.e. a convex solid whose twelve faces are regular pentagons. By default,
edges are not drawn. An optional string input argument specifies the edge style.

With four output arguments, `dodecahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`tetrahedron`,
`cube`,
`octahedron`,
`icosahedron`,
`greatdodecahedron`,
`greatstellateddodecahedron`,
`smallstellateddodecahedron`,
`plotpoly`

### greatdodecahedron

Create a great dodecahedron.

#### Syntax

use polyhedra greatdodecahedron; greatdodecahedron(style); (X, Y, Z, ind) = greatdodecahedron

#### Description

Without output argument, `greatdodecahedron` displays a great
dodecahedron, i.e. a regular nonconvex solid whose twelve faces are regular pentagons. By default,
edges are not drawn. An optional string input argument specifies the edge style.

With four output arguments, `greatdodecahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`dodecahedron`,
`greatstellateddodecahedron`,
`greaticosahedron`,
`plotpoly`

### greaticosahedron

Create a great dodecahedron.

#### Syntax

use polyhedra greaticosahedron; greaticosahedron(style); (X, Y, Z, ind) = greaticosahedron

#### Description

Without output argument, `greaticosahedron` displays a great
icosahedron, i.e. a regular nonconvex solid whose twenty faces are equilateral triangles.
By default, edges are not drawn. An optional string input argument specifies the edge style.

With four output arguments, `greaticosahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`icosahedron`,
`greatdodecahedron`,
`plotpoly`

### greatstellateddodecahedron

Create a great stellated dodecahedron.

#### Syntax

use polyhedra greatstellateddodecahedron; greatstellateddodecahedron(style); (X, Y, Z, ind) = greatstellateddodecahedron

#### Description

Without output argument, `greatstellateddodecahedron` displays a great stellated
dodecahedron, i.e. a regular nonconvex solid whose twelve faces are regular star pentagons and
where each vertex is common to three faces.
By default, edges are not drawn. An optional string input argument specifies the edge style.

With four output arguments, `greatstellateddodecahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`dodecahedron`,
`greatdodecahedron`,
`smallstellateddodecahedron`,
`plotpoly`

### icosahedron

Create a regular icosahedron.

#### Syntax

use polyhedra icosahedron; icosahedron(style); (X, Y, Z, ind) = icosahedron

#### Description

Without output argument, `icosahedron` displays a regular convex icosahedron,
i.e. a convex solid whose twenty faces are equilateral triangles. By default, edges are not
drawn. An optional string input argument specifies the edge style.

With four output arguments, `icosahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`tetrahedron`,
`cube`,
`octahedron`,
`dodecahedron`,
`plotpoly`

### octahedron

Create a regular octahedron.

#### Syntax

use polyhedra octahedron; octahedron(style); (X, Y, Z, ind) = octahedron

#### Description

Without output argument, `octahedron` displays a regular octahedron,
i.e. a convex solid whose eight faces are equilateral triangles. By default, edges are not
drawn. An optional string input argument specifies the edge style.

With four output arguments, `octahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`tetrahedron`,
`cube`,
`dodecahedron`,
`icosahedron`,
`plotpoly`

### smallstellateddodecahedron

Create a small stellated dodecahedron.

#### Syntax

use polyhedra smallstellateddodecahedron; smallstellateddodecahedron(style); (X, Y, Z, ind) = smallstellateddodecahedron

#### Description

Without output argument, `smallstellateddodecahedron` displays a small stellated
dodecahedron, i.e. a regular nonconvex solid whose twelve faces are regular star pentagons and
where each vertex is common to five faces.
By default, edges are not drawn. An optional string input argument specifies the edge style.

With four output arguments, `smallstellateddodecahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.

#### See also

`dodecahedron`,
`greatdodecahedron`,
`greatstellateddodecahedron`,
`plotpoly`

### tetrahedron

Create a regular tetrahedron.

#### Syntax

use polyhedra tetrahedron; tetrahedron(style); (X, Y, Z, ind) = tetrahedron

#### Description

Without output argument, `tetrahedron` displays a regular tetrahedron,
i.e. a solid whose four faces are equilateral triangles. By default, edges are not
drawn. An optional string input argument specifies the edge style.

With four output arguments, `tetrahedron` produces the `X`,
`Y`, `Z` and `ind` arrays expected by
`plotpoly`, and it does not display anything.