10. candy
— Predefined geometries for a special purpose.¶
This module contains some predefined special purpose geometries functions. You need to import this module in your scripts/apps to have access to its contents.
10.1. Contents¶
10.1.1. Classes defined in module candy¶
-
class
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.
This class is a subclass of
List
and contains twoMesh
instances: the lines along the axes and the triangles in the coordinate planes.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.
- cs (