Introduce basic concepts of computer graphicsios
Describe the 3D graphic representation flow in current PCgit
Describe some fundamental algorithms used in computer graphics算法
Introduce the computer graphics programming with OpenGL編程
Enhance the ability on programming and data structure exertionapp
Research in CG communityide
Survey of CG and Overview of Graphics Systems函數
Line/Circle Drawing algorithm測試
Polygon Fill Algorithm動畫
Introduction to OpengGL Programmingui
Lighting model
Geometric Transformations
Clipping
Visible-Surface Detection
是指由點、線、面、體等幾何要素(geometric attribute)和明暗、灰度(亮度)、色彩等視覺要素(visual attribute)構成的,從現實世界中抽象出來的圖或形
Generating 2D images of a 3D world represented in Computer by Computing, NOT by sensing.
(3D Models -> rendering -> 2D images)
– View, Transformation of Models (模型的投影和變換)
– Bezier Curves
– B-Spline Curves
– Triangle Mesh(三角網)
– Deformation (變形)
– Basic Concepts, OpenGL
– Lighting (光照)
– Ray Tracing (光線跟蹤)
– Acceleration of Ray Tracing(光線跟蹤加速)
– Texture (紋理)
– Shadow (陰影)
– Radiosity(輻射度)
• Rendering
• Computer Animation
• Geometry
• Video-based rendering
Geometric transformation in 3D space
Translation(平移)
Scaling(放縮)
Rotation(旋轉)
Homogeneous Coordinates(齊次座標)
Global Transformation and Local Transformation
void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar );
void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar );
Point clipping (點的裁減) :是否在區域內部
Binary Region Codes(區域編碼) :4-digit code CtCbCrCl(上下右左)
Mid-point Partition Algorithm(中點分割算法:二分)
輸出頂點爲0~2.
glFrustum函數和glViewport函數
圖形學流水線能夠歸納爲:
局部座標的3D模型經過3D空間的幾何轉換獲得全局座標的3D模型,經過投影獲得投影座標系中的2D圖形,經過窗口裁剪獲得窗口座標系中已裁剪的2D圖形,經過窗口到視口的變換,獲得視口座標系中的2D圖形,經過光柵化獲得視口座標系中的2D圖像
Avoiding ambiguity (消除二義性)
Get the correct visual effect (正確繪製)
Improving rendering rates (提升繪製效率)
實現與平面法向的夾角V· N<0爲前向面,V· N>0爲後向面
Ray Casting Method(瞭解):光線投射法
Z-buffer, Scan-Line Z-buffer(詳細掌握)
stores a depth value for each pixel on the screen
Scan-Line Z-buffer:To process one scan-line of the screen at a time in order to reduce storage requirements
Area-Subdivision Method(瞭解)
Depth Sorting Method(總體掌握)
– Flat shading(平面着色)
– Interpolative shading(插值着色):Interpolate color in interior
– Gouraud shading(高洛德着色 )
Face normal取平均獲得vertex normal計算獲得vertex color而後Interpolate colors across polygon
– Phong shading (different from Phong illumination)(Phong着色)
Interpolate normals rather than colors
• Introduction of ray tracing
• Ray intersection(光線求交)
• shadows(陰影)
• Transparence and specular reflection(透明和鏡面反射)
• textures(紋理)
光線追蹤的核心在於光線求交(Ray intersection)
The Simplest Ray Tracing:Ray Casting(光線投射)
Texture mapping(紋理映射) or texturing(貼紋理)
Texture acquisition(紋理獲取)
Taking photograph
Procedure texture(過程紋理)
Texture synthesis(紋理合成)
Texture mapping(貼紋理)
Texture filtering(紋理濾波)
Aliasing(走樣)和Anti-aliasing(反走樣)
Let computer have partial or aggressively complete capability of artists, that is selectively rendering objects stylized and abstracted.(讓計算機有藝術家的能力:抽象)
Animation :動畫
Simulation :模擬,仿真
Deformation :變形
Triangle Mesh :三角網
3D Data Acquisition and Modeling :三維數據採集和建模
Color Space :RGB、CMY、HSV、CIE XYZ
Diffuse :漫發射
Ambient :環境光
Specular :高光(鏡面反射)
Cathode ray tube(CRT) :陰極射線管
Raster-Scan Display :光柵掃描顯示器
frame buffer :幀緩衝(A memory area that image is stored in)
Resolution :分辨率
OpenGL :Open Graphic Library (開放的圖形編程庫)
Clipping :剪裁
Composite Transformation :綜合變換
Depth overlaps checking :深度重疊測試
一、畫出多個茶壺圍繞中心一週
二、void glTranslatef(float x, float y, float z);如何使用,平移前的座標是如何指定的?(移動整個物體)
x, y and z is the translation distances along the three axes.
三、void glRotate{fd} (TYPE angle, TYPE x, TYPE y, TYPE z);
繞vector(x,y,z)旋轉angle角度
四、void glScale{fd}(TYPE Sx, TYPE Sy, TYPE Sz)
Sx,Sy,Sz分別爲x,y,z變換的倍數
五、Local transformation can be implemented by inverse the multiplying order of the global transformation :局部變換能夠經過全局變換的逆乘法順序實現(順序徹底顛倒便可)
六、Global Transformation and Local Transformation
Global transformation
每一次變換都可以當作是相對於原始座標系執行的
後調用的變換矩陣乘在先前矩陣的左邊
先調用的變換矩陣先執行
Local transformation
每一次變換都可以當作是在上一次變換所造成的新的座標系中進行
後調用的變換矩陣乘在先前矩陣的右邊
後調用的變換矩陣先執行
7、void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar );
void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar );
兩個函數的使用方法:
8、Z-buffer算法
Z-Buffer算法在像素級上以近物取代遠物。面片在屏幕上的出現順序是可有可無的。