0% found this document useful (0 votes)
20 views8 pages

CG Unit 1 Sol

The document defines key graphics concepts like pixels, vectors, lines, and frame buffers. It also explains input devices like tablets, touch panels, and light pens. Graphics display terms like persistence, resolution, aspect ratio, and raster scan displays are defined. Various display devices and their features are also explained.

Uploaded by

ajitkolpuke
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)
20 views8 pages

CG Unit 1 Sol

The document defines key graphics concepts like pixels, vectors, lines, and frame buffers. It also explains input devices like tablets, touch panels, and light pens. Graphics display terms like persistence, resolution, aspect ratio, and raster scan displays are defined. Various display devices and their features are also explained.

Uploaded by

ajitkolpuke
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

Q.

1 Define 1] Pixels 2] Vectors 3] Line 4] Frame buffers


ANS:
Pixels:
A pixel (short for "picture element”) is the smallest unit of a digital image or display screen.
Pixels are often used to measure image resolution, with each pixel representing a single point in
the image

Vectors:
In the context of graphics, vectors describe a path defined by points, lines, and curves. Vector
graphics are resolution-independent, meaning they can be scaled up or down without losing
quality.

Line:
A line often refers to a straight connection between two points, defined by starting and ending
coordinates. The visual representation of lines in digital graphics is usually accomplished by
displaying pixels in a linear arrangement to simulate the appearance of a continuous line.

Frame Buffers:
A frame buffer is a portion of RAM containing a bitmap that drives a video display. It represents
the memory that holds the data for each pixel on the screen. Each pixel's data in the frame
buffer corresponds to the pixel's color and intensity on the display.

Q.2 Explain the following primitives: 1] Tablets 2] Touch


panels 3] Light pen
ANS:
Tablets:
Often referred to as "graphics tablets" or "digitizing tablets", these are input devices that allow
a user to manually input hand-drawn graphics and data directly into a computer.

Touch Panels:
Touch panels, commonly known as touchscreens, are display screens equipped with sensors to
detect touch (pressure or capacitance) on their surface. When a user touches the screen, the
system determines the coordinates of that touch.

Light Pen:
A light pen is an input device that looks similar to a pen and has a photosensor on its tip. It is
used to detect light emitted from the screen of a computer monitor or other display. When the
tip of the light pen is placed against the screen, it can detect its position based on the timing of
the screen's scanning beam (in CRT displays).

Q.3 Define the following terms: 1] Persistence 2] Resolution 3] Aspect Ratio 4]


Raster scan display
ANS:
Persistence:
Persistence, refers to the duration for which a phosphorescent material (commonly used in CRT
displays) continues to emit light after being excited by an electron beam.

Resolution:
Resolution describes the amount of detail a digital image or display can represent and is
typically measured in pixels. For displays, it indicates the total number of pixels in both
dimensions (e.g., 1920x1080 pixels). Higher resolutions mean more pixels, which usually allows
for a sharper and clearer image.

Aspect Ratio:
Aspect ratio is the ratio of the width to the height of an image or screen. The aspect ratio helps
ensure that images and videos are displayed correctly without unnecessary stretching or
compression.

Raster Scan Display:


A raster scan display is a type of display system that illuminates the screen one row at a time in
a top-down sequence. It does so by directing the electron beam (in CRT monitors) or other
illumination methods (like LEDs in modern displays) across and down the screen in a pattern
known as a raster pattern.

Q.4 Explain the features of various display devices


ANS:
1] Cathode Ray Tube (CRT):
Phosphorescent Screen: When the electron beam strikes the phosphor-coated screen, it emits
visible light.
High Color and Brightness: Offers a wide color gamut and high contrast ratios.
Refresh Rate: The electron beam redraws the display many times per second.
Resolution: CRTs don't have a fixed number of pixels; instead, resolution is adjustable within
the limits of the tube and the control circuits.
Size and Weight: They are relatively bulky and heavy compared to modern displays

2] Liquid Crystal Display (LCD):


Thin and Lightweight: Uses a thin layer of liquid crystals sandwiched between transparent
electrodes and polarizing filters.
Backlight: Requires a light source behind the crystals, usually provided by LEDs in modern
displays.
Resolution: Offers fixed pixel resolution, meaning native resolution at which display looks best.
Power Consumption: Generally, consumes less power than CRTs.
Viewing Angles: Earlier models had limited viewing angles, but modern IPS panels offer wider
angles.
3] Light Emitting Diode (LED) Displays:
Backlighting: Refers mostly to the type of backlighting in LCD displays; LEDs can be edge-lit or
full array.
Brightness: Generally, brighter than other types of displays.
Energy Efficiency: Consumes less power and can be thinner than traditional LCDs.
OLED: A variant where each pixel is an individual LED, allowing for deep blacks and high
contrast ratios.

4] Plasma Displays:
Cell-Based: Uses small cells filled with noble gases and a bit of mercury.
High Contrast: Can achieve deep blacks since each cell is self-lighting.
Response Time: Generally, very fast response times, suitable for fast-paced content.
Energy Consumption: Typically, more than LCDs but has improved over time.

