Windows & DirectX Programming #1
Kang, Seong-tae Computer Graphics, 2009 Spring
CGLab
Contents
Basic Windows Programming Windows GDI Preparing for DirectX Programming
CGLab
Prerequisites
Windows 200
Computer Graphics Assignment #1
Drawing Lines and Polygons
n Input file Number of vertices Vertex information Index Position : x, y (0~500)
Number of polygons Polygon information Index Number of verti
Computer Graphics Assignment #2
3D Viewing
n What to do You should show the process that makes each matrix World, viewing, projection, viewport Projection is parallel or perspective
n
Mesh Input file
Curves and Surfaces
Chap. 8 Intro. to Computer Graphics, Spring 2009, Y. G. Shin
Representation of Curves and Surfaces
Key words
surface modeling parametric surface continuity, control points basis
DirectX Programming ect og a g #1
Kang, Seongtae Computer Graphics, 2009 Spring
Contents
Installation and Settings Introduction to Direct3D 9 Graphics Initializing Direct3D g Rendering Vertices
Instal
DirectX Programming #2
Kang, Seongtae Computer Graphics, 2009 Spring
Contents
The D3D coordinate system Transformation and matrix manipulation Material and Lighting
The D3D Coordinate System
Left-ha
DirectX Programming #3
Kang, Seongtae Computer Graphics, 2009 Spring
Texture
In real world, only few surfaces have uniform color
How to describe non-uniform surface Divide a surface into numerous su
DirectX Programming #4
Kang, Seongtae Computer Graphics, 2009 Spring
Programmable Shader
For recent hardwares, vertex and pixel processing stage of the graphics pipeline is programmable
Programmable
DirectX Programming #5
Kang, Seongtae Computer Graphics, 2009 Spring
The Sample Program
A blue cylinder with white specular color Gouraud shading with one spotlight
Primitives
const int CIRCLE_DIV
( )
2008. 6. 5
1. What effects are lost in Phong illumination when the light source and the viewer infinitely far away from the scene? 2. Discuss two effects that are missed by Phong illumination and
( )
2008. 4. 24
1. 2.
Discuss pros and cons of raster graphics compared with vector graphics. [5pt] Frame buffers are described as having a certain depth. What does the depth refer? What is stored in
Modeling
Chapter 8 Intro. to Computer Graphics Spring 2009, Y. G. Shin
Components for Image Synthesis
Scene description Light source Viewpoint Scene = an assembly of one or more models A model contai
Graphics Primitives
Chapter 3 & 4 Intro. to Computer Graphics p p Spring 2008, Y.G. Shin
Graphic Output and Input Pipeline
Scan conversion
converts primitives such as lines circles etc lines, circles,
Illumination and Shading
Chapter 10 Intro. to Computer Graphics Spring 2009, Y. G. Shin
Illumination and Shading
Given: scene specification (object positions, optical properties of the surface, viewer
Antialiasing A ti li i
Chapter 4 Ch Intro. to Computer Graphics Spring 2009 Y.G. Shin 2009, Y G
A Simple Image Model Si l I M d l
Image: a 2-D lightintensity function f(x y) f(x,y) The value of f at (
Color and Color Model
Chap. 12
Color Visibility
n
Interpretation of color is a psychophysiology problem
We could not fully understand the mechanism Physical characteristics of color can be represente
VisibleVisible-Surface Detection Methods
Chapter 9
The Visibility Problem
[Problem Statement]
GIVEN: a set of 3-D surfaces, a projection from 3-D to 2-D screen, DETERMINE: the nearest surface encounte
Graphics (Output) Primitives
Chapters 3 & 4
Graphic Output and Input Pipeline
n
Scan conversion
n
n
converts primitives such as lines, circles, etc. into pixel values geometric description a finite sc
2D G Geometric ti Transformations T f ti
Chapter 5 Intro. Intro to Computer Graphics Spring 2009, Y. G. Shin
Introduction
We d l l t W deal a lots with objects defined in 2-D and 3-D ith bj t d fi d i
Two-Dimensional Viewing
Chapter 6 Intro. to Computer Graphics Spring 2009, Y. G. Shin
Viewing Pipeline
Two-Dimensional Viewing
Two dimensional viewing transformation
From world coordinate scene descri
Geometric Transformations
Chapter 5
Introduction
n
n
We deal a lots with objects defined in 2-D and 3-D worlds in computer graphics All objects have shape, position and orientation
geometric descript
3D Geometric Transformations
Chapter 5 Intro. to Computer Graphics Spring 2009, Y. G. Shin
3D Transformation
Right-handed coordinate system
y
x
x' x1 y ' y 1 z ' z1 h 0
x2 y2 z2 0
x3 y3 z3 0
tx x t y
Three-Dimensional Th Di i l Viewing Vi i
Chap 7, 2009 Spring Yeong Gil Shin
Viewing Pi li Vi i Pipeline
How to d fi a window? H define i d ? How to project onto the window?
Rendering R d i
"Create a p
Two-Dimensional Viewing
Chapter 6
Viewing Pipeline
TwoTwo-Dimensional Viewing
n
Two dimensional viewing transformation
n
From world coordinate scene description to device (screen) coordinates
Normaliz
ThreeThree-Dimensional Viewing
Chapter 7
Viewing Pipeline
How to define a window? How to project onto the window?
Rendering
"Create a picture (in a synthetic camera)"
n n
Specification of projection t
DirectX Programming #1
Hyunna Lee Computer Graphics, 2010 Spring
Contents
Installation and Settings Introduction to Direct3D 9 Graphics Initializing Direct3D Rendering Vertices The D3D coordinat
3D Object Representations
Chapter 8
Components for Image Synthesis
Scene description Light source Viewpoint Scene = an assembly of one or more models A model contains structural description - geometr
ThreeThree-Dimensional Viewing
Chapter 7
Viewing Pipeline
How to define a window? How to project onto the window?
Rendering
"Create a picture (in a synthetic camera)"
n n
Specification of projection t
Curves and Surfaces
Chapter 8
Representation of Curves and Surfaces
n
Key words
n n n n n n
surface modeling parametric surface continuity, control points basis functions Bezier curve B-spline curve
W