HOFSTRA CSC269, Computer Graphics, Spring 2002
Dr. Gerda Kamberova
Phone: (516) 463-5775
E-mail: cscglk@husun3.hofstra.edu
Office hours: before class, 202 Adams
Lectures: Tuesday, 6:20-8:10

Announcements
Course Information

Overview

Mathematical foundations and algorithms for computer graphics. Topics include: graphics systems architecture, graphics APIs, Modeling-Rendering paradigm, the graphics pipeline, geometric modeling, Hierarchical modeling, Viewing, Illumination models and shading algorithms, texture mapping, curves and surfaces, physics-based modeling, visualization.
The class will consists of lectures, and discussions on research papers assigned for reading.
In class we will study the theoretical foundations and algorithmic issues, in programming assignments you will use OpenGL as the particular API for writing graphics programs.


Compiling on husun3
 
   The C++ version of the makefile is now available. The makefile was
   prepared by Bruno Tagliaferi.
To get it: cd /shared/glut and copy clggl2 to your home directory (cp clggl2 /home/youruserid) You must save all C++ files as .cpp files. To compile type: clggl2 filename (with no .cpp)


Working in Microsoft Windows
These instructions were prepared by Prof. Costa.

 

Windows 95/98/NT

For working on an WinTel PC platform, the best method is to use Microsoft Visual C++. The Standard Edition can be purchased for about $99. There is also a student edition directly available from Microsoft for about $49. In either case, it is worth the investment since you'll get a great deal of use out of it in the future.

 

Visual C++ contains the libraries for OpenGl and the OpenGL Utilities (GLU). You should find these in:

 

Library Location
Opengl32.lib C:\Program Files\Microsoft Visual Studio\VC98\Lib
Glu32.lib C:\Program Files\Microsoft Visual Studio\VC98\Lib

 

Windows 95/98/NT supports OpenGL which means that the Dynamic Link Libraries (dll) comes with the operating system. You should find the following dll's already on your system:

 

Library Location
Opengl32.dll C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM
Glu32.dll C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM

 

What you need are the header files for the include statements and the libraries for the OpenGL Utility Toolkit (GLUT). To obtain this go to http://www.xmission.com/~nate/glut.html where you'll find the Win32 version of GLUT developed by Nate Robbins. This was created from the original GLUT that Mark Kilgard of SGI developed. The easiest route - there is no guilt in taking an easy route - is to use the pre-compiled version:

 

 glut-3.7.3-dlls.zip (104 Kbytes)
 GLUT for Win32 DLL's, libraries and header files (everything you need to get started programming with GLUT).

 

that appears on the page. There is a source code version, but if you follow the instructions you will wallow in "linker limbo" trying to figure out why you are getting the message "__glutCreateWindowWithExit not located in glut32.dll" and waste a lot of time. Stick with the pre-compiled version. Just extract the zipped files from the link above and then copy them into the following directories:

 

Copy Into
glut32.dll C:\WINDOWS\SYSTEM (for Windows 98) orC:\WINNT\SYSTEM32 (for Windows/NT)
glut32.lib C:\Program Files\Microsoft Visual Studio\VC98\lib
glut.h C:\Program Files\Microsoft Visual Studio\VC98\Include\GL

 

When you use Visual C++ and start a new project, be sure to create a Win32 Console Application.

Next choose Project => Settings? and then select the Link tab. Add Opengl32.lib, glu32.lib and glut32.lib in the Object/library modules entry window and select OK.

  • www.xmission.com/~nate/tutors.html
    This is where you'll find Nate Robins' executables (tutors.zip) for the tutoring programs discussed in class.
  • www.flipcode.com/geometry
    This site has a very gentle introduction into the mathematics behind 3D geometries.
  • http://www.cs.fit.edu/wds/classes/cse5255/thesis/index/index.html
    Very good overview of computer graphics done as a Master Thesis at Florida Institute of Technology. Good section on transformations.
    Source code

    Source Code / Libraries

    hello.cpp
    Hofstra University, Department of Computer Science
    Last Update: 02/13/02

    ppm file format description
    C function that reads ppm file, P6
    sample ppm file, P6

      Class pixmap
    • RGBpixmap.h
      . You need readPPMFile and readBMPFile for reading image files.
    • RGBpixmap.cpp
    • Note the C function for reading ppm file is incorporated in the class
    • rgbpixmaps.cpp, implementation of the method RGBpixmap::setTexture which sets the parameters for a texture object (ideally should be inside RGBpixmap.cpp though)
    • Be careful if you read .bmp files the color order is (blue, green, red), the .ppm is (red,green,blue).