You are on page 1of 25

ymen li dhn

endpjnts lled Cos


dhisis
Peind s beuwcen bhichlic
these only ins
piecef
ment Seg A
line
Teptc4endpalygon
3 (ollehn ains.]0MoTepoinis.
mepescnt
Tuopinds(X,
anJ
)
d& hon Lix apposte int inhnitly
xdend fhat paints afsetCanhneaus
pthaj canept mhcal matha
a A
Line
i
urve Spline 3) gms poly
Line
Point
poaibes ouput Bagic
pimilives toulpud
as
efemed
to ShuchuTe
these SCene descsbe
to
Funchon pide qrannine Gephics
tsonsféng q0phicS 3.
uhic
praess is
pinkd 2
Compdea diplayed be on that
based pizel iato Cle
as Such
anvesbns 2eprcscndabn geomhi
Scon
I.
Coner6)
: 0 Can S
gioYnConves Scan
Page
ste Dale
09UNIT:
lhssmat
Date
Page
Polygun :
Closcd
folyqonis 2 pim nsimal shape hoving the a
more 5des
Laas sidcs ond euch ode
af ine Seqment ioleácels with he aihy ad vordex

Line ruwing Ag rithms :


1) Digita! Diffeenbal ftoalyae(oDA):

DDA inc Alqoithm


1Rod dhe Iin end pands (2 e) end (2e2, y2)
Such ghaB they hat equel.
thenplot dhdpojnt & <yit
2
&

Aength
else
lengdh
ehd if
classrate
Date

(u2-u) ength
( Ye - y.)_/ Jenqth
This malcs

6. 0.S Stqn (bt)


sqn(a)
L San Furchom ehuns depsn doáng m
whetha its is <0
The factr makes i pssibl to
oupehicy,
the

6.
In dhËs
idenqdh)
plol

Stop
Eample linz
Co:ns) des Sompk
Dasderi2 the ine

1 The line end points


6
Pivel brseed

3.
Jhor

So, length y 6

4.

dongth

S.
in (bu) Sian ( by )
() 1) ()

(o,o)
2)

y + Dy
0s t +
2.S
classMste
Date
Page

3) |4) j 4
2.49 + 0-66

2.48

3s t
3s

6) 6)
1) ?14t
3.80

S.S

termineke

Shp
plot
O.S (o,)
182 2.6 (1,2)
2. 43 (2,3)
3-14 (3 4)
35 (9,s)
4,4<

Cons da (-s, 6)
Kosterie thene.
classmste
Dote 31/i124
Poge
Line
2 paint used du Spccikya ih ( , y.)
than gikn line is:
2 Slope

where Slop
This abov
the
eq n
line
Celle d Slap indazpt
slep is the Change
-ehangn
the peinh the lihe
The inteceyo b sheian! ahich ine
OSSes ghe ayis

.
Using Dp

1.
The line en poinds
-6

2.

6 6

3.
beae &
dhen
)

9/9
9|9

9! 9>! 92!

S(I)+

5o(-)+

