graphics.digital_differential_analyzer_line¶
Attributes¶
Functions¶
|
Draws a line between two points using the DDA algorithm. |
Module Contents¶
- graphics.digital_differential_analyzer_line.digital_differential_analyzer_line(p1: tuple[int, int], p2: tuple[int, int]) list[tuple[int, int]] ¶
Draws a line between two points using the DDA algorithm.
Args: - p1: Coordinates of the starting point. - p2: Coordinates of the ending point. Returns: - List of coordinate points that form the line.
>>> digital_differential_analyzer_line((1, 1), (4, 4)) [(2, 2), (3, 3), (4, 4)]
- graphics.digital_differential_analyzer_line.x1¶