Digital differential analyzer (graphics algorithm): Difference between revisions

Content deleted Content added
Undid revision 705895114 by 14.139.234.50 (talk)
Line 3:
In [[computer graphics]], a '''[[digital differential analyzer]]''' ('''DDA''') is hardware or software used for [[linear interpolation]] of [[Variable (computer science)|variables]] over an [[Interval (mathematics)|interval]] between start and end point. DDAs are used for [[rasterization]] of lines, triangles and polygons. In its simplest implementation, the DDA algorithm interpolates values in interval by computing for each x<sub>i</sub> the equations x<sub>i</sub> = x<sub>i−1</sub>+1/m, y<sub>i</sub> = y<sub>i−1</sub> + m, where Δx = x<sub>end</sub> − x<sub>start</sub> and Δy = y<sub>end</sub> − y<sub>start</sub> and m = Δy/Δx
 
ص== Performance ==
 
The DDA method can be implemented using [[floating-point]] or [[integer]] arithmetic. The native floating-point implementation requires one addition and one rounding operation per interpolated value (e.g. coordinate x, y, depth, color component etc.) and output result. This process is only efficient when an [[Floating-point unit|FPU]] with fast add and rounding operation will be available.