Courses‎ > ‎Computer Graphics‎ > ‎Dyrland-Weaver‎ > ‎Work‎ > ‎

Work 01: Because it's time, you'll make a line.

posted Feb 6, 2019, 9:22 AM by JonAlf Dyrland-Weaver
Due: Monday Morning (2/11)

You will write your own line algorithm!
  1. First decide what you will be programming in for this assignment. You can use any language you'd like, but you must write your own line algorithm (do not use any built in function that may exist for your language of choice).
  2. Code Bresenham's line algorithm!
    • Start with octant 1.
    • Add the other octants one at a time, you'll have a much easier time debugging doing that.
      • Trust me, I've done this a few times.
  3. Test your algorithm by calling your draw_line routine multiple times.
    • Don't forget to upload an image to the gallery!
Follow these guidelines in your submission
  • Upload your code to gihub
  • Upload an image to the gallery
  • Include a makefile that will create an image using your code.
    • Your code should result in displaying an image that tests all octants, including slopes of 0, 1, -1 and undefended. 
    • If you cannot run the display command, then save an image and print out the name of the image being saved.
    • This image does not need to be the same as your gallery image.
If your are using my frameworks you only need to modify the following files:
  • c
    • draw_c
    • main_c
  • python
github clone link: