clASSMAte
Date
Page
Hue Dading
Jn Comp u d e , ushen o e dao a i u e , all ths
pineluying
pitels betoeeu h too eud-peims
mecd to be appooimated.
Jhod's
Jhots y we meed a prope algoittm fo
doransing amy hafpe
Jhe Campdo neeu ismade up a Jeveral Smal
dots caled piels.
is meanrer is Seleted
chev
for proimaHom.
EM piaeh s denoed by Co-ordmales.
Juee wd bs Ionedclanu very
, ) (2 be" two þixeL,_
we Cau ughligt uly a integral value c
ss ttie pind widh i meareet is
pinels
pin
bet apporori mafid.
PinelJt usacinulam dot thoct us alassMAte
Cetedd at a u Date
utegral positi6n ( ) Page
O indegral gicd.
ime Equaliau
Jrercept M h a t par
the
(o4
C4 Slope Jhe rate at elu el
'svaluuR i clhauging al we
' alue.
m= tan |
a i e pales teug Suppose ( d )
) e thee t pakl mu
Soukiy uua equatisu.
m +C
MXt C
- M2-m,
dd ma-)
m= - , A
A
So, we have too fomula e for m
asSMAte
Date
m=dauo Page
m
A
BRUTEFeRCE APPROACH FOR LINE DRAOI NG
Jt i equied to sfudy befor DDA
Bre auhamls algoritum becauwe i ocol e l l
cuy DDA Bel euham ae ußed.
to-ordimat uri lt
IhA neo_pirel
ethu ke iu t u gug uf i or
a upeoand di
Suppose, t starding_ pait is ,2)
Jhe mu pied co-ovdimate he (atl, y)
aluoanyA
C a Clccfed um t
Lune equaii Cu
Suppose ue n e w o-ordindes a
the
olenoted by (xy) ,
=tl = 2
m (2) tC
elASSMAte
Jhpob|em wil + s is t Date
meoy' value may he a f/oalni Page-
paut, suich ho to be
Jhe unding- H is deue i T
floo fune)
Rend Floor(os ty)
F(Ot1.01)
F (-6)-
u odvauetege
Jeo
H e q u i n d.
m ay loating paiut Calulatiu l
floating
4eqired eact t esation
DDA DTGITAL DIFfERENTIAL ANALY2ER)
9implet Agoithn.
: tb
7 m
( t) +b
4 -t
, m tb
Ju t o ttootimg peut
Operai e huve hetu awi ded.
Jhod DDA E a inurormeuctal
algoithm b o at each 9hep muD Co-0dimaf
a &bteimed ayudiug tla prtidu Co-odinks,
clAsSMAte
Date
Page
PosHive
> Possi ble cala
Negubive m
m-/
Alqoitum
( )
Sent End
d - d2-A1
dy- -8, cuge u
a b s (d) > ak: (dy]
Ltps abs(dr)
No-
iteratioud
teps abs (dy)
d d y
steps
iL k Hep i tt)
tor (i- stps)
Plot ( ) > Jutega valuPoud,N
car
Adwautage No ftoalng paiut multupu Date
Page
Enample
PLot a line between H paiuutH (G4) 2 , 4 )
(S4) (12,4)
d a-1 12 - 7|
d-- -
1-4 - 9
dy-3
He dr) > dyf
Total teratious
dr
tes
E 0.4
Plot(S,
S+ 6 Plot (6, 4)
4 t o.4=(4-4
Culy tegol l u
2 Plot (t, S)
-4.4+0.4 =4.g
Piet (,9
48t0.4= S.
= 8tI= 9 Pat alassMAte
Date
.2to.4= . 6 9,6) Page
A=
9+1 /0 PIot
= 6 to. 4= 6 (10, 6)
PI@t
= 10+l= t
6.4 (1, 6)
6 6 to.4
= lt = 12 PI&t
= 6.4+O.y = 6. (12,7)
heuld be mi/a
to tue end-bout