X
Si9-
- ((-)45 S5(1)t
'9 S S)
-
"dos

(o'o)
50
(1-')
(2'}
5
-'s-) (s
b:'-)
(s-')
(9-'9)
cassmate
Date
Page

DDA Cide Pra toing Plcjaihrn

Alqonthrm and Calceulak Jhe


Rcad he adiu s af the cicle
value of
2.

slorly:

slod.2e E -/
Y 2
3. Calculale

do

nt
/o (x 2), int (vz))
X2
y2 cumnt point)
(Páníhalize the
(o:7s) (o12s)
G)
+(O12s
()
)
O|25
3 nvaluc
3 2
bllwin (32n|
the Sahsfy shuld
2n
Uol4¢ Colculofe 3.
(o,6) point hom Cscle fa
n DDA using Ongin CenereJ
ith path dvcle dhe
oln pos. piycl Calculak
stop.
eat sdohng 0hesoisc
paind isposnl Custn th IE
posn sdehng Jhe is pon Cnent Jhe ifchele L
Page
mate
Sn3
sL·o +o)(l(bs) szl0) (S71)(
8h

5h -
3) (stl-o)
+ (25) (Slo) (Eoz)
bs

5 (sl-o)
b- S8-D) (

(5 Sh3 (92)3
(sos)(Su)0)
s8·B + 1S2(szlo)

5
ld
(h'n)
(3'o)
o) (9
SL:0
1) (s
bs (s')
(Sj
(9's)
deenel Points, Cololehorm hard, Cant ptt deeiankcin:ucl
Oruubcale of pPA /zik-2ele ine ) Date
Page
|2/24
Bresenham's Line Algmthm

Alaothmn

Stard

Calcula te and Ay
Dy yz- y)
?. Calculate decisin parameder, Pic
2 Dy
classmat
Date
Page

Buppase dhe Cuncn poin is (k, y) 4 neot


poin is etl, yt).
if

Gorme)
thern elsc ple o)

Plk t 2

5.
unhl the endPoinl is teecbed
numhe eqals to imes

6
slop.
blw the sdo bng Coor dine tes
HumoncoL Colculok the puinls
(9.1) & ending Coardinetes
bregenham's line druwiny algmthm.
14
|8 22

( 2- y)
14-9

3
2 D9

Pls 3
classMate
Dote

page

As
PltL Plk t
+ 2. G - 2.S

Ple t!

Toble
pls
t 2- <'-2-5

t 3
20 Jo 2

-
20 12 2

j2 20 13 2
As
3 13
P t)

13
24

2
8- 6 |2 1s 2(

3
14
22
classmate
Page

Gonsida Jhe pihh (5,s) and (i3,4) dyuo


dauo a |ine
B.L.D.A

22 |3
y2: 9

2. 2 Ay- 2 D4
|3- S

3.
2 Ddy

As
pk t 2Ddy - 2 Ds
2" 4 2.
-8
1) 6

As
Pk t J
24
6 6

As Plk o
2A
(-)

6t
posaneto deisisn
stop
Deched ends Here
12
pk As
12
Ot-)
As
13
912
.
(
<
pk As
7
7
6 7
(-8) Ot tPlc
6 6 -8
As
-8t
plk As
Page
sMate Date
(1,) Ho (C,a) classmate

tBe Senham's iade


Ciscde Daui ng Aig.
|!i6 an cfGdeot Cundfustes ciscle d. alqo as
avoi ds the iqnomcic, Squoc
bosedb m nHoohny
Squor o t &
point anthmehc and pofocons o
only inlegas speabms
Selcel the
t ncarcd piYcd posíbon t Complek the anc.
H Consi ders 8 eay ymmehy
to qenerate
plots pard
pad cf the iscle,
To Cahere moeg
diceh - Ve direh.

Alqithra
1.
Pecd dbe. radius ciscle
2.
pavametr
da 3 - 29 Unihcli2e deísim Uarjoble )
3.
lhibelize the Slosbny pin1).
do
if
plo+(
Hhen

elsc
classmate
Dale

Page

yË -l ( decacnt ).i
+ )0

S.
Stop. 5lop ebch.

(o.a) Godius
60]ve dhis prb. R.CD. alg

Reod Rodius and

3- 2Y
3 2.8 - 13

puint).

-13 + 4|).+6 -3

As
2
classate
Date
Poge

As
2t|

di t
+ 4 3r7)+)0
5

As

S+

As

7 t 4 S-s) + lo

Stop 24)

Ji+1

Pevese
2 3 pinis
7 6
6
()
(-,1) (+,+) Counler docle &cclassMate
Date

(-,) (4,-) Page

(o,8) (0,8) (o,-8) lo,-8)


