| By Valor Dodd | Article Rating: |
|
| May 23, 2006 01:00 PM EDT | Reads: |
31,125 |
Installing Java3D
To run Graph3D, you'll have to have Java3D installed on your computer. Java3D can be downloaded at java.sun.com/products/java-media/3D/downloads.
If your computer is a PC, you may have to install OpenGL or DirectX.
Most PCs automatically come with OpenGL or DirectX installed, but if
yours doesn't, see www.microsoft.com/downloads. To run Java3D on Unix workstations see the workstation maker Web site for Java3D support.
Running Graph3D
To compile the Graph3D application, type the following command in a DOS window from the directory containing the source code:
javac -classpath .; *.java
To run Graph3D as a standalone application in a DOS window, type the following command from the source code directory:
java -classpath .; Standalone
As with computer games, the quality of the Java3D display depends heavily on the quality of the graphics board installed in the computer. Low-end boards tend to leave out parts of the display like lines, surfaces, and text.
Running from a Browser
Java3D can be run from both
Netscape and Microsoft Internet Explorer (IE) web browsers. When
installing the latest version of the Java JDK, the install process
automatically points your web browser to the developer's kit. As long
as you installed Java3D to this version of the JDK, all the work is
done for you. To verify which version of the JDK your browser will use,
go to the "Control Panel" on your PC and click on the Java menu.
To run Graph3D from one of these browsers, open the file AppletGraph3D.html (included in the source code) from your browser. Since Graph3D is expecting input from a data file on your local PC, you'll have to grant "read" file permission to the file plot3D.dat in the java.policy file. This is located in the "jdk_install_directory/jre/lib/security" directory. The syntax for granting permissions is:
grant codeBase "file:/C:/source_code " {
permission java.io.FilePermission "C:/source_code/plot3D.dat",read";
};
Granting permissions this way lets any applet running in the browser access your local file. So do this for demonstration purposes only. Realistically, a browser running the Graph3D applet won't use data from a file on the local computer. The user must change Graph3D appropriately to get the data from the server and format it.
Please view the Author's Source code
Summary
There are many fine commercial
off-the-shelf (COTS) graphing packages available. While they may
currently solve your particular graphing needs, writing your own
graphing software gives you total control and lets you change it in any
fashion desired. This will be beneficial in the long run since it will
be totally portable and there will be no need for licenses, upgrades,
or maintenance fees. Besides, the vendor may not incorporate any bug
fixes or desired features not currently in a COTS package any time
soon. Graph3D provides the core classes and technology for Java3D
programming and can be used as a starting point for developing your own
graphing application. As you've seen, Graph3D isn't a complex
application and hopefully you'll consider using Java3D in your current
or future projects.
Published May 23, 2006 Reads 31,125
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Valor Dodd
Valor Dodd is a Java-certified senior software engineer at Lockheed Martin in Denver, Colorado. He has more than 20 years of software experience developing computer graphics and GUI applications for the telephone and defense industries.
![]() |
Jerry Schultz 06/11/06 04:50:17 AM EDT | |||
Same comment. I am beginning work on similar classes. Was excited to read that it was done and the article stated that this is how you complile the source code and then no source code. An email with the source code link would be great! |
||||
![]() |
Bob Byrnes 06/01/06 06:02:43 PM EDT | |||
At the risk of being repetitious, I too would like to find the source code for Graph3D. |
||||
![]() |
Anders Lindstrom 05/26/06 08:36:58 PM EDT | |||
The section "Running Graph3D" implies that the source code is available but I cannot find it. |
||||
![]() |
Chaouki MAIZA 05/26/06 10:00:36 AM EDT | |||
Hi there, Sorry for repeating the question but, is the Graph3D source available for download??? |
||||
![]() |
Chris Pratt 05/24/06 05:51:48 PM EDT | |||
I was a little disappointed with the article. I thought it was going to show me how to do cool things with Java3D, not just talk about what the author had done for himself! Especially since it doesn't appear that the code discussed in the article is available. I usually expect more from JDJ. |
||||
![]() |
Jeff Dinkins 05/24/06 01:25:28 PM EDT | |||
Hi - where might one download the Graph3D application you're mentioning? thanks! jeff |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?





































