This document describes an algorithm for drawing a line between two points (x0,y0) and (x1,y1) by incrementally increasing the x and y coordinates based on the relative difference between the x and y distances. It calculates the number of steps needed based on the larger of the absolute x or y distance, then increments the x and y coordinates by the respective xinc and yinc amounts in a for loop to plot the points along the line.
This document describes an algorithm for drawing a line between two points (x0,y0) and (x1,y1) by incrementally increasing the x and y coordinates based on the relative difference between the x and y distances. It calculates the number of steps needed based on the larger of the absolute x or y distance, then increments the x and y coordinates by the respective xinc and yinc amounts in a for loop to plot the points along the line.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document describes an algorithm for drawing a line between two points (x0,y0) and (x1,y1) by incrementally increasing the x and y coordinates based on the relative difference between the x and y distances. It calculates the number of steps needed based on the larger of the absolute x or y distance, then increments the x and y coordinates by the respective xinc and yinc amounts in a for loop to plot the points along the line.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd