Java code to display 3D cube with n^3 cubic pixels of any color, transparency

Is this a difficult program to write?

I used to be really good at this kind of stuff back when graphics were 2D, but have no clue where to begin nowadays. I used to make what I called "computer art" back in the 70's, 80's and 90's, way before 3D graphics, high-res graphics, or even color graphics were available.

So, please imagine this. My favorite method was to nest two loops, an outer one for y and an inner one for x which would address all the pixels on the screen in a rasterized fashion, setting the color of each pixel to some formula depending on x and y.

This made pretty pictures. I even was able to make fractals when the pixels were either black or white based on an 8-bit Boolean expression.

What I want to do now is display a cube, like a rubic's cube but without the lines delineating the small cubes comprising the big cube. If all the comprising cubes were blue, say, then the whole cube would be blue. So, I would want it to be 10x10x10 or 50x50x50 pixels, which the user could change, displayed so as to take up the available space in the window, and displayed at some nice angle as if it were a globe you were going to turn. I would want the user to be able to change the window size. And be able to rotate the cube around to get a look at it from all sides. This is starting to sound like  a lot. Maybe someone has created a wonderful library for all of this? The rotation part is not really necessary, but I would think it would be trivial once the rest is coded.

So, could someone stub out a program for this? Or maybe just tell me where to get a start. Unless this is not the proper usage of this forum. A proper answer really could be "go read about this topic" or "get this library", because I could go from reference material to a solution, but I really don't know where to begin. I write plenty of Java code at work, but my programs don't have a user-interface.

So, I don't know if this has to be an applet that runs in a browser, or how you get a screen to display in Java, but I want a resizable screen that displays a cube of size n^3, where the user can specify n. The colors of the comprising cubes would be set by a formula hard-coded in the program. I would really just be running this in a debugger to see the beautiful results, and save as graphics files the ones I like.

I'm sure I would use a simple three-dimensional array

Pixel[][][] theCube = new Color[50][50][50];

Class Color would have RGB and alpha for transparancy. One byte is fine for each.

Is there a library that would do a lot of this? Or would I have to calculate the angle and orientation of the cube in space and in relation to the viewer, constructing every side of every comprising cube? Or is there a library that would draw big pixels as little cubes automatically? And do this all with handling the transparency of every little cube?

Is this all wildly complex? Or something a skilled programmer versed in the available Java tools could write in about three hours?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JSR-231 java bindings for opengl (aka JOGL)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkurantAuthor Commented:
It looks like a good place to start, but not much other information.
opengl is omnipresent.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.