0% found this document useful (0 votes)
48 views

CG Assignment

The document provides information about various topics in computer graphics. It distinguishes between random scan and raster scan devices, describing their key differences such as resolution, cost, and ability to alter images. It also explains the RGB and HSV color models, describing how colors are represented in each. Finally, it outlines various graphics input devices like keyboards, mice, and scanners as well as output devices like monitors, printers, and touch panels.

Uploaded by

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

CG Assignment

The document provides information about various topics in computer graphics. It distinguishes between random scan and raster scan devices, describing their key differences such as resolution, cost, and ability to alter images. It also explains the RGB and HSV color models, describing how colors are represented in each. Finally, it outlines various graphics input devices like keyboards, mice, and scanners as well as output devices like monitors, printers, and touch panels.

Uploaded by

DHANANJAY NEGI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Assignment - 1

Computer Graphics

Submitted By: - Submitted To: -


Dr. S.K. Saxena
Name Roll No.
Hardik Jain 2K17/CO/127
Dhananjay Negi 2K17/CO/108
Dhruv Bansal 2K17/CO/109
Q1. Distinguish between random and raster scan devices.

S.NO RANDOM SCAN RASTER SCAN


1. The resolution of random scan is higher While the resolution of raster scan is
than raster scan. lesser or lower than random scan.

2. It is costlier than raster scan. While the cost of raster scan is lesser
than random scan.

3. In random scan, any alteration is easy While in raster scan, any alteration is
in comparison of raster scan. not so easy .

4. In random scan, interweaving is not While in raster scan, interweaving is


used. used.
5. In random scan, mathematical function While in which, for image or picture
is used for image or picture rendering. rendering, random scan uses pixels.

6. It is very good for realistic display. While it is not good or unable to use
for realistic display.

Q2. Explain RGB and HSV color model

Color Model
It's a method for creating whole range of colors from set of primary colors.
There are two types of color models.
1. Additive Color model - Colors perceived are result of transmitting light. It use light
to display colors.
2. Subtractive Color model - Colors perceived are result of reflected light. It uses
printing inks.

There are various color models:

1. RGB color model:

The RGB color model is an additive color model. In this case red, green and
blue light are added together in various combinations to reproduce a wide
spectrum of colors.
According to the tristimulus theory of vision, our eyes perceive color through
the stimulation of three visual pigments in the cones of the retina. One of the
pigments is most sensitive to light with a wavelength of about 630 nm (red),
another has its peak sensitivity at about 530 nm (green), and the third
pigment is most receptive to light with a wavelength of about 450 nm (blue).
By comparing intensities in a light source, we perceive the color of the light.
This theory of vision is the basis for displaying color output on a video monitor
using the three primaries red, green, and blue, which is referred to as the RGB
color model.

We can represent this model using the unit cube defined on R, G, and B axes,
as shown in Figure below:

The origin represents black and the diagonally opposite vertex, with
coordinates (1, 1, 1), is white. Vertices of the cube on the axes represent the
primary colors, and the remaining vertices are the complementary color
points for each of the primary colors.

2. HSV Color Model:

Interfaces for selecting colors often use a color model based on intuitive
concepts, rather than a set of primary colors. We can give a color specification
in an intuitive model by selecting a spectral color and the amounts of white
and black that are to be added to that color to obtain different shades, tints,
and tones.
Color parameters in this model are called hue (H), saturation (S), and value
(V). We derive this three-dimensional color space by relating the HSV
parameters to the directions in the RGB cube. If we imagine viewing the cube
along the diagonal from the white vertex to the origin (black), we see an
outline of the cube that has the hexagon shape shown in Figure 1. The
boundary of the hexagon represents the various hues, and it is used as the top
of the HSV hex cone (Figure 2).
In HSV space, saturation S is measured along a horizontal axis, and the value
parameter V is measured along a vertical axis through the center of the hex
cone.

Figure 2 Figure 1

