3-dimenional, stackable-cube dillema

Discussion in 'JavaScript' started by RogerDodgr, Jan 5, 2010.

  1. #1
    Hi, I need some some psuedocode or a general strategy for...

    a visual representation for numbers ranging from 1 to 1,000 that gives the reader a sense of proportionality when the reader sees the image comparing 35 to 840 for example. I was thinking of a three dimensional stack of cubes (picture a rubix cube except 10x10x10) because I have a very limited amount of space to stay inside of.

    I want to write a javascript that allows the user to just enter the integer as a parameter.

    The way the cube might be built is layer by layer starting at the bottom (1000 is a 10 x 10 x 10 cube.) So, if the user enters a parameter of 110, I had the bad idea that the image could be built from a 100_count gif at the bottom, with a 10_count gif on the next layer -- but there is a problem with this approach... A three dimensional cube makes two sides and the top visible, so stacking the second layer on top with a three-dimensional view is not possible without altering the image underneath. I'm stuck...

    Well, with that dilemma, I started thinking perhaps I should just do a horizontal train of rectangles. A little less impressive, but the intuitive visualization still works for the reader and it is a lot easier to code.

    One final thought... Am I reinventing the wheel? I mean, is there a script available that can do something like this?
     
    RogerDodgr, Jan 5, 2010 IP