Problem
1. Implement the line-type function by modifying bresenham's line-drawing algorithm to display either solid, dashed, or dotted lines.
2. Implement the tine-type function with a midpoint line algorithm to display either solid, dashed, of dotted lines.
3. Devise a parallel method for implementing the line type function.
4. Devise a parallel method for Implementing the line-width function.
5. A line specified by two endpoints and a width can be converted to a rectangular polygon with four vertices and then displayed using a scan-line method. Develop an efficient algorithm for computing the four vertices needed to define such a rectangle using the line endpoints and line width.