0% found this document useful (0 votes)
45 views10 pages

Line 22 Jan 2021

The document appears to describe an algorithm for drawing lines on a graph by calculating pixel coordinates and plotting points. It involves calculating step sizes, absolute distances, plotting initial and rounded pixel points, and iterating through calculations and plotting to draw the line. Variables such as x, y, dx, dy, steps and distances between points are referenced in the algorithm.

Uploaded by

jicaya3355
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)
45 views10 pages

Line 22 Jan 2021

The document appears to describe an algorithm for drawing lines on a graph by calculating pixel coordinates and plotting points. It involves calculating step sizes, absolute distances, plotting initial and rounded pixel points, and iterating through calculations and plotting to draw the line. Variables such as x, y, dx, dy, steps and distances between points are referenced in the algorithm.

Uploaded by

jicaya3355
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/ 10

DDA

Pzoithrm Desi vhon

Scao liss ConVessioo


Ol ih

mX+-

CxprS)
yiotrap

Slop.e

K2
HIgvn Ihm

Lepntendpoinlk(X,J)[22
d
d
d

abs(da)>als (ly
sleps = abs (dr)
elR
S tepszaks(dy)
wiI_ pizel pss
st_h skp ias X9)
atzaliAat_piz
t pized
dx/sfeps
Plet pixel
dlstas
Calealk bwrt pizels

plot pixelTOund) TDund )


Kepesk K Skps
o

X 2o

dz 30-20
dy 2 &-Lo 2 Lo

drzdSteps /0

Plet 2e,1o

seps
2Dt+l=2 ot0.S=/bS
2 (211
2 + F 22|10.f+0f-{[. 6 2,12
22+1= 2 | . (+o S- l2.
23,2)
23+' 29
|(2y+0.i - 13B (29,13
2+ 2 (3.2 +0-S =1
s 14)
2+ 24 1 +0.8 =(y 8
26, 1)
26+ 27| ( & t6-l O6 27, 16)
27 28 IS. +04 -/0.
29,1)
29+ 30|17240.f
esen ham s
D

mxt6: mx +

+1+-y-
d 9KTT

)+4)
m()-
d-dml).A6-J
Y-()47

Rm /x*)2L-Jk

deu o

n(kt+ihmyz=
2AL(l
K+I

2 A y *k+
k+I
A
tJ

( K+ k

P+R4j-22S
Case A 2

P
,d d, > 4,

kPay-24n(p:-P ray-2.

docisnoa Par

=y-Ax

-dx
=RAJ-àaxytaayax Jo

Al2sn ho

Toput_ead posal 29) (2


plot fat poant_lzy,)

dhal eisna.
2-9

Po 4-Az

Chauk
O , e n e r t poink Poin

, and P P +
othexui se n e t _poii

nd P +i dy8,

Kepeak Stp 4 Ax 4ime

o,/o) So,1

=6

y - a x =-4-
Dterahon P

2
2 22 2

3 2 23 2

2 (3

2
2

2 21 16
2 28

29

You might also like