if your assignment is not about the graphics, but about the cube itself, impress them with simple.
z2 -- #
z1 -- +
z0 -- *
## ## ##
++ ++ ++ ##
y2 -- ** ** ** ++ ##
y1 -- ** ** ** ++
y0 -- ** ** **
| | |
x0 x1 x2
if your values are all the same number of characters and you don't have too many rows, columns or layers you should be able to do this in plain text. it's much easier to tell the layers apart if each is done in a different color, make the #'s dark grey, the +'s medium grey, and the *'s and labels white on a black background.
if it's the graphics you want, use GD. the method is about the same, take your data points and find a 2d box that will fit around them all. write a subroutine that draws a whole layer at an x,y offset with a given fill color. draw the back layer in a darker color, move the offset down and to the left a bit, make the fill color lighter, draw the next layer. repeat until done.
i think most graph/chart modules would make it hard to put things on top of each other, or if they did have a 3d cube, using it would be cheating on your homework =)
on the extreem end, i've seen way cool 3d cube visualizations that use color for one dimension, light and dark for the second, and size (perspective) for the third where it was possible to see all the numbers at once and still be able to grok out their 3d position. |