Computer Graphics
Computer Graphics
Introduction
A computer Graphics can be anything like beautiful scenery, images, terrain, trees, or anything else that
we can imagine, however all these computer graphics are made up of the most basic components of
Computer Graphics that are called Graphics Output Primitive or simply primitive. The Primitives are the
simple geometric functions that are used to generate various Computer Graphics required by the User.
Some most basic Output primitives are point-position (pixel), and a straight line. However different
Graphic packages offers different output primitives like a rectangle, conic section, circle, spline curve or
may be a surface. Once it is specified what picture is to be displayed, various locations are converted
into integer pixel positions within the frame buffer and various functions are used to generate the
picture on the two dimensional coordinate system of output display.
Point Function A point function is the most basic Output primitive in the graphic package. A point
function contains location using x and y coordinate and the user may also pass other attributes such as
its intensity and color. The location is stored as two integer tuple. The color is defined using hex codes.
The size of a pixel is equal to the size of pixel on display monitor.
A Line Function
A line function is used to generate a straight line between any two end points. Usually a line function is
provided with the location of two pixel points called the starting point and the end point and it is upto
the computer to decide what pixels fall between these two points so that a straight line is generated.
- A raster graphics image or bitmap is a data structure representing a generally rectangular grid of pixels,
or points of color, viewable via a display medium.
-A bitmap corresponds to a bit-for-bit with an image displayed on a screen, generally in the same
format used for storage in the display's video memory, or maybe as a device-independent bitmap.
Bitmap is technically characterized by the width and height of the image in pixels and by the number of
bits per pixel (a color depth, which determines the number of colors it can represent).
- This memory area holds the intensity values for all screen points. The intensity values are read from
memory area and used to ‗paint‘each point on the screen one row at a time. This row is called a scan
line and each point is called a pixel (picture element). The ordering of pixels by rows is known as raster
order, or raster scan order.
-In a raster scan display system the electron beam is swept across the screen one row at a time from
top to bottom and from left to right. As the electron beam moves across each row, the beam intensity
is turned on or off to create a pattern of illuminated spots.
-The spots to be turned on are dependent on the picture to be drawn. The definition of this picture is
stored in a memory area called the refresh buffer or frame buffer.
-Rasterization-The term rasterization can in general be applied to any process by which vector
information can be converted into a raster format. In normal usage, the term refers to the popular
rendering algorithm for displaying three-dimensional shapes on a computer. Rasterization is currently
the most popular technique for producing real-time 3D computer graphics. Compared to other
rendering techniques such as ray tracing, rasterization is extremely fast. However, rasterization is
simply the process of computing the mapping from scene geometry to pixels and does not prescribe a
particular way to compute the color of those pixels.
-Interlacing- It‘s a method of encoding a bitmap image such that a person who has partially received it
sees a degraded copy of the entire image. When communicating over a slow communications link, this
is often preferable to seeing a perfectly clear copy of one part of the image, as it helps the viewer
decide more quickly whether to abort or continue the transmission.
-Interlacing is supported by the following formats:
i. GIF graphics interchange format
ii. PNG Portable Network Graphics
iii. JPEG Joint Photographic Experts Group. The group realized a need to make large photographic
files smaller,
iv. PGF (Progressive Graphics File) is a wavelet-based bitmapped image format that employs lossless
and lossy data compression.
-Interlacing is also known as "progressive" encoding, because the image becomes progressively clearer
as it is received.
i. Control grid – determines the rate at which the electron will pass thro.
ii. Electron beam- electrons travel without any hindrance from the air/dust as the tube is a vacuum.
iii. Phosphor coated screen – It glows when struck by electrons.
iv. Conductive coating - to soak up the electrons that pile up at the screen-end of the tube.
v. Focusing anode – It attracts scattered electron to a focal point.
vi. Accelerating anode – It gives the anode a high velocity so that we can use the velocity/momentum
to give the light we want.
CRT Monitors
-A CRT monitor contains millions of tiny red, green, and blue phosphor dots that glow when struck by
an electron beam that travels across the screen to create a visible image.
-In a cathode ray tube, the "cathode" is a heated filament. The heated filament is in a vacuum created
inside a glass "tube." The "ray" is a stream of electrons generated by an electron gun that naturally pour
off a heated cathode into the vacuum. Electrons are negative. The anode is positive, so it attracts the
electrons pouring off the cathode. This screen is coated with phosphor, an organic material that glows
when struck by the electron beam.
- There is a conductive coating inside the tube to soak up the electrons that pile up at the screen-end of
the tube.
-There are three ways to filter the electron beam in order to obtain the correct image on the monitor
screen: shadow mask, aperture grill and slot mask. These technologies also impact the sharpness of the
monitor's display. They are:
1. Shadow-mask -A shadow mask is a thin metal screen filled with very small holes. Three electron
beams pass through the holes to focus on a single point on a CRT displays' phosphor surface. The
shadow mask helps to control the electron beams so that the beams strike the correct phosphor at just
the right intensity to create the desired colors and image on the display. The unwanted beams are
blocked or "shadowed."
2. Aperture-grill -Monitors based on the Trinitron technology, which was pioneered by Sony, use an
aperturegrill instead of a shadow-mask type of tube. The aperture grill consists of tiny vertical wires.
Electron beams pass through the aperture grill to illuminate the phosphor on the faceplate. Most
aperture-grill monitors have a flat faceplate and tend to represent a less distorted image over the
entire surface of the display than the curved faceplate of a shadow-mask CRT. However, aperture-grill
displays are normally more expensive.
3. Slot-mask -A less-common type of CRT display, a slot-mask tube uses a combination of the shadow-
mask and aperture-grill technologies. Rather than the round perforations found in shadow-mask CRT
displays, a slotmask display uses vertically aligned slots. The design creates more brightness through
increased electron transmissions combined with the arrangement of the phosphor dots.
Advantages of phosphor
i. electron are easily knocked off to give light
ii. Once electrons starts losing energy, phosphor stay glowing for some time – persistence
-Persistence is defined as the time it takes for the emitted light from the screen to decay to 1/10th of
its origin in intensity. Lower persistence phosphor require higher refresh rates to maintain a picture on
the screen w/o flicker. The phosphor with low persistence is useful for animation. A high persistence
phosphor is useful for displaying high complex static pictures.
-Resolution-The max No. of points that can b displayed on the screen on a CRT w/o overlap is called
resolution. Typical resolution of high definition system is 1280 by 1024.
-Screen size- The physical size of a graphics monitor is given by the length on the screen diagonally n
normally quoted in inches.
-Aspect Ratio- It gives the ratio of vertical points to horizontal points necessary to produce equal length
lines in both direction of the screen.
ii. As light strikes the first filter, it is polarized. The molecules in each layer of the liquid crystal then
guide the light they receive to the next layer. As the light passes through the liquid crystal layers, the
molecules also change the light's plane of vibration to match their own angle. When the light reaches
the far side of is matched up with the second polarized glass filter, then the light will pass through. -
For a particular the liquid crystal substance, it vibrates at the same angle as the final layer of molecules.
If the final layer
voltage the liquid material at that intersection of electrons changes the orientation of that liquid crystal
of that intersection. The horizontal component is converted to a vertical component hence transmit
light.
If we apply an electric charge to liquid crystal molecules, they untwist. When they straighten out, they
change the angle of the light passing through them so that it no longer matches the angle of the top
polarizing filter. Consequently, no light can pass through that area of the LCD, which makes that area
darker than the surrounding areas.
-Plasma Panel
The basic idea of a plasma display is to illuminate tiny, colored fluorescent lights to form an image. Each
pixel is made up of three fluorescent lights -- a red light, a green light and a blue light.
What is Plasma?
The central element in a fluorescent light is plasma, a gas made up of free-flowing ions (electrically
charged atoms) and electrons (negatively charged particles).
-Under normal conditions, a gas is mainly made up of uncharged particles. That is, the individual gas
atoms include equal numbers of protons (positively charged particles in the atom's nucleus) and
electrons. The negatively charged electrons perfectly balance the positively charged protons, so the
atom has a net charge of zero.
If you introduce many free electrons into the gas by establishing an electrical voltage across it,
negatively charged particles rush toward the positively charged area of the plasma, and positively
charged particles rush toward the negatively charged area.
In this mad rush, particles are constantly bumping into each other. These collisions excite the gas atoms
in the plasma, causing them to release photons of energy.
How the system works
-It‘s composed of 2 glass plates:
-The 1st plate is brought to the 2nd plate until the space between them is small. The edges are sealed
off and space is left with air. The air inside is then removed and replaced with the plasma gas (e.g
neon).
Properties of the gas
-Must produce light when ionized.
-Must be easily ionized.
-Produce the correct color of gas when ionized.
Data Structures
-The need to create, modify or manipulate individual portions of the picture without affecting other
parts of the same picture, makes it necessary to be:
1. Able to independently reference those individual portions of the picture.
2. Be able to specify certain attributes for the portion which are diff from those other parts.
3. Be able to make additional details to a part of the pic while making additional provision for storage
space etc.
-All this happens in any graphical implementation such as modeling, animation & comp aided design
application
-A data structure is a set of elements that are related to each other by a set of relations.
Edge – is defined by a set of surfaces (also defined by vertices)
Surface – is defined be a set of edges which are defined by a set of vertices.
Three different kinds of data structures can be used to construct an object. They are based on edges,
vertices & surfaces.
-Vertex data are coordinate values for each vertex in the object.
-Edge data consists of pointers back into the vertex table to identify the vertices for each polygon edge.
-Polygon table contain pointers back into the edge table to identify the edges for each polygon
S2
S1
Databases
-It‘s an organized collection of graphics& non-graphics data related to each other in the support of a
common purpose and is stored on secondary storage in a computer.
-A database therefore may be viewed as the implementation of data structures into the computer.
Thus a decision on the data structure has to be made first followed by the choice of a database to
implement such a structure.
-A graphics database must be able to store pictorial data in addition to textural & alpha numeric data.