0% found this document useful (0 votes)
64 views57 pages

Defining Computer Graphics Units

Uploaded by

Shruti Kurade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views57 pages

Defining Computer Graphics Units

Uploaded by

Shruti Kurade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Chapter 1

Introduction to Computer Graphics


Overview
• CG is the use of computer to define, store, manipulate and present
pictorial output.
• Steps:
– Pictures are represented in CG
– Pictures are prepared for presentation
– Previously prepared pictures are presented
– Interaction with the picture is accomplished.
1. Representing Pictures
• Algorithms accept picture data as polygons or edges which are in turn represented
by points.
• Points are the fundamental building blocks of picture representation.
• Of equal importance is the algorithm which explains how to organize these points.
• Ex: the unit square can be represented by its four corner points.
P1(0,0), P2(1,0), P3(1,1) and P4(0,1)
An associated algorithmic description will be:
Connect P1P2P3P4P1 in sequence.
OR
E1=P1 P2 E2=P2 P3 E3= P3 P4 and E4= P4 P1
An associated algorithmic description will be:
Display E1 E2 E3 E4 in sequence
Points or edges can be used to describe unit square as a single polygon:
S1= P1 P2 P3 P4 P1 or P1 P4 P3 P2 P1
OR
S1= E1 E2 E3 E4
• Points are represented as either pairs (x,y)[2D] or triplets(x,y,z) [3D] of numbers.
2. Preparing picture for presentation
• Picture information is stored in a data base file .
• Very complex picture requires very complex data bases and complex
algorithms to access them.
• These complex data bases contain data organized in various ways
generally referred to as data structures.
• Two ways to specify the position of point: absolute and relative
coordinates.
• Either real numbers or integers can be used.
• If integers are used we get limited word length.
• Solution is to use homogeneous coordinates to represent data at the
cost of loss in speed and loss in resolution.
• In homogeneous coordinates an n-dimensional space is represented
by n+1 dimensions.
3. Presenting previously prepared pictures
• Data used to present the picture is usually called the display file.
• Display file contains some portion, view or scene of the picture
represented by the total database.
• Displayed picture is usually formed by transformations on data
• Hidden line or surface removal, shading, transparency, texture or
color effects may be added before final presentation.
• Clipping
• Windowing and viewporting
Applications of Computer Graphics
– The development of Computer Graphics has been
driven by the needs of the user community and by
the advances in hardware and software.
– Applications can be split into four major areas:
• Display of information
• Design
• Simulation
• User Interfaces

Chapter 1 -- Graphics
CS 480/680 6
Systems and Models
Applications of Computer Graphics
Display of Information:
– architectural drawings, e.g. plan of a building
– maps: geographical information
– plotting statistical graphs, e.g. share prices
– medical images: Computed Tomography (CT), Magnetic
Resonance, Imaging (MRI)
– scientific visualization

Design (interaction important)


– Computer Aided Design (CAD)
– design of very-large-scale integrated (VSLI) circuits

Chapter 1 -- Graphics
CS 480/680 7
Systems and Models
Applications of Computer Graphics
Simulation
– flight simulation for training pilots
– computer games
– television and computer-animated films: Toy Story
(Pixar), Ice Age
– virtual reality
User interfaces
– window-based operating systems: Microsoft Windows,
Macintosh, X Windows
– internet browsers: Netscape, Explorer

Chapter 1 -- Graphics
CS 480/680 8
Systems and Models
A GRAPHICS SYSTEM
1. Input devices
2. Central Processing Unit
3. Graphics Processing Unit
4. Memory
5. Frame buffer
6. Output devices

Chapter 1 -- Graphics
CS 480/680 9
Systems and Models
• Pixels and the Frame Buffer
– At present, almost all graphics systems are raster-based
• A picture is produced from an array (the raster) of picture
elements (pixels)

• the pixels are stored in a part of memory called the frame


