Revised: Fri Oct 16 23:14:43 CDT 2015
This page is included in the following books:
Table of contents
- Preface
- General Discussion
- Preview
-
The program named ImgMod29
- The main method
-
The ImgMod29 class
- Establish display format for log conversion
- Copy the input elevation data
- Convert to log data if required
- Normalize the surface elevation data
- The method named scaleTheSurfaceData
- Create an appropriate pair of Canvas objects
- Add the Canvas objects to the Frame
- Register an anonymous WindowListener object
- Six different inner classes
- The getCenter method
- Grayscale plot format
- Color Shift plot format
- Color Contour plot format
- Run the program
- Summary
- Complete program listing
- Miscellaneous
Preface
In one of my earlier modules titled Plotting Engineering and Scientific Data using Java , I published a generalized 2D plotting program that makes it easy to cause other programs to display theiroutputs in 2D Cartesian coordinates . I have used that plotting program in numerous modules since I originally published it several years ago. Hopefully, some of my readershave been using it as well.
In this module, I will present and explain a 3D surface plotting program that is also very easy to use.
Numerous Java graphics libraries are available from various locations on the web. Some are of high quality, and some are not. Unfortunately, many of thoselibraries have a rather substantial learning curve.
The purpose of this program
It is not the purpose of the class that I will provide in this module to compete with those graphics libraries. Rather, this class is intended to make itpossible for an experienced Java programmer to incorporate 3D surface plotting capability into a Java program with a learning curve of three minutes or less.
(If you are an experienced Java programmer, you can start your three-minute learning-curve clock right now. If you are not an experiencedJava programmer, it may take a little longer but should still be easy. If you need to work on your Java programming skills, see Object-Oriented Programming (OOP) with Java .)