Computer Graphics
Syllabus | Course Notes | OpenGL Notes | Assignment Student Gallery
Chapter 1: Computer Graphics and Its Application. [PPT][Word] by Ching-Shoei Chiang
Chapter 2: Computer Graphics Hardware and Software. [PPT][Word] by Ching-Shoei Chiang
Chapter 3: 2D Coordinate Geometry. [PPT][Word] by Ching-Shoei Chiang
Chapter 4: 2D Viewing Operations. [PPT][Word] by Ching-Shoei Chiang
Chapter 5: 3D Coordinate System. [PPT][Word] by Ching-Shoei Chiang
All chapter notes download. [PDF] by Ching-Shoei Chiang
The teaching course in SIGGRAPH in 2001 by Shreiner, Angel and Shreiner. [Contents][Notes]
OpenGL 0: How to include the slut.h in visual C++ 6.0? [PPT files by Yi-Min Kuo]
This chapter tells you how to include the slut.h into visual C++, ......
OpenGL 1: Your first simple program "simple.c". [simple.c by Angel][PPT files by Yi-Min Kuo][simple.JPG]
In this program, you learn how to open a window, draw a square in the window using the following GL and GLUT functions:
glClear, glBegin, glEnd, glFlush
glutCreateWindow, glutDisplayFunc, glutMainLoop
OpenGL 2: A Demo Program to show you OpenGL features including smooth shading, antialiasing, texture mapping, color interpolation. [demo.c by Angel][demo.JPG]
It is a demo program. All of the OpenGL (glut) features will be illustrated more detail in the future class.
OpenGL 3: Sierpinski Gasket. There are 3 programs for Sierpinski Gasket, including:
(1) 2D Sierpinski Gasket generated using randomly selected Vertices and bisection. [gasket.c by Angel][gasket.JPG]
(2) Recursive subdivision of triangle to form Sierpinske gasket. [gasket2.c by Angel][gasket2.JPG]
(3) 3D Sierpinski Gasket GL program. [gasket3D.c by Angel][gasket3d.JPG]
(4) Recursive subdivision of tetrahedron to form 3D Sierpinski Gasket. [tetra.c by Angel][tetra.JPG]
You learn the following GL and GLUT functions:
(1) glClearColor, glColor, glMatrixMode, glLoadIdentity, glOrtho2D
glutInit, glutInitDisplayMode, glutInitWindowPosition
(2) No new function.
(3) glOrtho
(4) glNormal, glViewport, glEnable
glutPostRedisplay, glutReshapeFunc
You also learn recursive techniques in (2), how to use mouse with OpenGL to start and stop program execution in (3), how to avoid the distortion in the window in (4).
There are references for Sierpinski Gasket on the web. I recommend the one by Paul Baurke for our undergraduate student.
OpenGL 4: Earth. THis is a program to demo the use of quad strips and triangle fans for modeling a sphere by longitude and latitiude. You should know how to parameterize a sphere. [earth.c by Angle][earth.JPG][PPT by Yi-Min Kuo]
Library functions: glrotate, glPolygonMode;
OpenGL 5: Square. The program illustrates the use of the glut library for interfacing with a Window System. [square.c by Angle][square.JPG][PPT by Yi-Min Kuo]
Library function: glutMotionFunc;
OpenGL 6: Double buffer. Why we need the double buffering? How to handle the animation using OpenGL? This program with chapter 1 of the OpenGL Programming Guide gives you detail explanation. [double.c from Silicon Graphics][double.JPG]
OpenGL 7: Lines and lines stipple. This program demonstrates geometric primitives and their attributes, especially the line and line stipples. Please read the Chapter 2 of the OpenGL Programming Guide. [lines.c from Silicon Graphics][lines.JPG]
OpenGL 8: Polygon stippling. This program demonstrates polygon stippling. Please read the Chapter 2 of the OpenGL Programming Guide. [polys.c from Silicon Graphics][polys.JPG]
OpenGL 9: Model Transformation and Viewing Transformation. The program demonstrates modeling transformation glScalef() and viewing transformation gluLookAt(). [cube.c from Silicon Graphics][cube.JPG]
Library Function: glScalef, glMatrixMode, glFrustum; gluLookAt; glutWireCube.
OpenGL 10: Model Transformation. This program demonstrates modeling transformations. [model.c from Silicon Graphics][model.JPG]
OpenGL 11: Single buffer and double buffer. This program will show two windows at the same time with single buffer and double buffer used. [single_double.c by Angle][single_double.JPG]
Library Function: glPushAttrib, glPopAttrib, glRasterPos.
OpenGL 12: New Paints. This program teach us how to design a simple tools bar. Let user have interaction with OpengGL program. [newpaint.c][newpaint.JPG][PPT by Yi-Min Kuo]
Library Function: glutBitmapCharacter, glutBitmapWidth, glutCreateMenu, glutAddMenuEntry, glutAttachMenu, glutAddSubMenu.
OpenGL 13: Shadow. This program draws a polygon and its shadow. [shadow.c by Angle][shadow.JPG]
OpenGL 14: Sphere. This program show the display of sphere in three modes: wire frame, constant, and interpolative shading. [sphere.c by Angle][sphere.JPG]
OpenGL 15: Smooth-Shaded Triangle. This program is drawing a triangle with smooth model color. [smooth.c][smooth.JPG]
Library Function: glShadeModel.
OpenGL 16: Using glColorMaterial. This is an interactive program that uses glColorMaterial() to change material parameters. Pressing each of the three mouse buttons changes the color of the diffuse reflection. [colormat.c][colormat.JPG]
Library Function: glColorMaterial, glMaterial.
OpenGL 17: A Simple Bezier Curve. The program draws a cubic Bezier curve using four control points.[bezcurve.c][bezcurve.JPG]
Library Function: glMap1, glEvalCoord.
OpenGL 18: Curves. This is a simple interactive curve drawing program. [curves.c by Angel][curves.JPG]
Library Function: glMapGrid, glEvalMesh.
OpenGL 19: Read Pixels. This program reads pixels values from display and prints out RGB. [readpixels.c by Angel][readpixels.JPG]
Library Function: glReadPixels, glReadBuffer, glPixelStore.
OpenGL 20: Blending. Blend colors to achieve such effects as making objects appear translucent. [alpha.c from Redbook][alpha.JPG]
Library Function: glBlendFunc;
OpenGL 21: Three-Dimensional Blending: [alpha3D.c from Redbook]
OpenGL 22: Use the accumulation buffer to do full-scene antialiasing on a scene with orthographic parallel projection.[accanti.c]
OpenGL 23: Antipoly. This program draws filled polygons with antialiased edges. [aapoly.c][aapoly.JPG]
OpenGL 24: Fog. This program draws 5 red spheres, each at a different z distance from the eye, in different types of fog. Pressing the f key chooses between 3 types of fog: exponential, exponential squared, and linear.[fog.c][fog.JPG]
OpenGL 25: Fogindex. This program draws 5 wireframe spheres, each at a different z distance from the eye, in linear fog.[fogindex.c]
Assignment 1: This OpenGL program assignment is due on October 3, 2006.
Assignment 2: This OpenGL program assignment is due on November 7, 2006.
Assignment 3: This OpenGL program assignment is due on December 12, 2006.
ID | Output |
92156241 | |
92156241 | |
90156150 | |
92156140 | |
92156102 | |
92156297 | |
Cone/Cone Intersection | |
CyclographicMaps | |
89156217 | |
89133037 |
相關網址:
相關書籍: Computer Graphics using Open GL by F.S. Hill, Jr.
有關OpenGL: http://www.opengl.org
http://www.sgi.com/software/opengl/manual.html
相關網站: Search Engine: http://www.google.com/ 後鍵入OpenGL或Computer Graphics 搜尋
CG basic idea: http://www.geom.umn.edu/docs/reference/CRC-formulas/
http://astronomy.swin.edu.au/~pbourke/
CG Research Site: http://mambo.ucsc.edu/psl/cg.html
http://cggmwww.csie.nctu.edu.tw/index.html