(U8) (-1,2) (-), -3) (1,-e)
(2, 8) (-2,8) (-2,-8) (2,-9)
(3,7) (-3,7) (-3,-) (3,-7)
(-a,6) (-4,-6) (4,-6)
(9,5) (-5.5) (-S,-s) (S,-5)
(G,a) (-s,4)
(,3) (-7,3) (-7,-3) : (7,-3)
(3,2) (-8,2) (-9,-2) (8,-2)
(L,8) (-1,9) (-1,-8) ( -8)
(3,0) (-8,0) (-8,0) (3,0)
Mid poind, Line Druuwing AHq
Sdb-Diui sion)
N

The mid p. lin.D. Mqa noemeata) ine


plothng olgs. thot is ad coeh slee Cuew malee
inocnehta olcalchn base d
to hnd y yalye
Pes)dmg shp
dose appeimchon o
Straiqh libe.
dhe
blw
Gien the
puinls,
pruisus P dhere co 2 pi
not pixel Clsse gB duthe line ost
nerth
2
- 1f ine obove mid Sele ME classmate
- If line below mid sela E Date

Page

Apv
1H chsosec the piyel clokegt to the line with
acuToy comsis lon & 6iqnhesS.
Requirey onlyazes dada 2nplc anhme
only
hc olulchons
3. 4 auoids Complerdis mal, avoid tuncade

Stop i when cach lo cnd poiht


Alaithmi
d Calculate dy n Jhe gien inpu.
( decision paramea)
2.
Calculote Dinihal 2Ay

Cast
Dinhal Dinshal

Lele t

Dmes Dinihal t 2 y Dne Diniha+ Dp


classmate
Date
Page

& end
Stahng
Sole
i s 2 0 , lo)
mid-p. Sub divísian poin!34,12
lgb.

yei 8

30- 20 lo 18-o

2: Diniho)l
-

2 3-. lo)

As
22
11

As
24
13

2 Ay ( -4)
-2 + 2
lo
14

26
25
14
6 di 6+(-4): 2
di = o t (-a)
30
29
16 2 -
-2
26
2S
|3 14
23 -2
|2 22 -2
2
6
Dnew Dinihel
paint hence
end
L
di
8
As As
2.8 2 -
di -2 (-4)= +(29
|6
28
<o di
o di 95
Page
Date
classMate
classmate
Date
Page

Q.2
stabng puint ( 30, 20 )&end point (40, 28 )
dy
4o- 3o

2,

Ay lo
2.8-

2.8- lo)3 -4

3.
31 32
21 22

6t-<)i 2 2+(-4)s -2

34
22 23
di -2 t 2.8
l4

36
24 25
S+(-G) 2

37 38
26 26
di - 2t 2. 8 4

39
27 28
: l44(- 4)= o di (ot (-a) 6
cdassmate
Date
Pnge

dmhal dnew
2 31
32 22 36
14 33 22
3s
34 23
32
24 29+
6 36 25

2 -2 37 26
38 26

34 27
20 23 26 20 22 3S 38
28

characler Geneiathon methods:


strolke Stonbu5 bi lmop 7.
most of fhe tmes characters
dthe grophícs diplay deyices, usuolly a
haduac
but Somehme thhugh dhe'Sl
the'
Therc Basic methde 1
Bit- Map metha d Dot mnahy
2.
6oke
3. Gtarburs1

enoun as dl ma bóy h this meths


Charact«s are qrdnted by an qnay of
dois picls in dhe fum maiy.
U6es eclongulaL pdden of pircls to
define charactes
Thís method the a J'5 a d ó ' s
pizs .
qlw}hahloht
classMAte
Date
Page
(1)

Grid palan fur letla A

Requinemac space because


fumat) hus stred in fond caehe
3pusaibl1fo
fo genentk *dif s2 &
Sct, but Hot paduce

6to lee

Sheke mcthd f Jetts A


Stavt

Seqmeotc o qenercok
genercek a ti
chanactes.
ine: Scamah daanlile
pen to fm Chasects
Con build shace methed?
line
daeing(ehich
Plqs.
Heccessco
neede d fr
deaj de
eech chactex.
Seg mend

Suppuds Scolliny sf characdec


by changing the linc sq meas).
6tarbust method :

22

|2 7

You might also like