Computer Graphics



週數 日期 Course Notes OpenGL Notes

A History of Photography From Web (Cherokee County Schools)

Camara from Joe Collins

Photography (



 Camara from Joe Collins

Computer Graphics and Its Application. [PPT][Word] by 江清水

2D Coordinate Geometry. [PPT][Word] by 江清水




2D Viewing Operations. [PPT][Word] by 江清水

The newest version of OpenGL. OpenGL 4.3, release on 8/6/2012. (網路英文資料)

OpenGL Books. (網路英文資料)



OpenGL 0: How to include the slut.h in visual C++? [PPT][Word] by 許伶潁

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


What is Sierpinski Gasket?

3D Coordinate System. [PPT][Word] by 江清水

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-6: 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

      glutIdleFunc, glutMouseFunc

(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.

10/11 Introduction to OpenGl Functions.

OpenGL 7: 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 8: 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 9: 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 10: 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 11: 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 12: 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 13: Model Transformation. This program demonstrates modeling transformations. [model.c from Silicon Graphics][model.JPG]


OpenGL 14: 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 15: 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 16: Shadow. This program draws a polygon and its shadow. [shadow.c by Angle][shadow.JPG]


OpenGL 17: Sphere. This program show the display of sphere in three modes: wire frame, constant, and interpolative shading. [sphere.c by Angle][sphere.JPG]


OpenGL 18: Smooth-Shaded Triangle. This program is drawing a triangle with smooth model color. [smooth.c][smooth.JPG]

     Library Function: glShadeModel.

十一 11/22  

OpenGL 19: 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 20: A Simple Bezier Curve. The program draws a cubic Bezier curve using four control points.[bezcurve.c][bezcurve.JPG]

    Library Function: glMap1, glEvalCoord.

十二 11/29  

OpenGL 21: Curves. This is a simple interactive curve drawing program. [curves.c by Angel][curves.JPG]

    Library Function: glMapGrid, glEvalMesh.


OpenGL 22: Read Pixels. This program reads pixels values from display and prints out RGB. [readpixels.c by Angel][readpixels.JPG]

    Library Function: glRect, glReadPixels, glReadBuffer, glPixelStore.


十三 12/6  

OpenGL 23: Blending. Blend colors to achieve such effects as making objects appear translucent. [alpha.c from Redbook][alpha.JPG]

    Library Function: glBlendFunc;


OpenGL 24: Three-Dimensional Blending: [alpha3D.c from Redbook][alpha3D.JPG]

    Library Function: glEnable, glGenLists, glNewList, glutSolidSphere, glEndList


十四 12/13  

OpenGL 25: Use the accumulation buffer to do full-scene antialiasing on a scene with orthographic parallel projection.[accanti.c][accanti.JPG]

    Library Function: glMaterial, glLight, glLightModel, ShadeModel, glClearAccum,

OpenGL 26: Antipoly. This program draws filled polygons with antialiased edges. [aapoly.c][aapoly.JPG]

    Library Function: glCullFace, glBlendFunc


十五 12/20  

OpenGL 27: 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]

    Library Function: glFog, glHint,


OpenGL 28: Fogindex. This program draws 5 wireframe spheres, each at a different z distance from the eye, in linear fog.[fogindex.c]

    Library Function: glutSetColor, glClearIndex

十六 12/27    
十七 1/3 學生期末報告  



  1/3 1/10
3:30 第一組 建築物製作(10/4)

PPT    Menu   視訊1 視訊2

第十組 電玩遊戲立體人物模組(10/4)

PPT   圖片1 圖片2  圖片3

3:45 第二組 卡通人臉繪製(10/4)

PPT    Menu   Program   視訊

第十一組 利用Sketchup建置室內設計圖(10/4)

PPT   Menu   Program1   Program2

4:00 第三組 LOGO設計(10/11)

PPT    Menu   Program

第十二組 3D模型建構與控制-人形模組(10/4)

PPT   Menu   Program

4:15 第四組 機器人動畫(10/11)

PPT   Menu   Program

第十三組 遊戲的物理學

PPT   Menu   Program

4:30 休息十分鐘。請勿吵到其他班級上課
4:40 第五組 Plane game with VB(10/4)

PPT    Menu   Program   Demo



4:55 第六組 小精靈遊戲(10/11)

PPT   Menu   Program 

第十四組   國旗妙妙妙(10/4)

PPT   Program

5:10 第七組 動畫電影製作探討(10/4)


第十五組   多拉A夢2D圖(10/4)

PPT   視訊

5:25 第八組 全自動區分計算機和人類的圖靈測試(10/4)

PPT   Menu   Program

第十六組   360度全景攝影探討(10/11)


5:40 休息十分鐘。請勿吵到其他班級上課
5:50 第九組 機器人打籃球(10/4)

PPT    Menu   Program   Demo

6:05 教師講評 教師講評



OpenGL Notes

The teaching course in SIGGRAPH in 2001 by Shreiner, Angel and Shreiner. [Contents][Notes]




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.




Student Gallery

ID Output

PH Curve


Facial Drawing


Representation of Surface


Projections and Shadows


Ratio of the Circumference


Double Helix

Cone/Cone Intersection

Sierpinski tiling arrowhead


Sierpinski carpet


            相關書籍:             Computer Graphics using Open GL by F.S. Hill, Jr.




                                           OpenGL Programming Guide

                                           Silicon Graphic

            相關網站:      Search Engine: 後鍵入OpenGL或Computer Graphics 搜尋

                                   CG basic idea:


                                   CG Research Site: