11. candy
— Predefined geometries for a special purpose.¶
This module contains some predefined special purpose geometries functions.
11.1. Contents¶
11.2. Functions defined in module candy¶
- candy.Axes(cs=None, *, size=1.0, psize=0.5, reverse=True, color=['red', 'green', 'blue', 'cyan', 'magenta', 'yellow'], linewidth=2, alpha=0.5, **kargs)[source]¶
A geometry representing the three axes of a coordinate system.
The default geometry consists of three colored lines of unit length along the positive directions of the axes of the coordinate system, and three colored triangles representing the coordinate planes. The triangles extend from the origin to half the length of the unit vectors. Default colors for the axes is red, green, blue.
- Parameters:
cs (
coordsys.CoordSys
) – If provided, the Axes will represent the specified CoordSys. Else, The axes are aligned along the global axes.size (float) – A scale factor for the unit vectors.
psize (float) – Relative scale factor for the coordinate plane triangles. If 0, no triangles will be drawn.
reverse (bool) – If True, also the negative unit axes are included, with colors 4..6.
color (3 or 6 colors) – A set of three or six colors to use for x,y,z axes. If reverse is True or psize > 0.0, the color set should have 6 colors, else 3 will suffice.
**kargs (keyword arguments) – Any extra keyword arguments will be added as attributes to the geometry.
- Returns:
List
– A List containing twoMesh
instances: the lines along the axes and the triangles in the coordinate planes.