Courses‎ > ‎Computer Graphics‎ > ‎Konstantinovich‎ > ‎

2019-02-06 01Line

posted Feb 6, 2019, 10:04 AM by Konstantinovich Samuel   [ updated Feb 28, 2019, 6:06 AM ]
Due: Monday Morning (2/11)

Make a repo github:
mks66-line

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 undefined
    • 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
    • draw.py
    • main.py

Comments