Lecture 03
Lecture 03
(BCSPC7010)
7th Semester CSE (R-17)
Today
• Scan Conversion of Line
• DDA
Liquid Crystal Display
A LCD is a flat-panel display or other electronically
modulated optical device that uses the light-
modulating properties of liquid crystals combined
with polarizers. Liquid crystals do not emit light
directly, instead using a backlight or reflector to
produce images in color or monochrome.
https://www.xenarc.com/lcd-technology.html
Plasma Display
Plasma Display
A plasma display is a computer video display in which
each pixel on the screen is illuminated by a tiny bit of
plasma or charged gas, somewhat like a tiny neon
light. Plasma displays are thinner than cathode ray
tube ( CRT ) displays and brighter than liquid crystal
displays ( LCD ). Plasma displays are sometimes
marketed as "thin-panel" displays and can be used to
display either analog video signals or display
modes digital computer input..
SCAN CONVERSION OF A LINE
A line in computer
graphics typically refers
to a line segment, which x+b )
y= m (x 2, y 2
is a portion of a straight P2
line that extends b , y )
P 1( x 1
1
indefinitely in opposite
directions.
It is defined by its two end points and the line
equation where m is called Slope and b is y
intercept of the line.
Direct use of the line Equation
Line equation:
At a point
If slope
Let next point of p(x1, y1) is P(x2, y2)
DDA (DIGITAL DIFFERENTIAL ANALYZER)
DDA(x1, y1, x2, y2)
{
dx= abs(x2-x1);
dy= abs(y2-y1);
if(dy>=dx)
L=dy
else
L=dx
∆y=(y2-y1)/L
∆ x=(x2-x1)/L
i=1,x=x1,y=y1;
while(i<=L)
{ putpixel(round(x), round(y),2);
x=x+ ∆ x;
y=y+ ∆ y;
i=i+1 }
}
DDA (DIGITAL DIFFERENTIAL ANALYZER)
Advantage of DDA:
Easy to Implement.
Disadvantage of DDA:
Poor accuracy at the terminal point.
Step 3:
Step 4:
Step 5:
DDA (DIGITAL DIFFERENTIAL ANALYZER)
10
i Xnew Ynew X Y
9
5.5 5.5 5 5
8
1 6.5 6.3 6 6
7
2 7.5 7.1 7 7
6
3 8.5 7.9 8 7
5
4 9.5 8.7 9 8 4
5 10.5 9.5 10 9 3
2
1
1 2 3 4 5 6 7 8 9 10
REVISION : 02
• Scan Conversion of Line
• DDA Algorithm for Line Drawing
NEXT CLASS
• Bresenham’s line drawing algorithm