Algosim documentation: solid


Creates a new instance of a named 3D solid.



solid(s) creates a new instance of the named 3D solid s.

solid(s, a, f, d, α) translates the object by a, scales it by diag(f), aligns its axis 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 solid. See Visual settings for a list of applicable settings.

Available solids

At least the following solids are available:

Some of these may offer parameters that can be set using AdjustVisual. For instance, the cylinder can be customised with a positive inner radius (producing a hollow, solid tube with a finite wall thickness) and a sector angle.



Image 1


Image 2

s ≔ solid("teapot"); AdjustVisual(s, "color": "coral")

Image 3

See also