Graphics (Second Exam) - 1

advertisement
Graphic Systems
Basic Graphics System
Output device
Input devices
Image formed in FB
[Edward Angel, Interactive computer Graphics, 2009]
Display Technologies







RASTER SCAN DISPLAYS
RANDOM-SCAN DISPLAYS
COLOUR CRT MONITORS
FLAT-PANEL DISPLAY
GRAPHICS INPUT DEVICES
COLOR MODELS
GRAPHICS PIPELINES
RASTER SCAN DISPLAYS
In a raster-scan system the electron beam is swept across
the screen one row at a time from top to bottom. As the
electron beam moves across each row, the beam intensity
is turned on and off to create a pattern of illuminated
spots.
 Raster-scan displays is based on the CRT technology.
[Hearn & Baker]
RASTER SCAN DISPLAYS
Picture definition is stored in a memory
area called the refresh buffer or frame
buffer. This memory area holds the set of
intensity values for all the screen points.
These stored intensity values are then
retrieved from the refresh buffer and used
to control the intensity of the electron
beam as it moves from spot to spot across
the screen.
RANDOM-SCAN DISPLAYS

When operated as a random-scan
display unit, a CRT has the electron beam
directed only to the parts of the screen
where a picture is to be drawn. Randomscan monitors draw a picture one line at a
time and for this reason are also referred
to as vector displays
COLOUR CRT MONITORS

A CRT monitor displays color pictures by
using a combination of phosphors that
emit different-colored light. By combining
the emitted light from the different
phosphors, a range of colors can be
generated. The two basic techniques for
producing color displays with a CRT are
the beam-penetration method and the
shadow-mask method.
COLOUR CRT MONITORS

All colors can be created with the
primary colors of red, green and blue
(RGB).
[Hearn & Baker]
COLOUR CRT MONITORS

For RGB color systems, we need at least 3 bits/pixel.
◦ One bit for each R, G, and B.
◦ Each gun can get on/off.
◦ 8 colors possible!

Suppose 8 bits for each R, G, and B.
◦ Each of R, G, and B has 28=256 levels of intensities.

24 bits/pixel, and so 22416.4M colors possible!
◦ It’s called a true color system.
◦ e.g. for 10241024 resolution, 3MB frame buffer
◦
cf. 125KB frame buffer for monochrome system

The number of bits per pixel is often called the depth of
the frame buffer.
FLAT-PANEL DISPLAY

Flat panel displays: use a mesh of wires to
set color of a pixel.



2 layers of horizontal and vertical wires
Display material between the two wire sets (determines
specific display type like LCD, Plasma LED)
Pixel is accessed by sending a charge over horizontal /
vertical wire pair.
plate with
"display" material
vertical
grid
wires
0
1
2
3
4
5
6
7
8
observer
78
6
5
4
3
horizontal
2
grid
1
0
wires
PIXEL

A pixel (picture element) is the
smallest addressable location on the
screen.
1
Pixel column number
2
3
M
(0,0)
x
1
2
3
Scanline
number
N
y
Coordinate System
(x, y)
Storage
The figure above shows a screen containing N rows of pixels, with
M pixels along each row. The pixel dimension for the above screen
is M x N pixels. Typical pixel dimensions of screens are 640x480,
800x600, and 1280x1024.
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.
FRAME BUFFER
◦ a region of memory where the picture definition for
the entire screen is stored
◦ sufficiently large to hold all the pixel values of the
display surface.
FRAME BUFFER
Frame buffer is the memory area
where the picture information is stored. If
a system has n bits of storage for each
pixel, then frame buffer size = MNn/8
bytes. The total number of colors that
can be simultaneously displayed on the
monitor is 2n.
 The system is said to have n bit planes.
 M and N is pixel dimensions of screen.

Graphics Input Devices

