摘要 |
PURPOSE:To shorten the time for generating a straight line and comparing a depth value, and to improve a speed for extracting a graphic, by setting the number of straight lines which are generated in order to compare the depth value, to 1/N, and setting the number of picture elements on the straight line, to 1/M. CONSTITUTION:With regard to a triangle which is determined by the apex (x1, y1) and the bases (x2, y2) (w3, y3), when generating many segments being parallel to the base and executing painting-out processing, inclinations k1, k2 of two sides for placing the apex between them are derived by k1=(y1-y2)/(x1-x2), and k2=(y1-y3)/(x1-x3). Subsequently, DELTAy-1, h=0, x=x1, and y=y1 are set, and by (x-k1h, y-h), and (x-k2h, y-h), a straight line which is generated next to the apex is derived, and the next straight line is derived as h h+DELTAy by repeating the same processing. Also, the straight line is generated by writing a picture element in a straight line which is generated in a painting-out processing, a point (x, y) is outputted as DELTAx=1, x=x1, and y=y1, and subsequently, the same processing is repeated as x x+DELTAx. |