buffer ( a contiguous piece of memory).
• Its resolution—the number of pixels in the frame buffer—
determines the detail that you can see in the image
• Pixels and the Frame Buffer
• The depth, or precision, of the frame buffer, defined as the number
of bits that are used for each pixel, determines properties such as
how many colors can be represented on a given system
– 1-bit deep frame buffer allows only two colors
– 8-bit deep buffer allows 28 (256) colors
– full-color is 24-bit or more (true-color systems, or RGB-color systems)
– High dynamic range (HDR) systems use 12 or more bits for each color component.
• The CPU and the GPU
• The main graphical function of the processor is to take
specifications of graphical primitives (such as lines, circles, and
polygons) generated by application programs and to assign
values to the pixels in the frame buffer that best represent
these entities.
• For example, a triangle is specified by its three vertices, but to
display its outline by the three line segments connecting the
vertices, the graphics system must generate a set of pixels that
appear as line segments to the viewer.
• Rasterization or Scan conversion
– Process of converting the rasterized image stored in frame
buffer into the rigid display pattern of video.
Rasterization Pattern

Chapter 1 -- Graphics
CS 480/680 13
Systems and Models
• Output Devices
– The dominate type of display is the Cathode-ray tube
(CRT)

– For a human to see a steady, flicker-free image on most


CRT displays, the same path must be retraced, or
refreshed, by the beam at a sufficiently high rate, the
refresh rate.
– Color CRT’s or Shadow mask CRT:
• have three different colored phosphors arranged in
small groups (typically triads).

Chapter 1 -- Graphics
CS 480/680 15
Systems and Models
Refresh Cathode-Ray Tubes

• Resolution : The maximum number of points that can be


displayed without overlap on a CRT is referred to as the
resolution.
• A more precise definition of resolution is the number of points per
centimetre that can be plotted horizontally and vertically, or
• The total number of points in each direction.
• Aspect ratio : This number gives the ratio of vertical points to
horizontal points necessary to produce equal-length lines in both
directions on the screen.

16
Random Scan Display
• Line drawing device
• An electron beam which operates like a pencil to create a line image
on the CRT screen. The picture is constructed out of a sequence of
straight-line segments. Each line segment is drawn on the screen by
directing the beam to move from one point on the screen to the
next, where its x & y coordinates define each point. After drawing
the picture. The system cycles back to the first line and design all
the lines of the image 30 to 60 time each second
Raster Scan Display
• Point plotting
Raster Scan Refresh Device
• Point plotting device.
• A matrix of discrete cells, each of which can be made bright.
• Line can only be approximated by a series of dots close to the path of the line.
• Only horizontal, vertical and diagonal lines appear as straight line. All other lines
appear as series of stair steps. This is called aliasing or jaggies.
Raster Scan Refresh Device
• Raster CRT is implemented mostly using frame buffer (contiguous memory)
• One memory bit for each pixel in frame buffer. This amount of memory is
called as a bit-plane.
• A single bit plane yields black-and-white display.
• Frame buffer is digital and raster CRT is analog so a DAC is needed.
Raster Scan Refresh Device
• Color or gray levels are possible using additional bit planes.
• The intensity of each pixel on the CRT is controlled by a corresponding pixel
location in each of the N bit planes.
• The binary value from each of the N-bit planes is loaded into corresponding
positions in the register. The resulting binary number is interpreted as an
intensity level between 0 and 2N-1 . A total of 2N intensity levels are possible.
Raster Scan Refresh Device
• An increase in the number of intensity levels is possible by using a lookup table.
• Upon reading the bit planes in the frame buffer, the resulting number is used as an
index into the lookup table.
• Each entry in the lookup table is W bits wide. W is greater than N.
• So 2W intensities are in lookup table but only 2N intensities are available at one
time. To get additional intensities lookup table must be updated.
Raster Scan Refresh Device
• A simple color frame buffer is implemented with three bit planes, one for
each primary color.
• Each bit plane drives an individual color gun.
• These three colors are combined at CRT to yield eight colors.
Raster Scan Refresh Device
• Additional bit planes can be used for each of the three color guns.
Raster Scan Refresh Device
Random Scan CRT Display
• Line drawing device
• An electron beam which operates like a pencil to create a line image
on the CRT screen. The picture is constructed out of a sequence of
straight-line segments. Each line segment is drawn on the screen by
directing the beam to move from one point on the screen to the
next, where its x & y coordinates define each point. After drawing
the picture. The system cycles back to the first line and design all
the lines of the image 30 to 60 time each second.
RANDOM-Scan CRT 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.
• Random-scan monitors draw a picture one line at a time and
for this reason are also referred to as vector displays (or
stroke-writing or calligraphic displays).

