Quote:I think what he means is for each edge of the polygon/triangle the interpolants are constant, so you can assign values to the two endpoints of each edge of the trinagle and interpolate between them(This is the way i've implemented this before). but he then assigns the "gradients" by taking two edges of the triangle, say A and B and calculates it from this equation: (A.width * B.height) - (B.width * A.height)
It just so happens that the increments in each linear interpolant for a single step in x or in y are constant across the whole polygon.
Quote:where dc´ is the difference of whatever value you are interpolating across the scan line, dx = (A.width * B.height) - (B.width * A.height) and dy = (B.width * A.height) - (A.width * B.height). can anyone tell me what the "gradient" value represents and why it is used?
The values dc´/dx and dc´/dy are called the gradients for the parameter; dc´/dx is the gradient with respect to x and dc´/dy is the gradient with respect to y