return points def rotatepoint(xyzaxayaz) """returns an (xyztuple of the xyz arguments rotated the rotation happens around the origin by angles axayaz (in radians directions of each axis - +-+ + "" rotate around axis rotatedx rotatedy ( math cos(ax)( math sin(ax) rotatedz ( math sin(ax)( math cos(ax) xyz rotatedxrotatedyrotatedz rotate around axis rotatedx ( math sin(ay)( math cos(ay) rotatedy rotatedz ( math cos(ay)( math sin(ay) xyz rotatedxrotatedyrotatedz rotate around axis rotatedx ( math cos(az)( math sin(az) rotatedy ( math sin(az)( math cos(az) rotatedz return (rotatedxrotatedyrotatedz def adjustpoint(point) """adjusts the xyz point to xy point fit for displaying on the screen this resizes this point by scale of scalex and scaleythen moves the point by translatex and translatey "" return (int(point[xscalex translatex) int(point[yscaley translatey) """cube_corners stores the xyz coordinates of the corners of cube the indexes for each corner in cube_corners are marked in this diagram --- // --- -|- || --- "" cube_corners [[- - - ]point - - ]point [- - ]point rotating cube