Yes it is recursive, it is an algorithm for gouraud shading to calculate the intensity of a colour (i_a) on a line given the y coordinate of both points on the line (y_1 & y_2), the intensity at both these points (i_1 & i_2) and the current scanline (y_s).
The reason I believe it is not working is that the output should logically be a value between i_1 and i_2 however putting a print statement after the algorithm displays that even if the values are:
Code:
i_1 = 200 and i_1 = 255
The result is still i_a = 871
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.