27
RANDOM-Scan CRT Displays
• Refresh rate depends on the number of lines to be displayed.
• Picture definition is stored as a set of line drawing commands in an
area of memory referred to as refresh display file (display list).
• To display a picture, the system cycle through the set of commands
in the display file, drawing each component line in turn.

28
29
30
31
Color CRT Monitors
• A CRT monitor displays color pictures by using a
combination of phosphors that emit different-coloured light.
• By combining the emitted light from the different
phosphors, a range of colours can be generated..
• Two basic techniques for producing color displays with a
CRT are
• Beam-penetration method
• Shadow-mask method

32
Beam-penetration method
● For displaying color, pictures has ● At intermediate beam speeds,
been used with random-scan combinations of red and green light
monitors are emitted to show two additional
● Two layers of phosphor, usually red colors, orange and yellow.
and green, are coated onto the ● Only 4 colours are possible.
inside of the CRT screen, and the ● Picture quality is not that much good.
displayed color depends on how far
the electron beam penetrates into
the phosphor layers.
● A beam of slow electrons excites
only the inner red layer.
● A beam of very fast electrons
penetrates through the red layer and
excites the outer green layer.

33
Shadow-mask method
● Commonly used in raster scan
systems (including color TV)
because they produce a much wider
range of colors than the beam
penetration method.
● A shadow-mask CRT has three
phosphor color dots at each pixel
position.
● One phosphor dot emits a red
light, another emits a green light,
and the third emits a blue light.
● This type of CRT has three electron
guns, one for each color dot and a
shadow-mask grid just behind
the phosphor-coated screen.
34
Shadow-mask method (Cont’d)
● The three electron beams are
deflected and focused as a
group onto the shadow mask,
which contains a series of holes
aligned with the phosphor-dot
patterns.
● When the three beams pass
through a hole in the shadow
mask, they activate a dot
triangle, which appears as a
small color spot on the screen.
● We obtain color variations in
a shadow-mask CRT by
varying the intensity levels of
the three electron beams. 35
Shadow-mask method (Cont’d)
● By turning off the red and green
guns, we get only the color
coming from the blue phosphor.
● A white (or gray) area is the
result of activating all three
dots with equal intensity.
● Yellow is produced with the
green and red dots only,
magenta is produced with the
blue and red dots, and cyan
shows up when blue and green
are activated equally.
– 256 voltage settings for each
electron gun
– Nearly 17 million colour
choices.
36
Color CRT
• 3 electron guns arranged in triangular pattern corresponding to pattern of Red,
green and blue phosphor dots on the face of CRT.

