? i
produces a random value between 1 and i.
procedure main() WOpen("size=500,500") every 1 to 1000 do { x := ?500 y := ?500 x2 := x + ?(500 - x) y2 := y + ?(x2 - x) DrawLine(x, y, x2, y2) } endTranslate the code to C / UIGUI using rand() (Kelley/Hill p. 55). Compare the times running your program using DrawLine (built-in), DrawLine0 (y=mx+b) from the lecture notes, and DrawLine1 (the Bresenham/midpoint algorithm).