rubix_cube.plot_cube_3d module

3-D Rubix Rubix Cube plot rendering Module.

Module Description

Module Contents

rubix_cube.plot_cube_3d.is_3d_axes(ax: matplotlib.axes._axes.Axes) → bool[source]

Simply checks if the current object being examined is an instance of the matplotlib Axes parameterized to be a 3-D plotting

Parameters

ax (plt.Axes) – Object to be tested if it is a plt.Axes

Returns

True if object is an instance of matplotlib Axes initialized to be a 3-D projection. False otherwise.

Tests if the given object ax is a 3-D projection or not.
1
2
3
4
5
if isinstance(ax, plt.Axes)
and ax.name == '3d':
    return True
else:
    return False

rubix_cube.plot_cube_3d.plot_cube_3D(ax: matplotlib.axes._axes.Axes, cube: rubix_cube.cube.Cube)[source]

Plots the Rubix Cube on an interactive 3-D matplotlib Axes with non-visible faces from the current orientation being displayed in visible reflections.

Parameters