• To ensure that electron guns excite the correct phosphor dots, a perforated metal
grid (shadow mask) is placed in between the electron guns and the face of the CRT.
Color CRT
• The perforations in the shadow mask are arranged in the same triangular pattern
as the phosphor dots.
• The distance between perforations is called as the pitch.
• The color guns are arranged so that the individual beams converge and intersect at
the shadow mask.
• Upon passing through the hole in the shadow mask the red beam is prevented or
masked from intersecting either the green or blue phosphor dot.
• By varying the strength of the electron beam different shades are obtained.
DVST - Direct View Storage Tube
• Also called bistable storage tube
• A CRT with long-persistence phosphor.
• Line or character remains visible until erased.
• To draw a line or character on the display the electron beam intensity is increased
sufficiently to cause the phosphor to assume its bright ‘storage state’
• The display is erased by flooding the entire tube with a specific voltage, which
causes the phosphor to assume its dark state. erasure take ½ second
• Because entire tube is flooded all lines and characters are erased. Hence, display of
dynamic motion is not possible.
• An intermediate state is possible. Here the electron beam is intensified to a point
that is just below the threshold but still sufficient to brighten the phosphor.
• The image needs to be redrawn or repainted continuously to be visible.
• It is flicker-free
• Resolution is 1024 x 1024 addressable points on 8 x 8 inch square CRT
DVST - Direct View Storage Tube
• A direct-view storage tube (DVST) stores the picture information as
a charge distribution just behind the phosphor-coated screen.
• Means picture information is stored inside the CRT instead of
refreshing the screen.
• Two electron guns are used in a DVST. One, the primary gun, is
used to store the picture pattern; the second, the flood gun,
maintains the picture display.
• Advantages: Because no refreshing is needed, very complex
pictures can be displayed at very high resolutions without flicker.
• Disadvantages: ordinarily do not display colour and that selected
parts of a picture cannot he erased.
– To eliminate a picture section, the entire screen must be erased
and the modified picture redrawn.
– The erasing and redrawing process can take several seconds
for a complex picture.

40
Flat-Panel Displays
● The term Flat-panel display refers to a class of video devices that have reduced
volume, weight and power requirements compared to a CRT.
● Ex: small TV monitors, calculators, pocket video games, laptop computers, etc
● We can separate flat-panel displays into two categories:
[Link] displays
[Link] emissive displays
● The emissive displays (or emitters) are devices that convert electrical energy into
light.
● Plasma panels, thin-film electroluminescent displays and Light-emitting diodes
are examples of emissive displays.
● Non emissive displays (or non emitters) use optical effects to convert sunlight or
light from some other source into graphics patterns.
● LCD example of Non emissive display.

41
Emissive Displays - Plasma panels
● Also called gas-discharge displays, ● Disadvantage of plasma panels
are constructed by filling the has been that they were strictly
region between two glass plates monochromatic devices
with a mixture of gases that
usually includes neon.
● A series of vertical conducting
ribbons is placed on one glass
panel, and a set of horizontal
ribbons is built into the other glass
panel.
● Firing voltages applied to a pair of
horizontal and vertical conductors
cause the gas at the intersection
of the two conductors to break
down into a glowing plasma of
electrons and ions.
Emissive-Thin-film electroluminescent displays

● Similar in construction to a plasma


panel.
● The difference is that the region
between the glass plates is filled ●
with a phosphor, such as zinc
sulfide doped with manganese,
instead of a gas.
● When a sufficiently high voltage is
applied to a pair of crossing
electrodes, the phosphor becomes
a conductor in the area of the
intersection of the two electrodes.
● Disadvantage : Electroluminescent
displays require more power than
plasma panels, and good color and
gray scale displays are hard to
achieve.
Emissive Displays - Light-emitting diode (LED)

● A matrix of diodes is arranged to


form the pixel positions in the
display, and picture definition is
stored in a refresh buffer.
● Information is read from the refresh
buffer and converted to voltage levels
that are applied to the diodes to
produce the light patterns in the
display.
Non emissive displays - Liquid Crystal Displays

● LCDS are commonly used in


small systems, such as
calculators and portable,
laptop computers.
● Produce a picture by passing
polarized light from the
surroundings or from an internal
light source through a liquid-
crystal material that can be
aligned to either block or transmit
the light.
● The term liquid crystal refers to the
fact that these compounds have a
crystalline arrangement of
molecules, yet they flow like a
liquid.
Non emissive displays - Liquid Crystal Displays

● Two glass plates, each containing


a light polarizer at right angles to
the-other plate, sandwich the
liquid-crystal material.
● Rows of horizontal transparent
conductors are built into one glass
plate, and columns of vertical
conductors are put into the other
plate.
● The intersection of two
conductors defines a pixel
position
● There are two states
• ON state - light will transmit
• OFF state - light will not transmit