5] Digital Light Processing (DLP):


Micro-mirrors: Uses thousands of tiny mirrors to reflect light towards or away from the screen.
Projection: Commonly found in projectors for cinema or presentations.
Color: Uses a rotating color wheel or individual LEDs/lasers for different colors.

Q.6 Write short note on: 1] Scanner 2] Digitizer 3] Display file


interpreter
ANS:
1. Scanner: A scanner is an input device that digitizes printed images or documents, converting
them into electronic form. Common types include flatbed scanners, where documents are
placed face-down on a glass pane, and handheld scanners, which are moved manually over the
document. Advanced scanners can also differentiate colors and have varying resolutions,
allowing for high-fidelity reproductions. The digitized output is often saved as image files, such
as JPEG or TIFF.

2. Digitizer: A digitizer is a device that converts analog information into digital form. In the
realm of computer graphics, a common example is the graphics tablet, which transforms hand-
drawn sketches or signatures into digital coordinates. The tablet typically uses a stylus or touch
input, capturing both position and, in some cases, pressure information. This digital data can
then be used in graphic design software, CAD programs, or other applications that require
precise manual input.

3. Display File Interpreter: The display file interpreter is a component in computer graphics
systems responsible for translating stored graphic instructions or data into signals for a display
device. In essence, it reads the content of a display file, which contains a list of commands or
primitives (like lines, shapes, and points), and interprets these commands to control the display
hardware accordingly. By doing so, it renders the intended graphic image or scene on the
screen. The efficiency and capabilities of the display file interpreter play a significant role in the
system's overall rendering performance.
Q.7 Explain flat panel display in detail
ANS: A flat panel display (FPD) is a thin and lightweight screen used primarily for computers,
televisions, and other electronic devices. Unlike the bulky Cathode Ray Tube (CRT) monitors,
FPDs use layers of materials sandwiched closely together to produce visuals.

Key features:
 There are various kinds, including Liquid Crystal Display (LCD), Light Emitting Diode
(LED), Organic Light Emitting Diode (OLED ), and Plasma displays.
 FPDs come in various resolutions, from HD to 4K and beyond, denoting the clarity and
sharpness of the image.
 They consume significantly less power compared to CRTs, making them environmentally
friendly and cost-effective.
 Their thinness allows for versatile uses, such as wall-mounted TVs or portable device
screens.
 Modern FPDs, especially OLEDs and IPS LCDs, offer wide viewing angles with consistent
colors.

Q. 8 Explain DDA line drawing algorithm. Consider the line


from (1,1) to (5,6) use DDA line drawing algorithm to raster.
ANS: The DDA algorithm is utilized to draw lines in computer graphics. It incrementally plots
points between two given end points based on calculated slopes.

STEPS:
- Calculate the difference in x and y coordinates: Δx = x2 - x1 and Δy = y2 - y1.
- Calculate the absolute values: |Δx| and |Δy|.
- Determine the number of steps required: steps = max (|Δx|, |Δy|).
- Calculate the x and y increments: Xinc = Δx / steps and Yinc = Δy / steps.
- Set the initial point (x, y) as (x1, y1).
-Incrementally add Xinc and Yinc to x and y for 'steps' times to plot the line.

Applying DDA for the line from (1,1) to (5,6):


 Δx = 5 - 1 = 4 and Δy = 6 - 1 = 5.
 |Δx| = 4 and |Δy| = 5.
 steps = max (4, 5 ) = 5.
 Xinc = 4/5 = 0.8 and Yinc = 5/5 = 1.
 Starting from (1,1 ), the points plotted are:
a. (1, 1 )
b. (1.8, 2 ) which rounds to (2, 2 ) when rasterized.
c. (2.6, 3 ) which rounds to (3, 3 ) when rasterized.
d. (3.4, 4 ) which rounds to (3, 4 ) when rasterized.
e. (4.2, 5 ) which rounds to (4, 5 ) when rasterized.
f. (5, 6 ) which is the endpoint.
Thus, using the DDA algorithm, the rasterized line between (1,1 ) and (5,6 ) will pass through
the points (1,1 ), (2,2 ), (3,3 ), (3,4 ), (4,5 ), and (5,6 )

Q.9 Explain the Bresenham's Circle Algorithm


ANS:
Bresenham's Circle Algorithm :
Bresenham's Circle Drawing Algorithm is a deterministic method for drawing circles by
incrementally selecting the nearest pixel position at each step. This algorithm is more efficient
than traditional methods because it uses only integer addition and subtraction along with a test
to know where the next pixel should be.
Steps :
1. Initialization: Begin from the topmost point on the circle at position ` (0, r) ` where `r` is the
radius of the circle. Set the initial decision parameter `p = 3 - 2r`.
2. Pixel plotting: Due to the 8-fold symmetry of a circle, we only compute the points of one-
eighth of the circle and derive the others. The calculated points are ` (x, y) `, and the other
symmetrical points are ` (-x, y) `, ` (x, -y) `, ` (-x, -y) `, ` (y, x) `, ` (-y, x) `, ` (y, -x) `, and ` (-y, -x) `.
3. Iterative Selection:
- If `p < 0`, the next pixel is directly east of the last pixel. Update the decision parameter: `p = p
+ 4x + 6` and `x = x + 1`.
- Otherwise, the next pixel is southeast of the last pixel. Update the decision parameter: `p = p
+ 4 (x - y) + 10` and `x = x + 1`, `y = y - 1`.
4. Continue the process until `x ≥ y`.

