Unit - 1 Introduction To Computer Graphics Unit-01/Lecture-01
Unit - 1 Introduction To Computer Graphics Unit-01/Lecture-01
Unit-01/Lecture-01
Introduction [RGPV/DEC-2011(10)]
Although computer graphics is a vast field that encompasses almost any graphical aspect,
we are mainly interested in the generation of images of 3-dimensional scenes. Computer
imagery has applications for film special effects, simulation and training, games, medical
imagery, flying logos, etc.
Computer graphics relies on an internal model of the scene, that is, a mathematical
representation suitable for graphical computations. The model describes the 3D shapes,
layout and materials of the scene.
This 3D representation then has to be projected to compute a 2D image from a given
viewpoint, this is the rendering step. Rendering involves projecting the objects
(perspective), handling visibility (which parts of objects are hidden) and computing their
appearance and lighting interactions. Finally, for animated sequence, the motion of
objects has to be specified. We will not discuss animation in this document.
Pixels
A computer image is usually represented as a discrete grid of picture elements a.k.a.
pixels. The number of pixels determines the resolution of the image. Typical resolutions
range from 320*200 to 2000*1500.For a black and white image, a number describes the
intensity of each pixel. It can be expressed between 0.0 (black) and 1.0 (white). However,
for internal binary representation reasons, it is usually stored as an integer between 0
(black) and 255 (white).
Because the image is represented by a discrete array of pixels, aliasing problems may
occur. The most classical form of aliasing is the jaggy aspect of lines (see figure below).
Antialiasing techniques are thus required. In the case of the line, it consists in using
intermediate gray levels to smooth the appearance of the line. Another form of aliasing
can be observed on television when people wear shirts with a fine stripped texture. A
flickering pattern is observed because the size of the pattern is on the same order of
magnitude as the pixel size.
A SURVEY OF COMPUTER GRAPHICS
Nowadays, Computer Graphics are used routinely in various areas as Science, Engineering,
Medicine, Business, Industry, Government, Art, Entertainment, Advertising, Education and
Training.Some of the Graphics applications are as follows:
Computer-Aided Design:
A major use of Computer Graphics is in Design Processes, particularly for engineering and
architectural systems. CAD (Computer-Aided Design) methods are used in the design of
buildings, automobiles, aircraft, watercraft, spacecraft, computers, textiles and many other
products.
In this,
Objects are first displayed in a Wireframe outline form that shows the overall
shape and internal features of objects. It also allows the designers to quickly see
the effects to interactive adjustment to design shapes.
Software packages for CAD applications typically provide the designer with a
we dont take any liability for the notes correctness. http://www.rgpvonline.com
multi-window environment. 1
Animations are often used in CAD applications. Real-time animations using
wireframe displays on a video monitor are useful for testing performance of a
vehicle or system.
When object designs are complete, or nearly complete, realistic lighting models and
surface rendering are applied to produce displays that will show the appearance of the
final product. Architects use interactive graphics methods to layout floor plans, such as
positioning of rooms, doors, windows, stairs, shelves, counters and other building features,
electrical outlets, etc. Realistic displays of architectural designs permit both architects and
their clients to study the appearance of buildings. Many other kinds of systems and
products are designed using either general CAD packages or specially developed CAD
software.
Presentation Graphics:
Presentation Graphics is used to produce illustrations for reports or to generate
35-mm slides or transparencies for use with projectors.
It is commonly used to summarize financial, statistical, mathematical, scientific
and economic data for research reports, managerial reports, consumer
information bulletins and other types of reports.
Typical examples of presentation graphics are bar charts, line graphs, surface
graphs, pie charts and other displays showing relationships between multiple
parameters.
Computer Art:
Computer Graphics methods are widely used in both fine art and commercial art
applications. Artists use a variety of computer methods, including special-purpose
hardware, artists’ paint brush programs, other paint packages, specially developed
software, symbolic mathematics packages, CAD packages, desktop publishing software and
animation packages that provide facilities for designing object shapes and specifying object
motions.
The artist uses a combination of three-dimensional modelling packages, texture
mapping, drawing programs and CAD software.
There is a Pen Plotter with specially designed software that can create
automatic art without intervention from the artist.
Another art is mathematical art, in which the art is the uses a combination of
mathematical functions, fractal procedures, mathematical software, ink-jet
printers and other systems to create a variety of three-dimensional and two-
dimensional shapes and stereoscopic image pairs.
A common graphics method employed in many commercial is morphing, where
one object is transformed into another. This method has been used in TV
commercials such as logo design, advertising, etc.
Entertainment:
Computer Graphics methods are now commonly used in making motion pictures, music
videos and television shows. Sometimes the graphics scenes are displayed by themselves
and sometimes graphics objects are combined with the actors and live scenes.
Music Videos use graphics in several ways. Graphics objects can be combined with the live
action, or graphics and image processing techniques can be used to produce morphing
effects. Many TV series regularly employ Computer Graphics methods.
Education and Training:
Computer-generated models of physical, financial and economic systems are often used as
educational aids. Models of physical systems, physiological systems, population trends or
equipment such as the color-coded diagram can help trainers to understand the operation
of the system.
For some training applications, special systems are designed. Examples of such specialized
systems are the simulators for practice sessions or training of ship captains, aircraft pilots,
heavy-equipment operators and air traffic-control personnel.
we dont take any liability for the notes correctness. http://www.rgpvonline.com
2
Some simulators have no video screens, but most simulators provide graphics screens for
visual operation.
For example, in an automobile-driving simulator, it is used to investigate the behaviour of
drivers in critical situations.
Visualization:
Producing graphical representations for scientific, engineering and medical
data sets and processes is generally referred to as Scientific Visualization.
The term Business Visualization is used in connection with data sets related
to commerce, industry and other non scientific areas.
There are many different kinds of data sets and effective visualization
schemes depend on the characteristics of the data. Color coding is one way
to visualize a data set.
Additional techniques include contour plots, graphs and charts, surface
rendering and visualizations of volume interiors. In addition, Image
Processing techniques are combined with Computer Graphics to produce
many of the data visualization.
Image Processing:
Image Processing is a technique used to modify or interpret existing pictures, such as
photographs and TV scans. Two principal applications of Image Processing are, improving
picture quality machine perception of visual information as used in Robotics.
To apply image-processing methods, we first digitize a photograph or other picture into an
image file. Then digital methods can be applied to rearrange picture parts, to enhance
color separations, or to improve the quality of shading.
These techniques are used extensively in commercial art applications that invoke the
retouching and rearranging the sections of photographs and other artwork. Similar
methods are used to analyze satellite photos of the earth and photos of galaxies.
Image Processing and Computer Graphics are typically combined in many applications. For
example, in Medical field this technique is used to model and study physical functions, to
design artificial limbs and to plan and practice surgery. This application is generally referred
as Computer-Aided Surgery.
Raster-Scan Displays:
The most common type of graphics monitor employing a CRT is the Raster-Scan Display, based
on television technology. In Raster-Scan systems, 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. 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. Stored intensity
values are then retrieved from the refresh buffer and painted on the screen one row (scan
line) at a time. Each screen point is referred to as a Pixel or Pel (Picture Element).
On a Black-and-White system with one bit per pixel, the frame buffer is commonly called a
Bitmap. For systems with multiple bits per pixel, the frame buffer is often referred to as a
Pixmap.
At the end of each scan line, the electron beam returns to the left side of the screen to begin
displaying the next scan line.
we dont take any liability for the notes correctness. http://www.rgpvonline.com
5
The return to the left of the screen, after refreshing each scan line, is called the Horizontal
Retrace of the electron beam. And at the end of each frame (displayed in 1/80th to 1/60th of a
second), the electron beam returns (vertical retrace) to the top left corner of the screen to
begin the next frame.
On some raster-scan systems (and in TV sets), each frame is displayed in two passes using an
INTERLACED refresh procedure. In the first pass, the beam sweeps across each other scan line
from top to bottom. Then after the vertical retrace, the beam sweeps out the remaining scan
line.
Interlacing of the scan line in this way allows us to see the entire screen displayed in one-half
the time it would have taken to sweep across all the lines at once from top to bottom.
This is an effective technique for avoiding flicker, providing that adjacent scan lines contain
similar display information
The component lines of a picture can be drawn and refreshed by a random-scan system in any
specified order (Fig.). A pen plotter operates in a similar way and is an example of a random-
scan, hard-copy device.
Refresh rate on a random-scan system depends on the number of lines to be displayed.
Picture definition is now stored as a set of line drawing commands in an area of memory r e f e
d to as the refresh display file. Sometimes the refresh display file is called the display list,
display program, or simply the refresh buffer.
To display a specified picture, the system cycles through the set of commands in the display
file, drawing each component line in turn. After all line drawing commands have been
processed, the system cycles back to the first line command in the list.
Random-scan displays are designed to draw all the component lines of a picture 30 to 60 times
we dont take any liability for the notes correctness. http://www.rgpvonline.com
8
each second.
High quality vector systems are capable of handling approximately 100,000 "short" lines at
this refresh rate. When a small set of lines is to be displayed, each refresh cycle is delayed
to avoid refresh rates greater than 60 frames per second. Otherwise, faster refreshing is the
set of lines could burn out the phosphor.
Random-scan systems are designed for line drawing applications and cannot display
realistic shaded scenes. Since picture definition is stored as a set of line drawing instructions
and not as a set of intensity values for all screen points, vector displays generally have
higher resolution than raster systems.
Flickering
Flicker is a visible fading between cycles displayed on video displays, especially
the refresh interval on cathode ray tube (CRT) based computer screens. Flicker occurs on CRTs
when they are driven at a low refresh rate, allowing the brightness to drop for time intervals
sufficiently long to be noticed by a human eye – see persistence of vision and flicker fusion
threshold. For most devices, the screen's phosphors quickly lose their excitation between
sweeps of the electron gun, and the afterglow is unable to fill such gaps – see phosphor
persistence. A similar effect occurs in PDPs during their refresh cycles.
For example, if a cathode ray tubes vertical refresh rate is set to 60 Hz, most screens will
produce a visible "flickering" effect, unless they use phosphor with long afterglow. Most people
find that refresh rates of 70–90 Hz and above enable flicker-free viewing on CRTs. Use of refresh
rates above 120 Hz is uncommon, as they provide little noticeable flicker reduction and limit
available resolution.
Since the shutters used in liquid crystal displays for each pixel stay at a steady opacity, they do
not flicker, even when the image is refreshed. The backlights of such displays typically operate
in the range of 150–250 Hz. But, to save the crystals from deterioration caused by constant
current, voltage is constantly reversed, which may cause flicker. "In a pixel on an LCD monitor,
the amount of light that is transmitted from the backlight depends on the voltage applied to
the pixel. For the amount of light, it doesn't matter whether that voltage is negative or positive.
However, applying the same voltage for a long period would damage the pixel.
For example, electricity decomposes water into oxygen and hydrogen gas. A comparable
similar effect could happen inside the liquid crystals that are in the pixels. In order to prevent
damage, LCD displays quickly alternate the voltage between positive and negative for each
pixel, which is called 'polarity inversion'. Ideally, the rapid polarity inversion wouldn't be
noticeable because every pixel has the same brightness whether a positive or a negative
voltage is applied. However, in practice, there is a small difference, which means that every
pixel flickers at about 30 hertz."
The lighting used in film projectors is typically an incandescent lamp or arc lamp, which does
not flicker, but some degree of flicker is desirable to help decrease the flicker fusion
threshold comfortably below film's typical frame rate of 24 fps. This is usually accomplished
with a shutter which causes the lamplight to apparently strobe on and off at a multiple of the
we dont take any liability for the notes correctness. http://www.rgpvonline.com
10
frame rate, most often 48–96 Hz.
The exact refresh rate necessary to prevent the perception of flicker varies greatly based on the
viewing environment. In a completely dark room, a sufficiently dim display can run as low as
30 Hz without visible flicker.[citation needed] At normal room and TV brightness this same
display rate would produce flicker so severe as to be unwatchable.
Interlacing
Interlacing (also known as interleaving) is 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 a form of incremental decoding, because the image can be loaded incrementally.
Another form of incremental decoding is progressive scan. In progressive scan the loaded
image is decoded line for line, so instead of becoming incrementally clearer it becomes
incrementally larger. The main difference between the interlace concept in bitmaps and in
video is that even progressive bitmaps can be loaded over multiple frames.
For example: Interlaced GIF is a GIF image that seems to arrive on your display like an image
coming through a slowly opening Venetian blind. A fuzzy outline of an image is gradually
replaced by seven successive waves of bit streams that fill in the missing lines until the image
arrives at its full resolution.
Interlaced graphics were once widely used in web design and before that in the distribution of
graphics files over bulletin board systems and other low-speed communications methods. The
practice is much less common today, as common broadband internet connections allow most
images to be downloaded to the user's screen nearly instantaneously, and interlacing is usually
an inefficient method of encoding images.
Resolution
The display resolution of a digital television, computer monitor or display device is the number
of distinct pixels in each dimension that can be displayed. It can be an ambiguous term
especially as the displayed resolution is controlled by different factors in cathode ray
tube (CRT),flat-panel display which includes liquid-crystal displays, or projection displays using
fixed picture-element (pixel) arrays.
It is usually quoted as width × height, with the units in pixels: for example, "1024 × 768" means
the width is 1024 pixels and the height is 768 pixels. This example would normally be spoken as
"ten twenty-four by seven sixty-eight" or "ten twenty-four by seven six eight".
One use of the term "display resolution" applies to fixed-pixel-array displays such as plasma
display panels (PDPs), liquid-crystal displays (LCDs), digital light processing (DLP) projectors, or
similar technologies, and is simply the physical number of columns and rows of pixels creating
the display (e.g. 1920 × 1080). A consequence of having a fixed-grid display is that, for multi-
format video inputs, all displays need a "scaling engine" (a digital video processor that includes
a memory array) to match the incoming picture format to the display.
Flat-Panel Displays:
The term Flat-Panel display refers to a class of video displays that have reduced volume, weight
and power requirements compared to a CRT. Example: small TV monitors, laptop, an
advertisement board in elevators, etc.Flat-Panel displays are categorized into Emissive and
Nonemissive displays.
Emissive Devices:
The Emissive displays (or emitters) are devices that convert electrical energy into
we dont take any liability for the notes correctness. http://www.rgpvonline.com
13
light. Eg. Plasma panels, light-emitting diode, etc.
Nonemissive displays (or nonemitters) use optical effects to convert sunlight or light
from some other source into graphics patters. The most important example is a
liquid-crystal device.
Plasma Panels, are also called Gas-Discharge Displays, are constructed by filling the
region between two glass plates 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 ribbon is built into the other hand.
Thin-Film Electroluminescent Displays are similar in construction to a Plasma Panel.
The difference is that the region between the glass plates is filled with a phosphor,
such as zincsulfide doped with manganese, instead of a gas.
LED is a matrix of diodes arranged to form the pixel positions in the display and
picture definition is stored in a refresh buffer.
Nonemissive Devices:
Liquid-Crystal Displays (LCDs) are commonly used in small systems, such as calculators and
portable laptop computers. They 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. Two types – Passive Matrix and Active Matrix LCDs.
RASTER-SCAN SYSTEMS
Interactive Raster graphics systems typically employ several processing units. In addition to the
CPU, a special-purpose processor called the Video Controller or Display Controller is used to
control the operation of the display device.
Video Controller:
A fixed area of the system memory is reserved for the frame buffer, and the Video Controller is
given direct access to the Frame-Buffer Memory.
Frame-Buffer locations and the corresponding screen positions are referred in Cartesian
we dont take any liability for the notes correctness. http://www.rgpvonline.com
14
Coordinates. For many graphics monitors, the coordinate origin is defined at the lower left
screen corner. On some PC, origin is at upper left corner of the screen.
Two registers are used to store the coordinates of the screen pixels. Initially, x register is
set to 0 and y is set to ymax. The value stored in the frame buffer for this pixel position is
then retrieved and used to set the intensity of the CRT beam. Then the x register is
incremented by 1 and the process repeated for the next pixel on the top scan line. This
procedure is repeated for each pixel along the scan line. After the last pixel on the top
scan line has been processed, the x register is reset to 0 and y register is decremented by
1.
After cycling through all pixels along the bottom scan line (y = 0), the Video Controller
resets the registers to the first pixel position on the top scan line and the refresh process
starts again.
Since the screen must be refreshed at the rate of 60 frames per second, the cycle time is
too slow, this can’t be accommodated by typical RAM chips. To speed up pixel
processing, Video Controllers can retrieve multiple pixel values from the refresh buffer
on each pass. When that group of pixels has been processed, the next block of pixel
values is retrieved from the frame buffer. In high-quality systems, 2 frame buffers are
often provided so that one buffer can be used for refreshing while the other is being
filled with intensity values.
Mouse:
A mouse is small hand-held box used to position the screen cursor. Wheels or rollers on the
bottom of the mouse can be used to record the amount and direction of movement.
Another method is the optical sensor, which detects movement across the lines in the grid.
One, two, or three buttons are usually included on the top of the mouse for signaling the
execution of some operation, such as recording cursor position or invoking a function.
Joysticks:
A Joystick consists of a small, vertical lever (called the stick) mounted on a base that is used to
steer the screen cursor around. Most joysticks select screen positions with actual stick
movement; others respond to pressure on the stick. Some are mounted on a keyboard; others
function as stand-alone units.
In another type of movable joystick, 8 switches are arranged in a circle, so that the stick can
select any one of eight directions for cursor movement.
Pressure-sensitive joysticks, also called Isometric Joysticks, have a no movable stick. Pressure
on the stick is measured with strain gauges and converted to movement of the cursor in the
direction specified.
Data Glove:
A Data Glove that can be used to grasp a "virtual" object.The glove is constructed with a series
of sensors that detect hand and finger motions. Electromagnetic coupling between
transmitting antennas and receiving antennas is used to provide information about the
position and orientation of the hand. A two-dimensional projection of the scene can be
viewed on a video monitor, or a three-dimensional projection can be viewed with a headset.
Touch Panels:
Touch Panels allow displayed objects or screen positions to be selected with the touch of
a finger. A typical application of touch panels is for the selection of processing options that are
represented with graphical icons.
Touch input can be recorded using optical, electrical, or acoustical methods.
Optical Touch Panels employ a line of infrared light-emitting diodes (LEDs) along one
vertical edge and along one horizontal edge of the frame. The opposite vertical and
horizontal edges contain light detectors. These detectors are used to record which
beams are interrupted when the panel is touched.
An Electrical Touch Panel is constructed with two transparent plates separated by a
small distance. One of the plates is coated with a conducting material, and the other
plate is coated with a resistive material. When the outer plate is touched, it is forced
into contact with the inner plate. This contact creates a voltage drop across the
resistive plate that is converted to the coordinate values of the selected screen
position.
In Acoustical Touch Panels, high-frequency sound waves are generated in the
horizontal and vertical directions across a glass plate.
Light Pens
Light Pen is a pencil-shaped device used to select screen positions by detecting the light
coming from points on the CRT screen. Light Pens sometimes give false readings due to
background lighting in a room.
The pen will send a pulse whenever phosphor below it is illuminated. While the image on a
refresh display may appear to be stable, it is in fact blinking on and off faster than the eye can
detect. This blinking is not too fast, for the light pen. The light pen as easily determines the
time at which the phosphor is illuminated. Since there is only one electron beam on the refresh
display, only one line segment can be drawn at a time and no two segments are drawn
simultaneously.
HARD-COPY DEVICES:
We can obtain hard-copy output for various images in several formats. The most important
output device is Printer or Plotter and many types are there.
Printers produce output by either Impact or Nonimpact methods.
Impact Printers press formed character faces against an inked ribbon onto the paper. E.g. : Line
Printer, with the typefaces mounted on bands, chains, drums, or wheels.
Character impact printers often have a Dot-Matrix print head containing a rectangular
array of protruding wire pins, with the number of pins depending on the quality of the
printer.
Nonimpact Printers and plotters use laser techniques, ink-jet sprays, xerographic processes
(photocopying), electrostatic methods, and electro thermal methods to get images onto Paper.
In a Laser Device, a laser beam mates a charge distribution on a rotating drum coated
with a photoelectric material, such as selenium. Toner is applied to the drum and then
transferred to paper.
Ink-Jet methods produce output by squirting ink in horizontal rows across a roll of paper
wrapped on a drum. The electrically charged ink stream is deflected by an electric field
to produce dot-matrix patterns.
Nonimpact devices use various techniques to combine three color pigments (cyan, magenta,
and yellow) to produce a range of color patterns.
Laser and Xerographic devices deposit the three pigments on separate passes; ink-jet
methods shoot the three colors simultaneously on a single pass along each print tine
on the paper.
Drafting layouts and other drawings are typically generated with ink-jet or pen
plotters.
A Pen Plotter has one or more pens mounted on a carriage, or crossbar, that spans a sheet of
paper. Pens with varying colors and widths, wet-ink, ball-point, and felt-tip pens are all possible
choices for use with a pen plotter. Crossbars can be either moveable or stationary, while the pen
moves back and forth along the bar. E.g.: flatbed pen plotter, rollfeed pen plotter.
Locator Devices:
A standard method for interactive selection of a coordinate point is by positioning the screen
cursor. We can do this with a mouse, joystick, trackball, spaceball, thumbwheels, dials, a
digitizer stylus or hand cursor, or some other cursor-positioning device. When the screen cursor
is at the desired location, a button is activated to store the coordinates of that screen point.
Keyboards can be used for locator input in several ways. A general-purpose keyboard usually has
four cursor-control keys that move the screen cursor up, down, left, and right.
Alternatively, a joystick, joydisk, trackball, or thumbwheels can be mounted on the keyboard for
relative cursor movement.
Light pens have also been used to input coordinate positions, but some special implementation
considerations are necessary. Since light pens operate by detecting light emitted from the
screen phosphors, some nonzero intensity level must be present at the coordinate position to
be selected.
Stroke Devices:
This class of logical devices is used to input a sequence of coordinate positions.
Stroke-device input is equivalent to multiple calls to a locator device. The set of input points is
often used to display line sections.
Continuous movement of a mouse, trackball, joystick, or tablet hand cursor is translated into a
series of input coordinate values.
The graphics tablet is one of the more common stroke devices. Button activation can be used to
place the tablet into continuous mode. As the cursor is moved across the tablet surface, a
stream of coordinate values is generated. This process is used in paintbrush systems that allow
artists to draw scenes on the screen and in engineering systems where layouts can be traced
and digitized for storage.
String Devices:
The primary physical device used for string input is the keyboard. Input character strings are
typically used for picture or graph labels.
we dont take any liability for the notes correctness. http://www.rgpvonline.com
24
Other physical devices can be used for generating character patterns in a text-writing mode.
For thi s input, individual characters are drawn on the screen with a stroke or locator-type
device.
Valuator Devices:
These devices are employed in graphic systems to input scalar values. Valuators are used for
setting various graphics parameters, such as rotation angle and scale factors, and for setting
physical parameters associated with a particular application (temperature settings, voltage
levels, stress factors, etc.).
A typical physical device used to provide valuator input is a set of control dials. Floating-point
numbers within any predefined range are input by rotating the dials.
Dial rotations in one direction increase the numeric input value, and opposite rotations
decrease the numeric value. Rotary potentiometers convert dial rotation into a corresponding
voltage. This voltage is then translated into a real number within a defined scalar range, such as
-10.5 to 25.5. Instead of dials, slide Potentiometers are sometimes used to convert linear
movements into scalar values.
Joystick, trackball, tablets, and other interactive devices can be adapted for valuator input by
interpreting pressure or movement of the device relative to a scalar range.
Another technique for providing valuator input is to display sliders, buttons, rotating scales, and
menus on the video monitor.
Choice Devices:
Graphics packages use menus to select programming options, parameter values, and object
shapes to be used in constructing a picture.
A choice device is defined as one that enters a selection from a list (menu) of alternatives.
Commonly used choice devices are a set of buttons; a cursor positioning device, such as a
mouse, trackball, or keyboard cursor keys; and a touch panel.
For screen selection of listed menu options, we can use cursor-control devices. When a
coordinate position (x, y) is selected, it is compared to the coordinate extents of each listed
menu item. A menu item with vertical and horizontal boundaries at the coordinate values xmin,
xmax, ymin and ymax is selected if the input coordinates (x, y) satisfy the inequalities
For larger menus with a few options displayed at a time, a touch panel is commonly used.
Alternate methods for choice input include keyboard and voice entry. A standard keyboard can
be used to type in commands or menu options.
Similar coding can be used with voice-input systems. Voice input is particularly useful when the
number of options is small (20 or less).
Pick Devices:
Pick devices are used to select parts of a scene that are to be transformed or edited in some
way.
Typical devices used for object selection are the same as those for menu selection:
the cursor-positioning devices.
With a mouse or joystick, we can position the cursor over the primitives in a
displayed structure and press the selection button. The position of the cursor is then
recorded, and several levels of search may be necessary to locate the particular
object (if any) that is to be selected.
First, the cursor position is compared to the coordinate extents of the various structures in the
scene.
S.NO RGPV QUESTION YEAR MARKS
1. Write a short note on Pointing Dec,2013 10
and Positioning Devices
Values input with this function are the workstation code and the device code. Returned values
are assigned to parameter status and to the data parameters corresponding to the requested
logical class.A value of ok or nonc are returned in parameter status, according to the validity of
the input data. A value of none indicates that the input device was activated so as to produce
invalid data.
A returned value of none can be used as an end-of-data signal to terminate a programming
sequence.
There are several techniques that are incorporated into graphics packages to aid the interactive
construction of pictures. Input coordinates can establish the position or boundaries for objects
to be drawn, or they can be used to rearrange previously displayed objects.
Basic Positioning Methods:
Coordinate values supplied by locator input are often used with positioning methods to specify
a location for displaying an object or a character string. We interactively select coordinate
positions with a pointing device, usually by positioning the screen cursor.
For lines, straight line segments can be displayed between two selected screen positions. As an
aid in positioning objects, numeric values for selected positions can be echoed on the screen.
Using the echoed coordinate values as a guide, we can make adjustments in the selected
location to obtain accurate positioning.
Constraints:
With some applications, certain types of prescribed orientations or object alignments are
useful. A constraint is a rule for altering input-coordinate values to produce a specified
orientation or alignment of the displayed coordinates. There are many kinds of constraint
functions that can be specified, but the most common constraint is a horizontal or vertical
alignment of straight lines. This type of constraint, shown in the following diagrams, is useful in
forming network layouts.
With this constraint, we can create horizontal and vertical lines without worrying about precise
specification of endpoint coordinates.
A horizontal or vertical constraint is implemented by determining whether any two input
coordinate endpoints are more nearly horizontal or more nearly vertical. If the difference in the
y values of the two endpoints is smaller than the difference in x values, a horizontal line is
displayed. Otherwise, a vertical line is drawn.
Other kinds of constraints can be applied to input coordinates to produce a variety of
alignments. Lines could be constrained to have a particular slant, such as 45", and input
coordinates could be constrained to lie along predefined paths, such as circular arcs.
Grids:
Another kind of constraint is a grid of rectangular lines displayed in some part of the screen
area. When a grid is used, any input coordinate position is rounded to the nearest intersection
of two grid lines.
Gravity Field:
In the construction of figures, we sometimes need to connect lines at positions between
endpoints. Since exact positioning of the screen cursor at the connecting point can be difficult,
graphics packages can be designed to convert any input position near a line to a position on the
line. This conversion of input position is accomplished by creating a gravity field area around the
line. Any selected position within the gravity field of a line is moved ("gravitated") to the nearest
position on the line.
we dont take any liability for the notes correctness. http://www.rgpvonline.com
28
A gravity field area around a line is illustrated with the shaded boundary as shown in the
diagram. Areas around the endpoints are enlarged to make it easier for us to connect lines at
their endpoints. Selected positions in one of the circular areas of the gravity field are attracted
to the endpoint in that area. If many lines are displayed, gravity areas can overlap, and it may be
difficult to specify points correctly. Normally, the boundary for the gravity field is not displayed
Rubber-Band Method:
Straight lines can be constructed and positioned using Rubber-Band methods, which stretch out
a line from a starting position as the screen cursor is moved. The following figure demonstrates
the rubber-band method.
We first select a screen position for one endpoint of the line. Then, as the cursor moves around,
the line is displayed from the start position to the current position of the cursor. When we
finally select a second screen position, the other line endpoint is set. Rubber-band methods are
used to construct and position other objects besides straight lines.
Dragging:
A technique that is often used in interactive picture construction is to move objects into
position by dragging them with the screen cursor. We first select an object, and then move the
cursor in the direction we want the object to move, and the selected object follows the cursor
path.
Painting and Drawing:
Options for sketching, drawing, and painting come in a variety of forms. Curve-drawing options
can be provided using standard curve shapes, such as circular arcs and splines, or with freehand
sketching procedures. Splines are interactively constructed by specifying a set of discrete screen
points that give the general shape of the curve. Then the system fits the set of points with a
polynomial curve. In freehand drawing, curves are generated by following the path of a stylus
on a graphics tablet or the path of the screen cursor on a video monitor. Once a curve is
displayed, the designer can alter the curve shape by adjusting the positions of selected points
along the curve path.
S.NO RGPV QUESTION YEAR MARKS