Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Midpoint Line Algorithm help Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Pipe

April 02, 1999, 05:07 PM

hello,
can someone help me get the case of a steep slope line for the
midpoint line algorithm. 1 < slope < infinity


here is how i computer a postive shallow slope.
0 < slope < 1

i just cant figure out a steep slope.

dx = x1 - x0;
dy = y1 - y0;
d = dy * 2 - dx;
incrE = dy * 2;
incrNE = (dy -dx) * 2;
...
else if( dx > abs(dy) ){ /* Shallows */
if( dy > 0 ){ /* Positive Shallow */

while( x < x1 ){
if( d

 
This thread contains 1 message.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.