This page illustrates Drawing 3D Objects on the screen
A cube is shown of size 2, centre at 0,0,0: or you can choose a unit cube with one corner at 0,0,0; you can specify the eye position, and draw it from there.
You can opt to show a cube, octagonal cylinder, half cube (pyramid) or triangular pyramid.
All lines around the cube can be drawn; or those which are visible (back face elimination); or the visible faces can be filled in.
You can also specify movement of the cube in x,y,z and then move the eye by x,y,z; translate the cube by x,y,z; scale the cube by factor x,y,z; or rotate by the given angle around the x,y and z axes; or shear in the x,y or z axes.
If you select the animation option, then the specified movement is achieved by a series of smaller steps.