Utilities (cachai.utilities)
The cachai.utilities module contains supporting tools primarily designed for internal use,
though some functions may be useful in other contexts.
Contents
|
Saves the current matplotlib figure as PNG and optionally PDF with customizable dpi (dots per inch). |
|
Calculates the minimal angular distance between two angles in radians. |
|
Generates a map (2D matrix) where each point value is based on its proximity to the nearest point along a specified curve. |
|
Applies a colormap to a patch object using a precomputed map matrix, creating a color-filled shape. |
|
Resamples points along a curve to make them equidistant while preserving the overall shape. |
|
Evaluates a quadratic Bézier curve at parameter |
|
Evaluates a cubic Bézier curve at parameter |
|
Generates a sequence of points along a Bézier curve. |
|
Validates that given keyword arguments are within the allowed set of parameters. |
|
Formats keyword argument names as a readable string separated by |
|
Applies multiple color modifications (lightness, saturation, transparency) to an RGB color. |
|
Increases the brightness of an RGB color by a specified factor. |
|
Decreases the brightness of an RGB color by a specified factor. |
|
Adjusts the saturation level of an RGB color by a specified factor. |
|
Simulates transparency by blending an RGB color with a background color. |
|
Applies ANSI color codes to a string (only work in terminal/output cells). |
|
Displays a visual palette of all available ANSI 256-color codes for terminal text coloring. |