/var/spool/weblog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Geek News del.icio.us bookmarks RSS |
Sun, May 08, 2005
PLY Format
/var/spool/courses/csuf/2005/spring/cpsc465 # Sat, Apr 30, 2005
Static models
/var/spool/courses/csuf/2005/spring/cpsc465 # Wed, Apr 27, 2005
Assignment 5
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Apr 19, 2005
Optical Illusions
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Apr 12, 2005
Assignment 4
/var/spool/courses/csuf/2005/spring/cpsc465 # Wed, Mar 30, 2005
Modeling coordinates
/var/spool/courses/csuf/2005/spring/cpsc465 #
gluCylinder
I kinda wish I'd thought of this; it's much better than the Toblerone bar example I used in class. /var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Mar 29, 2005
Oops
/var/spool/courses/csuf/2005/spring/cpsc465 # Mon, Mar 28, 2005
trackball.c Compiler Trouble
Unfortunately, there are multiple standards for C libraries. The ANSI/ISO C standard <math.h> specifies only a few math functions. The POSIX standard <math.h> specifies a superset, including several useful constants like M_PI, and several additional functions, including y0() and y1() for computing Bessel functions. Unfortunately, compilers tend to pick and choose. The "standard" library for the compiler I used includes M_PI but not y0() and y1(). If you're using Visual C++, you'll find that its "standard" library does the opposite: it defines y0() and y1() but not M_PI. The best defense against all of this is probably to define your own constant for PI and to rename y0 and y1. By the time you read this, I'll have updated trackball.c to do this. Computers suck. Have I mentioned that? /var/spool/courses/csuf/2005/spring/cpsc465 # Fri, Mar 25, 2005
Extra Credit
/var/spool/courses/csuf/2005/spring/cpsc465 # Thu, Mar 24, 2005
Assignment 3
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Mar 22, 2005
Virtual Trackball Jumpstart
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Mar 15, 2005
Assignment 3
/var/spool/courses/csuf/2005/spring/cpsc465 # Mon, Mar 07, 2005
Looking for programming partner
/var/spool/courses/csuf/2005/spring/cpsc465 # Thu, Feb 24, 2005
Assignment 1
Note that posting code for this assignment does not imply that I will do so again. In fact, I probably won't. But if you can't get past the first assignment, you're likely to have trouble for the rest of the semester. One more thing: remember that you are allowed to work with a partner on programming assignments (you did read the syllabus, right?). I note that the students who didn't finish the assignment on time were all working alone. If you're having trouble, find a buddy. If you can't find a buddy, get in touch with me. /var/spool/courses/csuf/2005/spring/cpsc465 # Fri, Feb 18, 2005
Assignment 2 Extra Credit
/var/spool/courses/csuf/2005/spring/cpsc465 # Wed, Feb 16, 2005
The Reshape Callback
The default reshape callback (the one you get if you don't call glutReshapeFunc()) calls glViewport(0, 0, w, h) and doesn't change the coordinate system. The default coordinate system (which won't change unless you call gluOrtho2D()) has its origin in the lower left corner of the window. Unfortunately, the coordinate system used for the mouse position has its origin in the upper left corner. That means that if you don't have a reshape callback, or if you call gluOrtho2d(0, w, 0, h);, you'll end up with mouse coordinates that are the opposite of drawing coordinates. To fix that, you need to do one of two things:
void reshape(int w, int h) { glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, w, h, 0); }Don't forget to register the callback in main() with glutReshapeFunc(reshape). Here's what the function does:
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Feb 15, 2005
Assignment 2
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Feb 08, 2005
OpenGL and GLUT in Visual Studio .NET
/var/spool/courses/csuf/2005/spring/cpsc465 #
Assignment 1
/var/spool/courses/csuf/2005/spring/cpsc465 # Mon, Feb 07, 2005
SPiGoT
/var/spool/courses/csuf/2005/spring/cpsc465 # Sun, Feb 06, 2005
OpenGL Tutorial Site
/var/spool/courses/csuf/2005/spring/cpsc465 #
Computer Animation
/var/spool/courses/csuf/2005/spring/cpsc465 # Thu, Feb 03, 2005
GLUT
/var/spool/courses/csuf/2005/spring/cpsc465 # Tue, Feb 01, 2005
CpSc 465, Principles of Computer Graphics
/var/spool/courses/csuf/2005/spring/cpsc465 # |
Topics
Archives
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||