46
Scan Conversion :Video Basics

The process of converting rasterized image


stored in frame buffer into rigid display
pattern of video is called as scan
conversion
Scan Conversion :Video Basics
• Scanning pattern and frequency of repetition are based on human visual
perception and electronic principle.
• If individual images are presented at a rate greater than the time required for the
visual system to resolve individual images, one image persists while the next is
being presented.
• The minimum picture presentation or update rate is 25 frames/second.
• Minimum refresh or repetition rate is twice i.e. 50 frames/second.
• In movies film picture presentation rate is 24 frames/second wile update rate is 48
frames/second.
• The same effect is achieved in video using a technique called interlacing.
• The American standard video system uses 525 horizontal lines with a frame or
viewing aspect ratio of 4:3 (700 vertical lines).
• The repetition or frame rate is 30 frames/second.
• Each frame is divided into two fields , interlaced or interwoven with each other.
• One field contains all odd numbered scan lines and the other contains even
numbered scan lines.
Scan Conversion :Video Basics
• Scanning pattern:
– Left to right and top to bottom, all odd lines first.
– Horizontal retrace: requires 17% time allowed for one scan line.
– Vertical retrace: 262 ½ lines scanned, requires time equivalent for 21 lines.
– Even scan lines.
– Thus 60 fields per second.
Scan Conversion :Video Basics
• Out of 525 only 483 lines actually visible due to vertical retrace for each field.
• During this time the electron beam is made invisible.
• The time available for each scan line is calculated for a frame repetition rate of 30
as:
1/30 sec./frame x 1/525 frame/scan lines = 63 ½ microseconds/scan line
Approximately 10 ½ microseconds required for horizontal retrace so, time available for
each scan line is 53 microseconds.
• With video aspect ratio of 4:3 there are 644 pixels on each scan line. The time
available to access and display a pixel is thus:
53 microseconds/ scan line x 1/644 scan line/pixels = 82 nanoseconds
Graphics software
• There are mainly two types of graphics
software:
⮚ General programming package
⮚ Special-purpose application package
General programming package
• A general programming package provides an extensive set of
graphics function that can be used in high level programming
language such as C or FORTRAN.
• It includes basic drawing element shape like line, curves,
polygon, color of element transformation etc.
• Example: - GL (Graphics Library).
Special-purpose application package

• Special-purpose application packages are customize for


particular application which implement required facility and
provides interface so that user need not to worry about how it
will work.
• User can simply use it by interfacing with application.
• Example: - CAD, medical and business systems
Various Application Packages and Standards

• A set of libraries that provide programmatically access to some kind of


graphics 2D functions.
• Types
– GKS-Graphics Kernel System – first graphics package – accepted by ISO & ANSI
– PHIGS (Programmer’s Hierarchical Interactive Graphics Standard)-accepted by
ISO & ANSI
– PHIGS + (Expanded package)
– Silicon Graphics GL (Graphics Library)
– Open GL
– Pixar Render Man interface
– Postscript interpreters
– Painting, drawing, design packages.

54
Various Platforms

• DOS,
• Windows,
• Linux,
• OS/2,
• SGI,
• SunOS,
• Solaris,
• HP-UX,
• Mac,
• DEC-OSF.

55
Computer Graphics

• Various utilities and tools available for web-based design


include: Java, XML, VRML and GIF animators.
• Certain compilers, such as, Visual C/C++, Visual Basic, Borland
C/C++, Borland Pascal, Turbo C, Turbo Pascal, Gnu C/C++, Java
provide their own graphical libraries, API, support and help for
programming 2-D/3-D graphics.
• Some of these systems are
– device-independent (X11, OpenGL )
– device-dependent (Solaris, HP-AGP ).

56
Basic Output Primitives (or Elements) for
Drawing Pictures

• POLYLINE
• Filled POLYGONS (regions)
• ELLIPSE (ARC)
• TEXT
• Raster IMAGE

57

You might also like