Computer Graphics & Multimedia: BTCS-503 Nikhil Chaturvedi
Computer Graphics & Multimedia: BTCS-503 Nikhil Chaturvedi
MULTIMEDIA
BTCS-503
NIKHIL CHATURVEDI
WHAT IS COMPUTER GRAPHICS ?
Creation, Manipulation and Storage of
geometric objects (modeling ) & their
images (rendering )
Display
those images on screens or
hardcopy devices
WHY COMPUTER GRAPHICS?
Fun! Visible!
Everywhere
Parallel input
Parallel processing
Computer graphics: ideal for human-computer
communication
APPLICATIONS
Graphs and charts
Computer-Aided Design
Virtual Reality
Data Visualization
Computer Art
Movies
Games
AutoDesk
General
graphics libraries and standards
Windows API, OpenGL, Direct3D,…
CG STANDARDS
Setof graphics functions, to be called from
programming language
Access to and abstract from hardware
Standardization
DISPLAY DEVICES
Lookup Table
CATHODE RAY TUBE (CRT):
COMPONENTS OF CRT:
High Resolution
Disadvantages:
Random-Scan monitors cannot display realistic shades
scenes.
RASTER SCAN DISPLAY
Disadvantages:
Low Resolution
Expensive
DIFFERENTIATE BETWEEN RANDOM AND RASTER
SCAN DISPLAY
FUNCTIONS
Graphics Output Primitives
Line, polygon, sphere, …
Attributes
Color, line width, texture, …
Geometric transformations
Modeling, Viewing
Shading and illumination
Input functions
SOFTWARE STANDARDS
GKS, PHIGS, PHIGS+ (1980-)
GL (Graphics Library, SGI)
Broad support
http://www.opengl.org/sdk/docs/man2/
The Red Book:
http://www.glprogramming.com/red/
Many other web-sites
GLUand GLUT:
Handy functions for viewing and geometry
OPENGL AND JAVA
C: glFunction(); gluFunction();
glutFunction();
Java: JOGL
gl.glFunction();
glu.gluFunction();
glut.glutFunction();
arc(100, 100, 0, 135, 50);
getch();
closegraph();
return 0;
}
Line
C programming code for line
#include <graphics.h>
#include <conio.h>
main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TC\\BGI");
line(100, 100, 200, 200);
getch();
closegraph();
return 0;
}
Putpixel
C programming code for putpixel
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TC\\BGI");
putpixel(25, 25, RED);
getch();
closegraph();
return 0;
}
ASSIGNMENT FOR TODAY