answersLogoWhite

0

What is bresanham algorithm?

Updated: 10/23/2022
User Avatar

Bharaniavl

Lvl 1
15y ago

Best Answer

If you're wondering about the "Bresenham line algorithm", it is an algorithm (a process used for making a desired result) that plots a geometrical line (consiting of infinate points, as if you draw a straight line on a piece of paper) and translates it to a computer screen (composed of pixels, or video "points" that have a specific amount of sized points) The algorithm is as follows: function line(x0, x1, y0, y1)

boolean steep := abs(y1 - y0) > abs(x1 - x0)

if steep then

swap(x0, y0)

swap(x1, y1)

if x0 > x1 then

swap(x0, x1)

swap(y0, y1)

int deltax := x1 - x0

int deltay := abs(y1 - y0)

int error := -(deltax + 1) / 2

int ystep

int y := y0

if y0 < y1 then ystep := 1 else ystep := -1

for x from x0 to x1

if steep then plot(y,x) else plot(x,y)

error := error + deltay

if error ≥ 0 then

y := y + ystep

error := error - deltax This algorithm was taken from the site http://en.wikipedia.org/wiki/Bresenham's_line_algorithm

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is bresanham algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How are the expanded algorithm and the standard algorithm different?

They are different because standard algorithm is more common then the expanded algorithm


What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


Which algorithm is more efficient lamport bakery algorithm or black and white bakery algorithm?

Black and White bakery algorithm is more efficient.


What is complsexity of an algorithm?

Complexity of an algorithm is a measure of how long an algorithm would take to complete given


How algorithm is different from flowchart?

An algorithm is a series of steps leading to a result. A flowchart can be a graphical representation of the algorithm.


List down the names of any three parameters on which you analyze an algorithm?

what is algorithm and its use there and analyze an algorithm


How do you test algorithm?

By preparing test cases we can test an algorithm. The algorithm is tested with each test case.


How are expanded algorithm and the standard algorithm different?

Yes


Define algorithm and explain its criteria?

algorithm criteria


What is algorithm evaluation?

evaluation iz same as the testing of an algorithm. it mainly refers to the finding of errors by processing an algorithm..


What is algorithm write properties of algorithm?

An ALGORITHM is a sequence of steps that depicts the program logic independent of the language in which it is to be implemented. An algorithm should be designed with space and time complexities in mind.


Is knapsack algorithm is a public key encryption algorithm?

yes