j3d.org Code

Package org.j3d.geom.terrain

Class for processing and generating terrain type geometry.

See:
          Description

Class Summary
ColorRampGenerator Utility class to create colors per vertex for a terrain model where the colour model is based on a ramp value.
ElevationGridGenerator A generator that takes a set of height values as a grid and turns it into geometry.
FractalTerrainGenerator A terrain generator using the standard "fractal" algorithm.
HeightDataCreator A converter utility for changing an image into a height field set of data points.
HeightImageCreator A converter utility for changing height map information to and from images.
 

Package org.j3d.geom.terrain Description

Class for processing and generating terrain type geometry.

The classes here are specifically aimed at the various tasks someone wanting to use or generate terrain information in their application. The code contains everything from a generic elevation grid creator to a fractal terrain generator.

Using the code

The classes here fit with the basic infrastructure defined in the parent package org.j3d.geom for the generator utilities. In addition to these, we add colorising capabilities. An example of all of the classes combined together can be seen in the following image.

The image is of the example terrain generator demo application included as part of the CVS module. you can see the parameters used for the FractalTerrainGenerator on the right. In addition to this, it is using a color ramp filter with the following heights set.

HeightColour
00,0,1
0.21,1,0
10,0.6,0
30,1,0
81,1,1
Image processing code can act as a standalone, or preferably in combination with the ElevationGridGenerator to create the geometry. For an example on this, see the ImageMapDemo in the examples/geometry directory.


j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org