Consider three different raster systems with resolutions of

Consider three different raster systems with resolutions of 640 by 400, 1280 by 1024, and 2560 by 2048. What size frame buffer (in bytes) is needed for each of these systems to store 12 bits per pixel? How many bits per pixel are needed to display 256 colors in a display system? If an image has a width of 2 inches and an height of 3 inches, what is the aspect ratio of the image? List the statements needed to set up an OpenGL display window whose position is at pixel position (200, 200) with a window width of 100 pixels and a height of 75 pixels. (Your answer should be in ease sensitive text) Consider this sequence of calls: glColor3f(0.0, 1.0, 0.0); glColor3f(1.0, 0.0, 0.0); glVertex2i(1, 1); glVertex2i(2.2, 2); What color is the vertex (1.1.1)? What color is the vertex (2, 2, 2)?

Solution

Question 1.

Frame-buffer size of the system 640 × 480 × 12 bits ÷ 8 bits per byte = 460800 byte

Frame-buffer size of the system 1280 × 1024 × 12 bits ÷ 8 bits per byte = 1966080 byte

Frame-buffer size of the system 2560 × 2048 × 12 bits ÷ 8 bits per byte = 7864320 byte

Question 2.

8 bit

[Explanation: 8-bit color (28 = 256 colors)]

Question 3.

2/3

[Explanation:The aspect ratio of an image describes the proportional relationship between its width and its height.]

Question 4.

As glutInitWindowPosition function requires an initial location for the top-left corner of the display window, so we have found out the pixel position of top-left corner and it is (200-100=100,200-75=125).


The statements are:

glutInit (&argc, argv);
glutCreateWindow (\"Window Title \");
glutInitWindowPosition(100,125);
glutInitWindowsize (100, 75);

 Consider three different raster systems with resolutions of 640 by 400, 1280 by 1024, and 2560 by 2048. What size frame buffer (in bytes) is needed for each of

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site