Click here to download my Java3D program "ColorCube"
I've posted this file by request for people interested in working with volumes in Java3D. This application does not directly produce an image slice along the cutting planes. In this case, to keep it small and simple, I've created QuadArrays for the slicing planes, which are colored-by-vertex using the volume information.
The volume is an array[][][] of points, each point having a color determined by it's position along the x, y, or z axis (xyz == rgb).
The int "step" divides the space into more manageable pieces. As posted step=16 which makes each division in the cube 256/16 resulting in 16 divisions along each axis. If you wish to change this value and re-compile it to run faster with fewer divisions, or slower with more divisions, feel free to try it.
Be warned, a step value of 1 will attempt to display 256*256*256 points and 255*255*3 quads (16,777,216 points and 195,075 quads).
The scrollbars move the slicing planes along their respective axies, the current value for each axis is displayed to the left of the scrollbar. The three values together is the color where the slicing planes intersect, this color is displayed by updating the background color for the scene.
Disclamer:
This program is provided free of charge for use by anyone, for any
purpose, it can be modified, changed, or otherwise played with anyway anyone
sees fit. If you like it please let me know, constructive criticism will
be appreciated, however I am not responsible for any physical, psychological,
mental, or technical damages resulting from the use of this program.
: )
dcasteel@tac.textron.com