1 computer graphics chapter 1 dr. jehad q. o. alnihoud email: [email protected]@aabu.edu.jo...
Post on 19-Dec-2015
229 views
TRANSCRIPT
![Page 2: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/2.jpg)
RM [1]-2
Books
•F.S. Hill, Computer Graphics Using OpenGL, Prentice-Hall (2001).
•Mason Woo, OpenGL Programming Guide, Addison Wesley (2000).
•Hearn and Baker, Computer Graphics, Prentice-Hall (1997).
![Page 3: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/3.jpg)
RM [1]-3
Books (Supplementary reference)
Foley, V. Dam, Feiner, Hughes, Computer Graphics Principles and Practice, 2/e, Addison Wesley, 1997.
Edward Angel, Interactive Computer Graphics, Addison Wesley, 1997.
Zhigang Xiang, Schaum’s Outlines: Computer Graphics, McGrawHill, 2001.
Shreiner D, OpenGL Reference Manual, Addison-Wesley, 2000.
![Page 4: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/4.jpg)
RM [1]-4
Course Assessment
Coursework 50% First Exam 15% Second Exam 15% Group Project 10% Lab 10%
Final Exam 50%
Attendance in both lecture and lab sessions is compulsory.
![Page 5: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/5.jpg)
RM [1]-5
Graphics Applications
Art and Entertainment Animations Movies Commercials Special Effects
![Page 6: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/6.jpg)
RM [1]-6
Graphics Applications
Image Processing Analysis, Reconstruction Medical Imaging Movies
![Page 7: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/7.jpg)
RM [1]-7
Graphics Applications
Simulation Modeling and Analysis Virtual Environments
![Page 8: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/8.jpg)
RM [1]-8
Graphics Applications
Scientific Visualization Data Representation and Plotting 3D Views
![Page 9: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/9.jpg)
RM [1]-9
Graphics Applications
CAD/CAM Industrial Design Structural Design Surface Modeling
![Page 10: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/10.jpg)
RM [1]-10
Graphics Software Packages
Early graphics libraries:
GKS (Graphical Kernel System)
PHIGS
OpenGL (Silicon Graphics)
Java2D (Sun Microsystems)
Java3D (Sun Microsystems)
VRML (Silicon Graphics)
![Page 11: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/11.jpg)
RM [1]-11
Graphics: Main Components
Theory
Analytical Geometry
Vectors and Matrices
Algorithms
Eg: Line drawing, Filling etc.
Implementation
Programming (OpenGL)
![Page 12: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/12.jpg)
RM [1]-12
Graphics Hardware
Line Drawing Devices: Eg. Pen Plotters Advantages: Perfect lines, Sharp Diagrams Disadvantages: Not suitable for filled regions.
![Page 13: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/13.jpg)
RM [1]-13
Graphics Hardware
Raster Devices: Create pictures by displaying dots Eg: Video monitor, dot-matrix printer,
laser printer, ink-jet printer, film recorder Advantages: Filled, shaded regions are
easily displayed Disadvantages: Jaggies
Pixel
![Page 14: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/14.jpg)
RM [1]-14
Pixel Depth Pixel depth refers to the number of bits used
to represent a pixel value.
1 bit/pixel: 0
1
2 Levels(Bi-level image)
2 bits/pixel: 0
0
4 Levels0
1
1 0
1 1
![Page 15: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/15.jpg)
RM [1]-15
Pixel Depth
1 bit per pixel produce 2 levels (bi-level image).
2 bits per pixel produce 4 levels.8 bits per pixel produce 256 levels.
In general, if the pixel depth is n, then it is possible to have 2n levels.
![Page 16: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/16.jpg)
RM [1]-16
Raster Display
Most display used for computer graphics nowadays are raster displays.
Image presented in display surface that contains certain number of pixels. Eg. 480 x 640 (r x c).
Frame buffer is a region of memory sufficiently large to hold all the pixel values for display.
![Page 17: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/17.jpg)
RM [1]-17
Frame Buffer
System with 64 color (3 DACs): Each DAC uses 2 bits/pixel. Total color: 4 x 4 x 4 = 64 If the display surface is 1024 x 1280, then the
memory required for frame buffer is 0.9375 MB Monochrome Video display:
Only one DAC required. 6 planes of memory in frame buffer gives 26 = 64 level of gray.
![Page 18: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/18.jpg)
RM [1]-18
Frame Buffer
System with 24 bit color (3 DACs): Each DAC uses 8 bits/pixel. (Total 24 bits/pixel) Total color: 28 x 28 x 28 = 224 If the display surface is 1024 x 1280, then the memory
required for frame buffer is 3.75MB
![Page 19: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/19.jpg)
RM
Basis colors: R, G, B
R: Red=[1, 0, 0]
G: Green=[0, 1, 0]
B: Blue=[0, 0, 1]
C: Cyan=[0, 1, 1]
M: Magenta=[1, 0, 1]
Y:Yellow=[1, 1, 0]
W:White=[1,1,1]
K: Black=[0,0,0]
Color Models: RGB Diagram• RGB Model is used for colored light sources• RGB Model is additive
![Page 20: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/20.jpg)
RM [1]-20
Complementary Colors: Two colors that combine to form White. Eg. Red, Cyan.
Gray Values: Every point on the primary diagonal has equal values for all the components.
Color Models: RGB Cube
![Page 21: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/21.jpg)
RM [1]-21
Basis colors: C, M, Y
C: Cyan=[1, 0, 0]
M: Magenta=[0, 1, 0]
Y: Yellow=[0, 0, 1]
R: Red=[0, 1, 1]
G: Green=[1, 0, 1]
B: Blue=[1, 1, 0]
W:White=[0,0,0]
K: Black=[1,1,1]
Color Models: CMY Diagram• CMY Model is used for colored pigments• CMY Model is subtractive
![Page 22: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/22.jpg)
RM [1]-22
Color Models: RGB <-> CMY
(r, g, b)RGB = (1,1,1) (c, m, y)CMY
Light
A red colored surfaceabsorbs cyan from awhite light
![Page 23: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/23.jpg)
RM [1]-23
Color Models: HSV HexCone
![Page 24: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/24.jpg)
RM [1]-24
H (Hue): 0 to 360 degrees 0: Red, 60: Yellow ….
S (Saturation): 0 to 1 0: Axis, 1: Boundary
V (Value): 0 to 1 0: Vertex, 1: Base
Examples:
Eg. Yellow: [60, 1.0, 1.0]
Black: [ -, -, 0.0]
White: [-, 0.0, 1.0]
Color Models: HSV
![Page 25: 1 Computer Graphics chapter 1 Dr. Jehad Q. O. Alnihoud Email: jehad@aabu.edu.jojehad@aabu.edu.jo Phone: 3354](https://reader035.vdocuments.us/reader035/viewer/2022062320/56649d395503460f94a13c95/html5/thumbnails/25.jpg)
RM [1]-25
RGB Color Definition (OpenGL)
Set a particular color: glColor3f(r,g,b);
Set a background color: glClearColor(r,g,b,1);
Clear the window to background color:
glClear(GL_COLOR_BUFFER_BIT);