A common method for visualizing a function of two variables is to cons
ider it as a nontransparent grid surface in 3-D space and to project i
t onto a view plane. Various computer algorithms exist which map such
surfaces onto a screen. Each of these conventional techniques has its
own disadvantage: either the graphical results are not very accurate,
because the algorithm approximates the surface by a polygon mesh consi
sting of quadrilaterals or, indeed, the algorithm produces sufficientl
y true images of the grid curves, but is restricted to special viewing
conditions. This paper gives details and a pseudocode of a new, unive
rsal line-drawing algorithm which yields correct images of grid surfac
es conserving their geometrical properties such as smoothness or disco
ntinuities. The functions to be represented may be continuous or piece
wise continuous. Almost any position of the surface in relation to the
viewer's eye and in relation to the view plane can be chosen and any
parallel or perspective projection can be applied. (C) 1996 Elsevier S
cience Ltd