Description: Numerical differentiation (DDA) method: set off endpoints P0 (x0, y0), P1 (x1, y1) of the straight line for the L (P0, P1), the slope of the line segment L L abscissa x0 the starting point P0 to the L abscissa of the end of P1 x1 step, take steps = 1 (pixels), with L the linear equation y = kx+ b calculates the corresponding y coordinates, and take the pixel (x, round (y)) as the current point coordinates. As: yi+1 = kxi+1+ b = k1xi+ b+ kDx = yi+ kDx So, when Dx = 1 yi+1 = yi+ k. That is, when each increment x 1, y increases k (ie slope of the line.) According to this principle, we can write the DDA line drawing algorithm program. 2, dotted line method
To Search:
File list (Check if you may need any files):
BHcircle.cpp