rubix_cube.plot_cube_3d module¶
3-D Rubix Rubix Cube
plot rendering Module.
Module Description¶
plot_cube_3D()
method for plotting theRubix Cube
on amatplotlib Axes
.
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 ofmatplotlib Axes
initialized to be a 3-D projection.False
otherwise.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-Dmatplotlib Axes
with non-visible faces from the current orientation being displayed in visible reflections.- Parameters
ax (plt.Axes) – The
matplotlib Axes
on which the plotting will be done.cube (Cube) –
Rubix Cube
that will be plotted in a 3-D projection.