You are writing a code for a new graphics card which is software programmable, instead of having the algorithms embedded in the hardware. You wish to prepare a fast triangle-drawing program to test the card.
problem 1: Give pseudo code, or similar, which draws a triangle with a constant color. Suppose that the inputs are the color of the triangle and three two-dimensional points, representing the three vertices of triangle. Further, suppose that all the three vertices lie on the visible screen and that no anti-aliasing is needed. You might suppose that there is a function to set a pixel, (x; y), to a particular color, c, ex: setpixel(x, y, c), however you must give pseudo code for any other functions which you require. Your answer must be adequately detailed that it could be transferred directly into a language like Java however your answer does not, itself, have to be syntactically right.
problem 2: Outline the additional steps needed to draw a triangle specified by three-dimensional points in world space, where the triangle might extend beyond the edges of the screen after the conversion to screen space.
problem 3: Outline the steps needed to compute the triangle's color, supposing diffuse shading, with multiple point lights, however still producing a single color for the entire triangle.