Introductory OpenGL Lab Exercises
The goal of this lab is to get you started using OpenGL. You will create a complete, animated scene. The emphasis is on understanding OpenGL's basic capabilities, as well as using them as building blocks in generating more complex effects.
Start by downloading JOGL for your specific machine from the bottom of that page.
- Download (or snarf) this code to get you started (it should have some compilation errors)
- Copy JOGL's lib folder into your project
- Update your Run configuration to include Java VM argument:
-Djava.library.path=./lib/
Staying on the Grid
- Modify it to create a grid of teapots, rather than a single one. The number of rows and columns in the grid should be the same and should be given as a parameter to the animation. All teapots that you create should be visible within the window (i.e., uniformly scaled to fit as many as necessary).
- Modify the code again so that every other object in the grid is spinning in the opposite direction around the Y-axis. Additionally, change the code so that every other object is a cube instead of a teapot.
- Modify the code again so that the entire grid spins about the X-axis in
addition to each individual object spinning about its own Y-axis.
- Finally, take some time to experiment with the rotation axes to create a interesting animation.