/******************************************************************* Template for your Line Drawing Function ******************************************************************** Author: Stan Sclaroff Comments: Template for your function that draws a line (of any slope) based on the DDA algorithm. Provided for CS480/CS680 programming assignment #1. ********************************************************************/ #include #include "types.h" #include "funcs.h" #define ROUND(A) ((int) ((A)+0.5)) void drawLine(Vertex v0, Vertex v1) { /* the following two lines are meant as a demo to show endpoints */ /* should be removed once you write your DDA line algorithm here */ /* Be sure to implement smooth vertex color interpolation */ setPixel(ROUND(v0.x), ROUND(v0.y), v0.color); setPixel(ROUND(v1.x), ROUND(v1.y), v1.color); }