Description
Basic 2d Shapes
Implement the following 2d algorithms using HTML Canvas/Javascript. You cannot use direct
Canvas primitives—assume you can draw a single point and develop these algorithms.
• DDALine
• MidpointLine – handle all slopes
• MidpointCircle
• MidpointEllipse
There should be buttons to select the algorithm/shape.
There should be text boxes to accept (x1, y1) and (x2, y2) for line; and (x,y) and r for circle
Handle all slopes/quadrants—supplied code does not
Draw the same shapes using Canvas primitives and compare if they are identical or not; analyze and
write in your report.
Sample code may be found at
http://www.cs.uml.edu/~kseethar/Spring2020/programs/p5/
Deliverables
• Source files
• Sample Input/output
• 1 page report : Write about issues faced, lessons learned, any remaining bugs etc.
Extra Credit
• any other functionality …. – please document in report and code.
Deadline and Late Submissions
• The assignment is due on the date specified above at 11:59:59 PM
• Each day late will incur a penalty of 5% of the grade for the assignment; for example, if the
assignment is 3 days late, the maximum grade will be 85 out of 100—15 will be subtracted
from whatever grade is assigned.