String: a string of characters followed
by a termination character typed in by the
user and stored in memory.
◦ Example: Keyboard
◦ Applications: Text input
Graphics Input Devices
◦ Valuator: a real value between 0.0 and 1.0,
which can be used to fix the length of a line,
the speed of an action, or perhaps the size of
a picture.
 Examples: Control Dials, Sensing devices, Joystick,
Trackball, Digitizer
 Applications: Input of graphics parameters, Graphics
representation of analog values, Process simulation,
Games.
Graphics Input Devices

Locator: a coordinate pair (x, y) which
enables the user to point to a position on
the display.
◦ Examples: Mouse, Keyboard (Function Keys),
Touch Panel etc
◦ Applications: Interactive menu selection,
Program control.
Graphics Input Devices

Pick: identifies a portion of a picture for
further processing.
◦ Examples: Mouse, Joystick, Digitizer.
◦ Applications: Interactive editing and
positioning.
Graphics Input Devices

Tablet: locate input primitives. A tablet
provides an area on which the user can
slide a stylus. The tip of the stylus contains
a micro switch. By pressing down on the
stylus the user can trigger the locate.
3-D Graphics Input Devices

Devices that provids information about three
dimensional positions and motion. Few
examples are:
1.
2.
3.
4.
Data Gloves
Space Grips
Spaceballs
Imaging Sensors
3-D Graphics Input Devices
Cybergrasp – data glove with haptic
feedback
Space Grips
Graphics Software Packages
◦ Special-purpose packages
 Non-programmers
 Adobe Photoshop, AUTOCAD, 3D Studio Max
◦ General graphics programming packages (CG
API)
 Pioneer software standards - GKS (Graphical
Kernel System), PHIGS
 Current packages – OpenGL (de facto graphics
standard), DirectX, Java2D, Java3D,VRML
COLOR MODELS

Combining light with different dominant
frequencies (colors) generates other
colors. Therefore the two or more colors
used to obtain a wide range of other
colors is called the primary colors. Eg.
The three primary colors Red, Green and
Blue are used to produce other colors in
the RGB color model.
RGB COLOR MODEL
A color model defined with the primary Red,
Green and blue colors. We can represent this
model with the unit cube defined on R, G, and B
axes, as shown in Figure. RGB Model is additive
RGB COLOR MODEL

Each color point within the bounds of the
cube can be represented as the triple ( R ,
G, B), where values for R, G, and B are assi
gned in the range from 0 to 1.

In OpenGL (which is a general-purpose
graphics library), each RGB component is
specified as a number between 0.0 and 1.0.
e.g. glColor3f(1.0, 0.5, 0.7);
CMY COLOR MODEL
A color model defined with the primary colors cyan,
magenta, and yellow (CMY) is useful for describing
color output to hard-copy devices. CMY Model is
subtractive
RGB vs. CMY
Additive and subtractive color. RGB is used to specify additive color. CMY is
used to specify subtractive color
HSV COLOR MODEL
Instead of a set of color primaries, the HSV model
uses color descriptions that have a more intuitive
appeal to a user. To give a color specification, a
user selects a spectral color and the amounts of
white and black that are to be added to obtain
different shades, tints, and tones.
HSV COLOR MODEL
efg’s computer lab (www.efg2.com)
HSV COLOR MODEL



H (Hue): 0 to 360 degrees
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]

Graphics Pipelines
Graphics processes generally execute
sequentially
 Typical ‘pipeline’ model
 There are two graphics pipelines:

◦ The Geometry or 3D pipeline
◦ The Imaging or 2D pipeline
Geometry/3D Pipeline
Modeling: shapes
Shading: reflection and lighting
Transformation: viewing
Hidden Surface Elimination
Imaging
Pipeline
Imaging/2D Pipeline
Geometry
Pipeline
Rasterization
Texture Mapping
Image Composition
Intensity and Colour Quantization
Framebuffer/Display
Rasterization

The process by which our geometry is
converted to pixel sequences on a CRT
monitor.
Download