Hue is represented as an angle about the vertical axis, ranging from 0◦ at red
through 360◦. Vertices of the hexagon are separated by 60◦ intervals. Yellow is
at 60◦, green at 120◦, and cyan (opposite the red point) is at H = 180◦.
Complementary colors are 180◦ apart.

Saturation parameter S is used to designate the purity of a color. A pure color


(spectral color) has the value S= 1.0, and decreasing S values tend toward the
grayscale line (S = 0) at the center of the hex cone.

Value V varies from 0 at the apex of the hex cone to 1.0 at the top plane. The
apex of the hex cone is the black point. At the top plane, colors have their
maximum intensity. When V = 1.0 and S = 1.0, we have the pure hues.
Parameter values for the white point are V = 1.0 and S = 0.
Q3. Explain graphics input and output devices
Ans.
Input Devices: Graphics workstations can make use of various devices for data input.
Input devices are the hardware that is used to transfer input to the computer. The
data can be in the form of text, graphics or sound. Most systems have a keyboard
and one or more devices specially designed for interactive input. Some common
input devices are: -
• Keyboards, Button Boxes and Dials: An alphanumeric keyboard on a graphics
system is used primarily as a device for entering string of texts, issuing
commands, selecting menu options and certain graphic functions. For certain
specialised tasks, the input may come from a set of buttons, dials or switches.
• Mouse: A mouse is a small handheld unit that is moved around on a surface to
position a cursor. It also has some buttons on top to communicate and select
information on the screen. Common type of mouse use rollers or optical
sensors.
• Trackballs/Trackpads: Trackballs and trackpads are generally provided on
laptop computers. Trackballs can be rotated with a single finger to move the
screen cursor. On the other hand trackpads are surfaces on which one can
move their finger to position the cursor.
• Joysticks: These consist of a small vertical lever mounted on a base. Joysticks
can be used to steer the cursor around. The distance the joystick is moved
from its centre corresponds to relative screen cursor movement. Joysticks
commonly find applications in computer games.
• Data Glove: A data glove is a device that fits over a user’s hand and can be
used to grasp a virtual object. The glove consists of multiple sensors which are
used to track the movement of the hand.
• Digitizers: A common device for drawing, painting, or interactively selecting
positions is a digitizer. These devices can be designed to input coordinate
values in either a two-dimensional or a three-dimensional space. In
engineering or architectural applications, a digitizer is often used to scan a
drawing or object and to input a set of discrete coordinate positions.
• Image Scanners: Drawings, graphs, photographs, or text can be stored for
computer processing with an image scanner by passing an optical scanning
mechanism over the information to be stored. The gradations of grayscale or
colour are then recorded and stored in an array.
• Touch Panels: Commonly found on many devices these days, these allow
displayed objects or screen positions to be selected with the touch of a finger.
Output Devices: These are devices that display data from memory of the computer
into different formats. Output devices take data from the computer and output them
in a form understandable by the users. Following are common output devices: -
• Monitors: Monitors, also known as Visual Display Unit (VDU), are the main
output device of a computer. It forms image from tiny dots known as pixels
that are arranged in regular form to form an image. The sharpness of the
image depends on the number of pixels. There are mainly 2 type of monitors:
-
o Cathode Ray Tube (CRT) Monitor: These types of monitors use a beam
of electrons which is directed toward a phosphor-coated screen. The
phosphor then emits a small amount of light for each position hit by
the electron beam. The electron beam is deflected appropriately to
form a corresponding image. Most displays are capable of displaying 80
characters of data horizontally and 25 lines vertically. The main
disadvantage of CRT is that it is very large and consumers a lot of
power.
o Flat Panel Display Monitor: The flat panel monitor, as the name
suggests, have reduced volume, width, weight, and power
requirement. You can hang them on walls, carry them in your pockets
(smartphones), wear them on your wrist. These days flat panel displays
are used everywhere. There are two type of flat panel displays: -
▪ Emissive Displays: These are displays that convert electrical
energy into light. Each pixel is individually lit and generates its
own light. For e.g. LED Panels, Plasma Panels.
▪ Non-Emissive Displays: Non emissive displays use optical effects
to convert sunlight or light from other sources into graphics
patterns. For e.g. LCD Panels which generally come equipped
with a backlight which shines over the display.
• Printers: This is an output device which is used to print information on paper.
There are mainly two types of printers: -
o Impact Printers: These printers print the characters by striking them on
the ribbon which is then pressed on to the paper. For e.g. Dot matrix
printer, drum printer etc.
o Non-Impact Printers: Non-impact printers print the characters without
using the ribbon. These printers print a complete page at a time; thus,
they are also called as Page Printers. For e.g. Laser printer, Inkjet
printer.
• Plotters: Plotters draw pictures on paper using pen. In the past, plotters were
used in applications such as computer-aided design, as they were able to
produce line drawings much faster and of a higher quality than contemporary
conventional printers, and small desktop plotters were often used for business
graphics.
Q4. Explain the following
a. Anti – aliasing: Antialiasing is a technique used in digital imaging to reduce
the visual defects that occur when high-resolution images are presented in a
lower resolution. Aliasing manifests itself as jagged or stair-stepped lines
(otherwise known as jaggies) on edges and objects that should otherwise be
smooth.
Antialiasing makes these curved or slanting lines smooth again by adding a
slight discoloration to the edges of the line or object, causing the jagged
edges to blur and melt together. If the image is zoomed out a bit, the human
eye can no longer notice the slight discoloration that antialiasing creates.
Antialiasing is often implemented by graphics cards and computer games.
Depending on the application, different methods of antialiasing may be
applied. This technique is also used in digital photography and digital audio.
b. Character generation
In computer graphics character can be generated using software.
– In hardware implementation of character generation limited faces of
character can be generated.
– A wide variety of faces of character can be generated with software
implementation.
– There are three methods for generating characters using software
implementation.
Stroke method.
Vector method or bitmap method.
Star bust method.