Q.10 Explain Mid-point circle drawing Algorithm


ANS:
The Mid-point Circle Drawing Algorithm is an efficient way to draw a circle using only integer
addition and subtraction along with a test to decide the next pixel's position.
Steps:
1. Initialization: Begin with a point ` (x, y )` where `x = 0` and `y = r` (`r` being the circle's radius
). Calculate the initial decision parameter: `p = 5/4 - r` (or `p = 1 - r` ).
2. Symmetry Utilization : Due to the 8-way symmetry of a circle, you only need to calculate
the points for one-eighth of the circle. From one calculated point ` (x, y )`, you can derive the
remaining 7 symmetric points.
3. Iteration :
- If `p < 0`, the next point to plot is directly to the east, and the decision parameter is updated
as:
p = p + 2x + 3
x=x+1
-- If `p >= 0`, the next point to plot is southeast, and the decision parameter is updated as:
p = p + 2x - 2y + 5
x=x+1
y=y-1
4. Continue plotting until `x` becomes greater than or equal to `y`.

Q. 11 Explain What is stroke method and bitmap method


ANS:
Stroke Method :
The stroke method, often referred to as the "vector" or "outline" method, represents
characters and symbols by their outline. The outline is described using a set of lines, curves, and
other geometrical shapes. Features:
- Scalability : Since characters are described as vectors, they can be easily scaled without loss
of clarity or sharpness.
- Compactness : Requires less memory because only the outline or path information is stored.
- Flexibility : Allows for varied styles and weights of characters with the same basic design.
- Use Cases : Common in font design systems like TrueType or PostScript.

Bitmap Method :
In the bitmap method, characters are represented as a matrix of pixels (bitmap ). Each pixel
either has a value (showing the part of the character ) or is blank.
- Resolution Dependent : Scaling can lead to distortion or pixelation.
- Memory Intensive : Requires storage for each pixel. Higher resolutions need more memory.
- Speed : Can be rapidly rendered, making it suitable for systems where speed is a priority.
- Use Cases : Common in early computer systems and devices with limited processing
capabilities.

Q 12. Describe bresenham's algorithm for line drawing


ANS:
Bresenham's algorithm is an efficient method for drawing straight lines on grid-based systems
(like raster displays ) as it uses only integer arithmetic, which makes it faster than algorithms
that use floating-point calculations.
Basic Steps:
1. Initialization:
- Start from the initial point ` (x0, y0 )`.
- Calculate the difference: `Δx = x1 - x0` and `Δy = y1 - y0`.
- Determine the primary direction of the line (either horizontal or vertical ) based on which
difference is greater.
- Compute the decision parameter `p = 2Δy - Δx`.
2. Iteration:
- For each subsequent x-coordinate, do:
- Plot the current point (x, y ).
- If p < 0, the next point is (x+1, y ) and update p = p + 2Δy.
- Else, the next point is (x+1, y+1 ) for a line in the 1st quadrant and update p = p + 2Δy -
2Δx.
3. Symmetry :
- If the line's slope is steep (i.e., if |Δy| > |Δx|` ), the roles of x and y are swapped, but the
algorithm's essence remains the same.

Q.13 Consider the line from (2,7 ) to (5,5 ). Use brensenham's


line drawing algorithm to rasterize this line
ANS:
Q. 14 Explain OpenGL Architecture with its Primitives and
Attributes
ANS: OpenGL Architecture:
OpenGL (Open Graphics Library ) is a cross-language, cross-platform API for rendering 2D and
3D graphics. Its architecture can be concisely described in terms of its primary stages and
components:

1. Application Stage: This is where the application provides input, like geometric and image
data, to OpenGL.
2. Primitive Processing: Transforms input into geometric primitives (like points, lines, and
polygons ).
3. Rasterization: Converts the primitives into a set of fragments.
4. Fragment Processing: Further processes these fragments, applying texture, shading, etc.
5. Frame Buffering: The processed fragments are stored in a frame buffer, ready for display.

Primitives:

OpenGL offers various geometric primitives:


- Points: Individual pixels or small dots.
- Lines: Straight line segments.
- Triangles: Basic geometric shapes used for complex model rendering.
- Quads: Four-vertex polygons.
- Polygon: General multi-vertex shapes.

Attributes:
Attributes are properties or parameters that can be set to dictate how OpenGL will process
primitives:
- Color: Defines the colors of primitives.
- Point Size & Line Width: Determines the thickness of points and lines.
- Shading: Dictates how colors are interpolated across primitives.
- Texture: Applies image data to surfaces for added realism.

You might also like