$20.99
Project 2 was to develop a unique 3 graphics scene composed of JOGL OpenGL.
The project requirements stated: using Netbeans or Eclipse, develop a JOGL OpenGL
application that displays a unique 3D scene. The scene has the following specifications:
a) Size: minimum 640x480
b) Includes at least 6 different shapes
c) Uses at least 6 different transformation methods
Getting Started
1. The JoglProject.java file requires the Camera.java class to run, ensure they are in the same folder.
2. Launch JoglProject.java. The following window will appear in the center of your monitor:
Picture 1: Initial Window
3. The animation will run in loops while the window is open. The following animation will occur:
a) Wire Torus rotate 180 degrees on y axis
b) Cylinder rotate 45 degrees on z axis
c) Cube rotate 270 degrees counter clock on x axis
d) Sphere rotate 20 degrees on y axis
e) RhombiDodecahedron rotate 45 degrees counter clock on z axis f) Octahedron rotate 45 degrees on x axis
g) Teapot rotate counter clock on y axis
h) Base rotate clock wise on y axis
i) Red orb rotate on y axis
j) Green orb rotate on x axis
k) Blue orb rotate with a faster speed on z axis
4. At the bottom of the screen are three Checkboxes that allows the user to stop and restart the animation. The second Checkbox allows the user to turn on / off the base. Third checkbox turns lights on / off.
5. Click and hold on the screen, then drag your mouse around to move the point of view.
Project Requirements
1. Size: minimum 640x480
2. Includes at least 6 different shapes a) Octahedron (yellow)
b) Wire Torus (red)
c) Cylinder (orange/brown)
d) Cube (light blue)
e) Sphere (green)
f) RhombiDodecahedron (blue)
g) Teapot h) Base
i) Spheres (red, green, blue)
3. Uses at least 6 different transformation methods
a) Wire Torus rotate 180 degrees on y axis – Scale in size
b) Cylinder rotate 45 degrees on z axis – Scale in size
c) Cube rotate 270 degrees counter clock on x axis – Scale in size d) Sphere rotate 20 degrees on y axis – Scale in size
e) RhombiDodecahedron rotate 45 degrees counter clock on z axis – Scale in size
f) Octahedron rotate 45 degrees on x axis – Scale in size
g) Teapot rotate counter clock on y axis h) Base rotate clock wise on y axis
i) Red orb rotate on y axis
j) Green orb rotate on x axis
k) Blue orb rotate with a faster speed on z axis
Test Plan
Test
Input
Performance
Output
Result
Result
1
Setting Eclipse up for
Jogl OpenGL
Download and install the
library .jar file jogamp- all-platforms, java documentations, native library glugen-javadoc, and jogl javadocs.
Eclipse is
running and able to use jogl library.
Figure 1
Pass
2
Create Wire Torus and
have it translate and rotate in 180 degrees on y axis. Scale it size
Wire Torus is red, it
translates and rotates 180 degree around y axis, and it scales it size.
Wire Torus is
red, it translates and rotates 180 degree around y axis, and it scales it size.
Figure 2
Pass
3
Create Cylinder and have
it translate and rotate 45 degrees on z axis. Scale it size.
Cylinder is orange/brown,
it translates and rotates 45 degrees on z axis.
Cylinder size is scaled.
Cylinder is
orange/brown, it translates and rotates 45 degrees on z axis. Cylinder size is scaled.
Pass
4
Create Cube and have it
translate and rotate 270 degrees counter clock on y axis. Scale it size.
Cube is light blue it
translates and rotate 270 degrees counter clock on y axis. Cubes size is scaled.
Cube is light
blue it translates and rotate 270 degrees counter clock
on y axis. Cubes size is
scaled.
Figure 3
Pass
5
Create Sphere and have it
translate and rotate 20 degree on y axis. Scale it size.
Sphere is blue; it
translates and rotates 20 degree on y axis. Scaled in size.
Sphere is
green; it translates and rotates 20 degree on y axis. Scaled in size.
Figure 4
Pass
6
Create
RhombiDodecahedron and have it translate and rotate 45 degrees counter
clock on z axis. Scale it size.
RhombiDodecahedron in
green translates and
rotates 45 degrees counter clock on z axis. It is
scaled in size.
RhombiDodec
ahedron in blue translates and rotates 45
degrees counter clock on z axis. It is
scaled in size.
Figure 5
Pass
7
Create Octahedron and
have it translate and rotate
45 degrees on x axis. Scale in size.
Octahedron created in
yellow that translate and rotates 45 degrees on x axis. Object scaled in size.
Octahedron
created in yellow that translate and rotates 45
Figure 6
Pass
degrees on x
axis. Object scaled in size.
8
Create Teapot and let it
rotate counter clock on y axis.
Teapot rotate counter
clock on y axis.
Teapot rotate
counter clock on y axis.
Figure 7
Pass
9
Create Base for Teapot
and let it rotate clock wise on y axis.
Base for Teapot is
rotating clock wise on y axis.
Base for
Teapot is rotating clock wise on y axis.
Figure 8
Pass
10
Let red orb rotate on y
axis
Red orb (spheres) rotates
on y axis.
Red orb
(spheres) rotates on y axis.
Pass
11
Let green orb rotate on x
axis.
Green orb (spheres)
rotates on x axis.
Green orb
(spheres) rotates on x axis.
Pass
12
Let blue orb in a faster
speed rotate on z axis
Blue orb (spheres) rotates
with a faster speed on z axis.
Blue orb
(spheres) rotates with a faster speed on z axis.
Figure 9
Pass
13
Create three Checkboxes
that allows the user to stop and restart the animation. Second
Checkbox allows to user to turn on / off the base. Third Checkbox turns
lights on / off.
Three Checkboxes
created. First allows the user to stop and restart the animation. Second Checkbox allows to user
to turn on / off the base. Third Checkbox turns lights on / off.
Three
Checkboxes created. First allows the user
to stop and restart the animation.
Second
Checkbox allows to user to turn on / off the base. Third Checkbox
turns lights on
/ off.
Figure 10
Pass
Screenshots of Successful Compiling and Running
Screenshots are from Eclipse Version: Oxygen.1a Release (4.7.1a).
Test1: Download and install the library .jar file jogamp-all-platforms, java documentations, native library glugen-javadoc, and jogl javadocs.
Figure 1 – Test 1
Test 2: Create a red Wire Torus and have it translate and rotate in 180 degrees on y axis. Scale it size
Figure 2 – Test 2
Test 3: Create an orange / brown Cylinder and have it translate and rotate 45 degrees on z axis. Scale it size.
Test 4: Create a light blue Cube and have it translate and rotate 270 degrees counter clock on y axis. Scale it size.
Figure 3 – Test 4
Test 5: Create a blue Sphere and have it translate and rotate 20 degree on y axis. Scale it size.
Figure 4 – Test 5
Test 6: Create a green RhombiDodecahedron and have it translate and rotate 45 degrees counter clock on z axis. Scale it size.
Figure 5 – Test 6
Test 7: Create a yellow Octahedron and have it translate and rotate 45 degrees on x axis. Scale in size.
Test 8: Create Teapot and let it rotate counter clock on y axis.
Test 9: Create Base for Teapot and let it rotate clock wise on y axis.
Test 10: Create red orb (sphere) and have it translate and rotate in y axis. Test 11 Create green orb (sphere) and have it translate and rotate in y axis. Test 12: Create blue orb (sphere) and have it translate and rotate in y axis.
Test 13: Create three Checkboxes. First checkbox allows the user to stop and restart the animation. Second checkbox allows to user to turn on / off the base. Third checkbox turns lights on / off.
Lessons Learned
1. I spend almost one week on getting Netbeans to work. I was finally successful with Eclipse and able to install the library .jar file jogamp-all-platforms, java documentations, native library glugen-javadoc, and jogl javadocs;
2. Order of things – the order you put your code will change what visualizations appear. I enjoyed playing around with the placement of scale, translate, and rotate to see how different ordering provided much different results.
3. In order to complete this 3D spinning, transformations, timers and colors using OpenGL
and GLUT, you need to know the basics of programming.
4. Continued development – I would be interested in continuing develop projects that render graphic images and animate three-dimensional objects.