Zentraedi. [hello wonderer, you've stumbled upon my maze. would you like go further?]

Lab Four: OpenGL Animations I

In today's lab we'll make computer animations using what
you've learned so far in OpenGL (don't worry, we'll review a little bit if you've forgot it already) e.g. glPushMatrix() glPopMatrix() glRotatef() glTraslatef()
Download the skeleton code here gl2lab.tar.bz2. To extract the files, apply the command "tar xvjf g2lab.tar.bz2". A directory called gl2lab would be created. To build it, change directory into the gl2lab/ and type "make".
We've provided a demo of how the final product may look like. To run the demo, type "gl2demo" and use the right mouse button menu to explore different animations. For Monday March 3rd lab, you'll be making the spinning teapot animation. If you run the demo, it should look self explanatory. Here are some hints: The platform is a large inverted cone, the teapots are stock OpenGL objects you can create using glutSolidTeapot(). Here is a thousand words:
If you are in the Monday March 10th lab, you'll build a planetary system. Here you need a stationary sun, and three major orbiting satalites. On one of the satalite planet, provide it with a orbiting moon. The orbiting speed can be different if you like, as long the result looks cool! Here is what it may look like:
I almost forgot, for March 10th, put a glutWireSphere() of radius 3 around the origin to give it that "oh-so-sci-fi" look before showing it off to your friends :)
For Tuesday labs, you'll be making something different then the aboves - please communicate with your TA prior to jumping into your project, okay? :)
How to Animate
In "mainOpengl.cpp" where you'll be doing all of your work, we rely on a global variable named timer to drive our animation. This variable is updated automatically and is always increasing. In the carousel demo, the timer variable is used to modify the angle of placement for each circling 'n hopping teapots. For your animation, you can reuse the same variable to animate your objects.
Turn-In
Your lab is due by the end of today's lab. Please ask your TA's to begin checking you off half-hour before the end of lab. Thanks!!
Lab Three: OpenGL Block World
In today's lab we'll explore some basics of OpenGL programming. Specifically, you'll be building one of the five following shapes using OpenGL: (depending on your birth date e.g. if you are born on the 31st, you are shape5)
| Shape 1 |
Shape 2 |
Shape 3 |
Shape 4 |
Shape 5 |
| (birthdays 1-6) |
(birthdays 7-12) |
(birthdays 13-18) |
(birthdays 19-24) |
(birthdays 25-31) |
 |
 |
 |
 |
 |
We've provided a skeleton code here gl1lab.tar.bz2. To extract the files, download it someplace and then type "tar xvjf g1lab.tar.bz2". The skeleton files would be deposited into the gl1lab/ directory. To build, change into the gl1lab/ directory and type "make".
We've also provided a simple cube example in the "display()" function in mainOpgngl.cpp. Please look at this sample code and study how it works. A useful reference on glutSolid functions is here. You'll also need to use glTranslate(...) glScale(...) and glRotate(...) to position your objects. There is one reference. When you are ready to code, you can expand/replace some of our sample code with your own stuff. Place all your code within the display() function.
A gl1demo program is provided for you to preview various shapes you are to build. You can use the right-mouse-button menu in gl1demo's window to view different shapes. Hold and move left-mouse-button in the display window to explore the shapes from different angles.
Turn-In
Your lab is due by the end of today's lab. Please ask your TA's to begin checking you off half-hour before the end of lab. Thanks!!
Lab Two: Create Your Creature / Evil Twin
Armed with your newly earned skills, you are invited to model a humanoid/alienoid of your choice using Maya. Use your imagination - draw on a piece of paper first to get some ideas. Look at what your neighbors are doing - inspire each other, express yourself!
Turn-In
Create a directory in the /home/rgl/cs130/FirstnameLastname.
Copy the model you've created into this directory.
Create a README file and place your name, email address, and a brief description of your model in it.
Send your CS130 TA an email when you are satisfied with your file submission.
Notes
Please do not use Maya Personal Edition to create your model. We plan to place all students' models into one big poster using full version Maya - the personal learning edition save models in a weird format that we cannot use :)
Lab One: Introduction to Maya
To start Maya: type "maya.sh"
Start tutorial:
Maya -> Help -> Tutorial
-or-
Open browser and browse to location:
/usr/aw/maya4.5/docs/en_US/html/index.html
(click) Tutorials -> Instant Maya
(click) "Essentials: A quick tour of Maya"
Tutorial:
Go through tutorial from beginning until and including "NURBS Modeling Lesson 2". You'll learn to make the following objects in this order: door with two door knobs, hammer, eggholder, face. The goal of each lesson is different. Collectively they teach the student to navigate the modeler, create simple objects, modify important properties of the objects, and introduction to the most often used tools for modeling 3D objects.
KDE interaction solution:
Maya's "Alt-left-mouse-button" "Alt-mid-mouse-button" are assigned to moving the user's perspective around the canvas. Unfortunately KDE also bind these keys to their own window manager. You must perform the following settings (once only) to turn off KDE's bindings: KDE Menu -> Configuration -> KDE -> LookNFeel -> Window Behavior Choose "Actions" tab. Set Modifier Key + Left Button/Middle Button/Right Button to "Nothing". Click "OK".
Appendix I: OpenGL on Windows with Cygwin
You could easily program and compile your opengl assignments on your windows machine using Cygwin and then upload it to the Linux in our labs without any change of code. Here is how:
* Install Cygwin from their website. During the installation, make sure you select to add the install of "OpenGL" under Category->Graphics package list. You might want to intall "gcc" and "make" from under Category->Development too :)
* After Cygwin completed installation, do the followings from the cygwin's shell:
cd /usr/X11R6/lib/
mkdir old
mv libGL.a libGLU.a old
ln -s /lib/w32api/libopengl32.a libGL.a
ln -s /lib/w32api/libglu32.a libGLU.a
ln -s /lib/w32api/libglut32.a libGLUT.a
Now you should be able to compile the assignments under cygwin. This information is brought to you to help you work on your stuff on windows machine at home or as your laptop. We provide no support for cygwin in general or the built process. Have fun!