Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. plotLine(x0,y0, x1,y1)
  2. dx = x1 - x0
  3. dy = y1 - y0
  4. D = 2*dy - dx
  5. y = y0
  6.  
  7. for x from x0 to x1
  8. plot(x,y)
  9. if D > 0
  10. y = y + 1
  11. D = D - 2*dx
  12. end if
  13. D = D + 2*dy
  14.  
  15. P1 = (10, 120) and P2 = (18, 117)
  16.  
  17. ePlot the following points:
  18. 10, 120
  19. 11, 120
  20. 12, 120
  21. 13, 120
  22. 14, 120
  23. 15, 120
  24. 16, 120
  25. 17, 120
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement