Comp 365 - Computer Graphics (Spring 2021)
Introductory Information and Textbook Resources
Handouts/In-Class Examples
- Makefile - sample Makefile; add any source code file names to this.
- helloclass.cpp - first practice program that draws a couple of simple polygons.
- helloOOP.cpp - even smaller program, similar to helloclass.cpp, but using OOP.
- circle.cpp - program showing how to draw circles with OpenGL.
- colorFun.cpp - messin' with RGB.
- text.cpp - program that shows some text output options. You'll also need tkmap.c. Note that tkmap.c is a C program, but the C++ compiler will work fine. You must modify text.cpp so that tkmap.c will be found.
- font.c - more text manipulation. This also needs tkmap.c.
- menu.cpp - teeny program showing the use of an OpenGL pop-up menu.
- mouse.cpp - how to draw points and polylines with the mouse, v1.
- mouse2.cpp - how to draw points and polylines with the mouse, v2.
The difference is that all of the points/vertices are stored, allowing the window to be redrawn whenever
necessary.
- displayList.cpp - how to draw some polygons using a display list. A display list will be important for some projects.
- windows.cpp - windows/viewports and "viewing box."
- perspect1.cpp - an example in the use of perspective, among other things. See the comments within the program that explain the use of glFrustum() and gluLookAt().
- myanimate.cpp - animation example; also shows use of the Modelview Matrix Stack.
- moveTeapot.cpp - starting code for animating the teapot.
- quaternion.cpp - rotating about an arbitrary radial axis.
- 3D Visualization Help
- mySquare.cpp - enhanced version of square.cpp for use in exploring orientation.
- perspect2.cpp - perspective, depth buffer, and more.
- lighting.cpp - basic Phong lighting model, using the keypad for movement.
- lightMouse.cpp - same as above but with the teapot and using the mouse for movement.
-
Brownian motion 1 - animation of Brownian motion from our friends at BU.
-
Brownian motion 2 - live demonstration of Brownian motion.
-
shadingInit.cpp - setting up lighting model.
- mytexture.cpp - demo program showing the use of OpenGL texture functions.
- CelebDM.ppm - original texture image for above.
- CelebDMud.ppm - same image but flipped in y to match texture space.
- glm.h - header file needed for texture program.
- glm.c - implementation code for above header file.
- stb_image.h - an
alternative library for reading image files for texturing.
- Other ppm files:
- multTexture.cpp - same as mytextures.cpp but now with multiple textures.
- Persistence of Vision Raytracer (POV-Ray)
Computer Graphics Images
- Fractals:
- Sample images produced using ray-tracing:
- Sample images produced using radiosity:
- A couple of student images:
- Basic sample images created by GLUT or GLU functions:
-
model 1 - scary robot made from cubes and spheres.
-
model 2 - fan made from spheres, cylinder, and cubes.
-
model 3 - another scene made from the same objects as above.
-
model 4 - landscape made using fratal techniques and triangulating.
-
here's real terrain - surface interpolated from a contour map of the Franconia Range in NH. The bright colors represent higher curvature areas.
Last updated