Thomas Brown wrote:

> A 2-dimensional rectangular matrix should be transformed into a
> 3-dimensional visualization of the matrix. The values at each position
> should represent the height of the actual point. (The program should
> work like the 'matrixplot' in Maple. )

Well, you'll probably have to code most of this yourself. However there
are certainly enough parts floating around.

The basics of the 2D matrix looks just like a standard elevation grid,
for which I have just the code for you (freshly minted at the start of
the week). Take a look at the j3d.org Code Repository and in particular
the org.j3d.geom.terrain.ElevationGrid class.

http://code.j3d.org/

If you would like some pretty pictures, then try this:

http://code.j3d.org/examples/terrain/

The stuff you see there uses a fractal terrain generator, but there is
an underlying class that just does the triangulation.

For colouring, look at the ColorRampGenerator as that should do what you
need there. It does colour per vertex so you get a nice blend between
them. As an elevation grid, the normals are smoothed to give an
appearance of smooth surface. Naturally, if your angles between two
pieces are too great, there's nothing that any smoothing algorithm can
do.

> A coordinate-system should also be added, with the x-axe (rows of the
> matrix), y-axe (colums) and the z-axe (the value of the matrix). This
> is just a suggestion it could be different!

Try org.j3d.geom.Axis as a start. No tick marks, but you should be able
to add those yourself.

> Light effects and interactive views (clicking with the mouse or with
> the arrow-key should change the point of view) should also be part of
> the implementation.

There's separate classes for that in org.j3d.ui.navigation. In
particular, have a look at the viewpoint classes (also does mouse based
navigation) and some of the UI classes for presenting this on screen.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Freelance Java Consultant                  http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to