11. Given that a simple graphics display has pixels coordinate (8,12) set to ON and that the computer converts coordinates to memory addresses using the formula:

location = (((Ysize - y)* Xsize) + x).Given that Xsize=20 columns and Ysize=15 rows, calculate the memory location for the above coordinate.4 mks

12.State three line drawing algorithms and explain what each algorithm is best suited to render.

11. Substituting the given values into the formula:

location = (((15 - 12) * 20) + 8)
location = ((3 * 20) + 8)
location = (60 + 8)
location = 68

Therefore, the memory location for the coordinate (8,12) is 68.

12. Three line drawing algorithms are:

1. Digital Differential Analyzer (DDA) Algorithm: This algorithm calculates the incremental changes in x and y coordinates to draw a line. It is best suited for scenarios where the line has a small number of steps and the endpoints of the line are known.

2. Bresenham's Line Algorithm: This algorithm determines the closest pixels to the ideal line path using an efficient integer-based approach. It is best suited for scenarios where endpoints are known, and the line will be drawn on a raster graphics display or in printing.

3. Midpoint Line Algorithm: This algorithm uses a midpoint technique to determine the pixels closest to the actual line path. It is best suited for scenarios where rounding errors need to be minimized, and the line should be drawn on a raster graphics display or in printing.

Each of these algorithms has its advantages and disadvantages, and the choice of algorithm depends on the specific requirements of the application.

11. To calculate the memory location for the coordinate (8,12), we can use the given formula:

location = (((Ysize - y)* Xsize) + x)

Given that Xsize = 20 columns and Ysize = 15 rows, and coordinate (8,12), the calculation would be:
location = (((15 - 12) * 20) + 8)
= (((3) * 20) + 8)
= (60 + 8)
= 68

Therefore, the memory location for the coordinate (8,12) is 68.

12. Three commonly used line drawing algorithms are:
1. Bresenham's Line Algorithm: This algorithm is best suited for rendering lines on raster displays. It is efficient and uses integer operations to determine which pixels to turn on or off to draw a line between two points. Bresenham's algorithm can handle lines with any slope, including fractional slopes.
2. Digital Differential Analyzer (DDA) Algorithm: The DDA algorithm is commonly used for line rendering on computer graphics displays. It works by incrementing either the x-coordinate or y-coordinate (whichever has the greatest change) and calculating the corresponding y-coordinate or x-coordinate based on the line equation. DDA algorithm is simple and easy to implement.
3. Xiaolin Wu's Line Algorithm: This algorithm is suitable for rendering anti-aliased lines. It makes use of sub-pixel precision to achieve smoother and more visually appealing lines. Xiaolin Wu's algorithm adds shades of grey to the pixels near the line edges to create a smoother transition between the line and the background.

Each of these line drawing algorithms has its own advantages and suitability for different situations, but all aim to efficiently and accurately render lines on a graphics display.