摘要 |
The invention relates to a method of tracing and filling in a parallelogram (ABCD), comprising a first vertex (A), a second vertex (B), a third vertex (C) and a fourth vertex (D) on a discrete grid of a graphics screen from knowledge of the coordinates of its vertices. The method according to the invention comprises a step (10) of calculating the coordinates of the points on a first segment (AB) between the first vertex (A) and the second vertex (B), a step (11) of calculating the coordinates of the points on a second segment (AC) between the first vertex (A) and the third vertex (C), a step (12) of calculating the coordinates of the points on a third segment (BD) between the second vertex (BD) and the fourth vertex D and an iterative step (20) of calculating the coordinates of the points on a segment parallel to the segment AB and included within the parallelogram ABCD. Advantageously, the steps of calculating coordinates of the points on a segment use a so- called mid-point algorithm or Bresenham's algorithm.
|