computer graphics assignment 1

7
Assignment #1 Computer Graphics Kumar Abhishek RB1805A06 10812622

Upload: binzidd007

Post on 24-Nov-2014

114 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Computer Graphics Assignment 1

Assignment #1Computer Graphics

Kumar AbhishekRB1805A0610812622

Page 2: Computer Graphics Assignment 1

Question 1 Contrast the implementation of Display File/Frame Buffer for a Random Scan System & Raster Scan System. Which type of system shall offer more consistent refresh rate and why?

Answer

In Raster Scan System, Frame Buffer is a special memory location which holds the picture definition.

This memory area holds the set of intensity values for all the screen points.

In Random Scan System, Frame Buffer is a special memory location which holds the picture definition but the difference is that it holds the definition as a set of line drawing commands. When an image is to be drawn system scans all the commands and draw each line in return.

I think that Random Scan has a better refresh rate because in the raster scan refresh rate depends on the number of the lines to be displayed while in the case of raster display whole screen has to be refreshed.

Question 2 As you have to scan-convert the line joining the points using DDA Algorithm

a) (12,27) and (22, 44)

b) (15,26) and (26, 35)

Answer

a)

K

(Xints1,Yk+1)

0 (12,27)

1 (13,28)

2 (13,29)

3 (14,30)

4 (14,31)

Page 3: Computer Graphics Assignment 1

5 (15,32)

6 (16,33)

7 (16,34)

8 (17,35)

9 (17,36)

10 (18,37)

11 (18,38)

12 (19,39)

13 (20,40)

14 (20,41)

15 (21,42)

16 (21,43)

17 (22,44)

b)

0 (16,27)

1 (17,28)

2 (18,28)

3 (19,29)

4 (20,30)

5 (21,31)

6 (22,32)

Page 4: Computer Graphics Assignment 1

7 (23,33)

8 (24,33)

9 (25,34)

10 (26,35)

Question 3 Determine the most appropriate pixels that will be plotted when Bresenham’s algorithm is used to draw a line joining the points (10,22) and (20,30)

Answer

∆x= 20-10=10

∆y=30-22=8

Po = 2∆y - ∆x

= 6

2∆y= 16, 2∆y-2∆x = -4

k

K

Pk (Xk+1,Yk+1)

0 6 (11,23)

1 2 (12,24)

2 -2 (13,24)

3 14 (14,25)

4 10 (15,26)

5 6 (16,27)

6 2 (17,28)

Page 5: Computer Graphics Assignment 1

7 -2 (18,28)

8 14 (19,29)

9 10 (20,30)

Question 4 Use Mid-Point algorithm to scan-convert a circle with radius 10 pixels centred at (25, 50).

Answer

K Pk (Xk+1,Yk+1) (Xk+1,Yk+1)0 -9 1,10 26,601 -6 2,10 27,602 -1 3,10 28,603 6 4,9 29,594 -3 5,9 30,595 8 6,8 31,586 5 7,7 32,57

Question 5 Explain how virtual reality systems can be used in design applications? What are some other applications for virtual reality systems?

Answer

Virtual reality systems can be used in design applications. Virtual reality (VR) is a term that applies to computer-simulated environments that can simulate physical presence in places in the real world, as well as in imaginary worlds.

In Design Applications where we need to design stuff, with the help of virtual reality we can simulate that particular stuff and can experience how it will function when it is made in real.

For example- If we are to build a bridge over a river, we can draw a map. But that would be the thing of past. Now what we can do is, we can simulate the bridge through various softwares and can actually see the bridge will look when it is made with bricks and cement.

Applications of Virtual Reality Systems:

1. Urban Design2. Manufacturing3. Space Administration4. Surgery5. Psychiatry Treatment

Page 6: Computer Graphics Assignment 1

6. Gaming

Question 6 Suppose a system with 8 inches by 10 inches video monitor that can display 100 pixels per inch. If memory is organized as one byte words, the starting frame buffer address is 0 and each pixel is assigned one byte of storage in memory, what is the frame buffer address of pixel with screen coordinates (x,y) ? Also, determine the total amount of memory consumed by the frame buffer.

Answer

Total area covered by the screen = 8*10= 80 square inch

No. of pixels per inch=100

Total number of pixels=100*80=8000

Each pixel is assigned 1 byte of storage.

Total memory consumed by frame buffer= 8000*1 byte= 8000 byte

Screen coordinates with x,y will have area =xy square inch and 100 xy pixels and 100 xy pixels will take 100 xy byte memory.

Now memory is stored as one byte word and starting frame address is 0 so frame address will be 100xy.