Remark for the bresenham line generation algorithm, Computer Graphics

Assignment Help:

Remark for the Bresenham Line Generation Algorithm

Remark: The algorithm will be properly the same if we suppose | m | < 1

  • Algorithm | m | < 1:

(a) Input two line ending points and store left end point in (x0, y0) (b) Load (x0, y0) on frame buffer that is, plot the first point.

(c)  Determine Δx, Δy, 2Δy, 2Δy - 2Δx and acquire the beginning value of decision parameter as p0 = 2Δy - Δx

(d) At each xk along the line, beginning at k = 0, perform subsequent test:

If pk < 0, the subsequent plot is (xk + 1, yk) and pk + 1   = pk + 2Δy else subsequent plot is (xk + 1 , yk + 1) and pk + 1 = pk + 2(Δy - Δx)

(e) Repeat step (D) Δx times.

Bresenham Line Generation Algorithm    (| m | < 1)

Δ x ← x1 - x0

Δ y ← y1 - y0

p0 ← 2Δy - Δx

while (x0 < = x1) do

{puton (x0, y0)

if (pi > 0) then

{x0 ← x0 + 1;

y0 ← y0 + 1;

pi + 1 ← pi + 2 (Δy - Δx);

}

if (pi < 0) then

{x0 ← x0 + 1

y0y0

pi + 1 ← pi + 2 Δy

}

}


Related Discussions:- Remark for the bresenham line generation algorithm

Reflection, determine the tranformation matrix for reflection,computer grap...

determine the tranformation matrix for reflection,computer graphics

For orthographic parallel projection, For orthographic parallel projection:...

For orthographic parallel projection:    glOrtho(left, right, bottom, top, near, far);  glOrtho2D(left, right, bottom, top);    Here left, right define the x-direction ex

Briefly describe the variants of the interaction model, Question: a) Th...

Question: a) The implications of transparency are a major influence on the design of system software. There are eight forms of transparency. Name and give a small description o

Alias wavefront - softwares for computer animation, Alias Wavefront - Softw...

Alias Wavefront - Softwares for Computer Animation Alias is one of the highest computer animation packages out there. Alias was formed by the company which used to be Alias, a

Image classification, The image classification is the process to categorize...

The image classification is the process to categorize images into one of several classes or categories. In this project, there are seven categories (Piano, Kangaroo, Strawberry, Su

What is translation, What is translation?  Translation is the process o...

What is translation?  Translation is the process of changing the position of an object in a straight-line path from one coordinate location to another. Each point (x, y) in the

Interfacing lcd liquid crystal display, Main Objectives: Interfacing...

Main Objectives: Interfacing LCD to the Micro-controller (PIC18F4520) Programming LCD by using C- language via MPLAB Sending data or command to the LCD Component

Polygon meshes - modeling and rendering, Polygon Meshes - Modeling and Rend...

Polygon Meshes - Modeling and Rendering A polygonal surface to be sketched may not be easy and may have enormous curls and curves. Illustration: a crushed piece of paper or cr

Mplab ide software, MPLAB C18 TOOL (MC18) The MPLAB C18 compiler was de...

MPLAB C18 TOOL (MC18) The MPLAB C18 compiler was designed as a full featured ASNI- compliant C - complier for the PIC18 family of 8bits MCUs. MC18 compiler is integrated with c

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd