Core Version
Computer Graphics Using Java 2D and 3D
Hong Zhang
Y. Daniel Liang

Why Teaching Computer Graphics Using Java?

In the early days, computer graphics has to deal with implementation details using low-level algorithms to convert primitives such as lines to pixels, to determine the surfaces hidden from the view, to calculate the color values of points on a surface, etc. These algorithms are tedious, complex, and difficult to use. 

OpenGL was developed to ease these difficulties. OpenGL is a high-level package that enables the user to program computer graphics applications without concerning platform-dependent technical details. OpenGL is efficient and powerful, but it is procedural-oriented. Java 2D and 3D provide an object-oriented API for developing computer graphics applications. 

There are at least three benefits of teaching computer graphics using Java:

  1. Java 2D and 3D API is even higher level abstraction than OpenGL. In fact, Java 2D and 3D API are implemented using OpenGL. Programming using Java 2D and 3D is easier than OpenGL.
  2. Your graphics applications can run as applets from any Web browser.
  3. Java 2D and 3D programming have other benefits that are inherent in Java. As Java programs, they are supported by the extensive and powerful Java API for networking, multithreading, multimedia, accessing databases, etc.

Why Do We Write This Book?

Currently there is no graphics textbook based on Java 2D and Java 3D. There are several books using OpenGL. OpenGL is a relatively low-level API with a C language interface. It does not have the advantages offered by Java such as the OOP paradigm. We need a Java based graphics textbook to introduce advanced graphics features at undergraduate level to a student population that is mostly trained with the Java language. It is easier and more productive to learn and write graphics programs in Java than in OpenGL.

With more and more schools switch to Java as the primary programming language, there is a clear need for a Java based graphics text. This is perhaps the most accessible computer graphics textbook with in-depth coverage. By using the high-level Java 2D and Java 3D APIs, it offers an elegant and easy-to-understand approach to 2D and 3D graphics without compromising the fundamentals of the subject.