 | Let f(x) be a real-valued function
that is defined in the interval of [x0, x1) and which holds
y0 f(x) y1 x [x0, x1).
|
 | The selected rectangular area specified by x0,
x1, y0, and y1 can be mapped linearly to
a two-dimensional array (called canvas) of characters.
The larger the array, the smaller the granularity.
|
 | To graph the function, we can evaluate it at those
values of x that correspond to the individual columns
of the canvas and store some character (other than space)
at the row of the column that corresponds to y = f(x).
|
 | Finally, we can output the canvas by printing the first
row on the first line, the second row on the second line etc.
|