



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Intro to Computer Graphics_ Vector vs Raster Displays.
Typology: Lecture notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!
In this class we are going to concern ourselves with producing images on video screens rather than onto printers, or plotters since that allows a much greater amount of interactivity.
Convenient to think of models in mathematical terms but hardware brings CG back to reality.
Text generated graphics Series of printed characters and spaces For example a simple plot of a sine function. Some density images can be generated (. versus # )
1.0 | * | * | * | * 0.5 | * | * | * | * 0.0 +---*---------- | * | * | *
Special graphics characters Uses the extended ASCII character set, 128 to 255 Special symbols mapped to extended ASCII codes.
Vector (calligraphic) displays lines drawn directly, no predefined grid commands tell the electron gun where to move and when to turn on/off
Frame buffer - array of computer memory used to store an image to be displayed
The user manipulates the values in the frame buffer. 60 times a second (or at some other fixed rate) the frame buffer is copied onto the display device.
If video screen is 512 pixels wide by 512 pixels tall the frame buffer must be able to store 512 X 512 elements ... one element for each pixel on the screen
monocrome display:
512 x 512 x 1bit (bit is either 0=off, or 1=on.) Each of the 512 x 512 pixels can be either on or off (white or black) 32768 bytes total
8 bit greyscale display:
512 x 512 x 8bit (each pixel is 8 bits deep so values 0-255 are possible.) Each of the 512 x 512 pixels can be one of 256 shades of grey (from black to white.) 262,144 bytes total
24 bit colour display:
512 x 512 x 24bit (each pixel has 8 bits for red, 8 bits for green, and 8 bits for blue.) Each pixel can be black->bright red (0-255) combined with black->bright green (0-255) combined with black->bright blue (0-255) 786,432 bytes total Each of the 512 x 512 pixels can be one of 16 million colours
note however, that a 512 x 512 display has only 262,144 pixels so only 262,144 colours can be displayed simultaneously. A 1280 x 1024 display (common workstation screen size) has only 1,310,720 pixels, far fewer than the 16,000, possible colours. ( 3.75 MB for this configuration )
8 bit colour display using a colour map:
want benefits of 24 bit colour with only 8 bit display 512 x 512 x 8bit (each pixel is 8 bits deep so values 0-255 are possible.) Each of the 512 x 512 pixels can be one of 256 index values into a video lookup table. video lookup table has 256 24bit RGB values where each value has 8 bits for red, 8 bits for green, and 8 bits for blue. 16 million colours are possible, but only 256 of them can be displayed at the same time. Memory needs are 512x512x1byte plus 256x3bytes = 262,912 bytes, much less than the 786,432 needed without the colour map.
Here are 2 sample colourmaps each with 256 24bit RGB values:
depth of frame buffer (e.g. 8 bit) determines number of simultaneous colours possible width of colour map (e.g. 24 bit) determines number of colours that can be chosen from
Size of various frame buffers:
screen size Monocrome 8-bit 24-bit 512 X 512 32K 256K 768K 640 X 480 38K 300K 900K 1280 X 1024 160K 1.3M 3.8M
A program may take several minutes, hours, or days to render a single image. These images can then be stored and played back or recorded to create animation
A more interesting situation is when the animation is live with the computer generated image changing while the user watches, or as the user interacts with the computer.
To do the more interactive kind of animation you really need a SECOND frame buffer ... this is similar to how a motion picture works.
One of the most obvious implications of this is that a very small change in the time it takes to draw a scene into the frame buffer can have a major impact on the speed of the application.
Can your program run at 45 frames per second (fps)? Yes. if 30 frames take 1/60th each and the next 15 frames take 1/30th each you will display 45 frames per second.
For smooth motion you want at least 10 frames per second, and preferably more than 15 frames per second. More is better.