摘要 |
In a method for displaying a three-dimensional object, a pixel value matrix and a projection depth matrix are created, coordinates of the object are read according to a B-spline curve, and a triangle mesh model is created according to the coordinates. A triangle is selected from the triangle mesh model one by one, so as to obtain coordinates of vertexes of the selected triangle, convert the coordinates of the vertexes to two-dimensional, and generate a figure according to the two-dimensional coordinates. A projection depth of the selected triangle is computed and colors of the selected triangle are added to the figure if the computed projection depth is less than a corresponding projection depth recorded in the projection depth matrix. The pixel value matrix and the projection depth matrix are updated and a two-dimension image formed by elements of two matrixes is outputted onto a display screen.
|