12/21/24, 10:54 AM DDA Algorithm in Computer Graphics - Webeduclick.
com
[Link]
Computer Science Tutorials
Home AI C C++ C# .NET DS Java Adv. Java
Python DBMS OS Graphics Network SE Blog
DDA Algorithm in Search …
Computer Graphics Awarded by
DDA algorithm scans and converts lines with
acceptable approximation in sufficiently less time. BRILLIANTLY
Assume that a line is to be rasterized between given
endpoints (xstart, ystart) and (xend, yend).
SAFE![Link]
Now let us consider the equation of the line as: CONTENT & LINKS
Verified by [Link]
y=mx+c
2024
where m represents the slope of the line and c is the
y-intercept. This slope can be expressed as-
Related Posts
m= (yend – ystart)/(xend – ystart)
Computer
DDA Algorithm: Graphics
1. Read the line endpoints (x1, y1) and (x2, y2)
2. Δx=| x2 – x1 |
Δy=| y2 – y1 |
3. if(Δx≥ Δy) then
length=Δx
else
length=Δy
4. Select the raster unit,
Δx= (x2 – x1)/length
[Link] 1/3
12/21/24, 10:54 AM DDA Algorithm in Computer Graphics - [Link]
Δy= (y2 – y1)/length
5. x= x+0.5*sign(Δx)
y= y+0.5*sign(Δy)
Sign function algorithm work in all quotient. It
returns (-1,0) depending on whether it agreement
is
< 0, =0, > 0 respectively.
6. Now plot the points i=1,
while(i≤ length)
{
Plot(integer(x), integer(y))
x=x+Δx
y=y+Δy
i=i+1
}
7. STOP
← Previous Next →
ABOUT US
Webeduclick is an online educational platform that provides tutorials on
computer science. It also provides tutorials on programming languages
which are very helpful to clearly understand the concept to every technical
student. The purpose of this site is to help all students to take maximum
advantage of their programming knowledge. We also provide career
counseling and career development for students and educated people.
QUICK LINKS QUICK LINKS
SQL Digital Circuit and Design
Ruby Cloud Computing
Swift Quantum Computing
Scala Computer Architecture
COBOL Computer Basic Theory
Automata Industrial Management
Multimedia Interview Tips
[Link] 2/3
12/21/24, 10:54 AM DDA Algorithm in Computer Graphics - [Link]
R Programming Interview Question and Answers
Big Data
Data Science
Machine Learning RECENT POSTS
WordPress Developer Interview Questions and Answers
SEO Interview Questions and Answers
PHP Developer Interview Questions and Answers
Python Programming Interview Questions and Answers
Database Administrator Interview Questions and Answers
Java Developer Interview Questions and Answers
.NET Developer Interview Questions and Answers
Software Engineering Interview Questions with Answers
WordPress Plugin Development Questions and Answers
Contact Us About Us Privacy Policy
© Copyright 2018 - 2024 All Rights Reserved - Webeduclick
[Link] 3/3