posted Feb 9, 2017, 11:14 AM by JonAlf Dyrland-Weaver
updated Feb 15, 2017, 7:47 AM
DUE: 8am Thursday 2/16
You will write your own line algorithm!
- 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).
Code Bresenham's line algorithm!
- I have provided frameworks for both c and python, these can be found here: https://github.com/mks66/dwsource
- In order to save an image in a non ppm format, or display the image, you must have imagemagick installed
Test your algorithm by calling your draw line routine multiple times.Don't forget to upload an image to the gallery.
- Start with octant 1.
- Add the other octants one at a time, you'll have a much easier time debugging doing that.
Follow these guidelines in your submission
- Upload your code to gihub
- Upload an image to the gallery
- Include a makefile with a “make run” target
- The make run target should run your code (compile if necessary)
- Your code should result in displaying an image that tests all octants, including 0, 1, -1 and undefended slopes. If you cannot run the display command, then save an image and print out the name of the image being saved.
- This image may not be the same as your gallery image, that is ok.
If your are using my frameworks you only need to modify the following files:
github clone link: