Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plotLine(x0,y0, x1,y1)
- dx = x1 - x0
- dy = y1 - y0
- D = 2*dy - dx
- y = y0
- for x from x0 to x1
- plot(x,y)
- if D > 0
- y = y + 1
- D = D - 2*dx
- end if
- D = D + 2*dy
- P1 = (10, 120) and P2 = (18, 117)
- ePlot the following points:
- 10, 120
- 11, 120
- 12, 120
- 13, 120
- 14, 120
- 15, 120
- 16, 120
- 17, 120
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement