Header Ads Widget

Parallel version of line algorithm by two methods

In the parallel version of line algorithm, pixel positions are calculated along a line path simultaneously by partitioning the computations among the various processors available. Methods for parallel version of line algorithm are :

Bresenham's line algorithm :

(a) Given np processors, a parallel Bresenham's line algorithm can be used by subdividing the line path into np partitions and simultaneously generating line segments in each of the sub-intervals.

(b) For a line with slope 0 < m < 1 and left endpoint coordinate (x0. y01. the line is partitioned along the positive x-direction. 

(c) The distance beginning x position of adjacent partitions is calculated as :-

Δxp = (Δx  + np -1)/np

Where Î”xis the width of line and the value for partitions width Δxp is calculated using integral division.

(d) The starting x coordinate is calculated for the kth partition as :

xk = x0 + kΔxp

(e)  At the kth partition, the startingy coordinate is :

Yk = yo+ round (kΔyp)

(f)   The initial decision parameter for Bresenham's algorithm as the start of the  kth sub interval is:

Pk = (kΔxp)(2Δy) – round(kΔYp)(2ΔX) + 2Δy - Î”x

Post a Comment

0 Comments