• Stoke method
o In this method we use a sequence of line drawing function and arc
functions to generate characters.
o We can generate a sequence of character by assigning starting and
end point of line or arc.
o By using this method various faces of character can be generated by
changing the values (parameters) in line and arc function.
• Bitmap Method
o This method is suitable for producing various character.
o Font size of character can be increased by increasing the size of
array.
o The main draw back of this method is this method produce aliased
character.

• Starburst Method
o In this method a fixed pattern of line is used to generate the
character.
o In this method we use a combination of 24 bit line segment.
o In 24 bit line segment code each bit represent a single line.
o To highlight a line we put corresponding bit 1 in 24 bit line segment
code and 0 otherwise.
o Here in this method 24 bit segment code is required to put in
memory for generating character.
o Hence extra memory is required in this method.
o Character quality is poor due to limited face.

c. Fill styles: A basic fill-area attribute provided by standard graphics libraries is


the display style of the interior. We can display a region with single colour, a
specified fill pattern or a hollow by showing just the boundary of the region.
We can also fill selected regions of a scene using various brush styles, colour-
blending combinations, or textures. Other options include specifications for
the display of the boundaries of a fill area.
d. Line attributes: A straight line can be displayed with basically three attributes,
namely colour, width and style.
i. Colour: It defines the colour of the line to be displayed. Line colour is
typically set with the same function for all graphics primitives.
ii. Width: It defines the width of the line. Implementation of line width
may depend on the capabilities of the output device. A heavy line can
be displayed as a adjacent parallel lines on a monitor, whereas on a pen
plotter it may require a change in the pen to draw a thicker line.
iii. Style: The line style can be solid, dashed or dotted. We modify a line-
drawing algorithm to generate such lines by setting the length and
spacing of displayed solid sections along the line path.

You might also like