/Users/lyon/j4p/src/j3d/cr325/MandelEarth.java
|
1 /*
2 Earth.java
3 Program to display rotating earth
4 By Roger T. Stevens 4-5-99
5 */
6 package j3d.cr325;
7
8 import com.sun.j3d.utils.applet.MainFrame;
9 import j3d.Utils;
10
11 import javax.media.j3d.BranchGroup;
12 import javax.media.j3d.Canvas3D;
13 import java.applet.Applet;
14 import java.awt.*;
15
16 import utils.SystemUtils;
17
18 public class MandelEarth extends Applet {
19
20 public MandelEarth() {
21 Canvas3D c = Utils.getCanvas3D(this);
22 add(c, BorderLayout.CENTER);
23 String ps = SystemUtils.getDirectorySeparator();
24 String img2 = "color"+ps+"airplane.JPEG";
25 BranchGroup bg = Utils.getTextureSphere(0.5,
26 0, 0, img2);
27 BasicUniverse u = new BasicUniverse(c,10);
28 u.addBranchGraph(bg);
29 }
30
31 public static void main(String[] args) {
32 new MainFrame(new MandelEarth(), 200, 200);
33 }
34 }
35