Lect 1 Raster Displays and Algorithms Flashcards
- What areas are included in computer graphics?
Graphics areas include:
- modelling, rendering, animation, user interaction, virtual and augmented reality, visualisation, (some) image processing, 3D scanning.
• Major applications include:
- games, cartoons, special effects, CAD/CAM, simulation, medical imaging, information visualization.
- Name the 6 major elements to a graphics system.
1. Input devices (mouse etc)
**2. Central Processing Unit (CPU) **
**3. Graphics Processing Unit (GPU) **
4. Memory
5. Frame buffer (Writes to the screen)
6. Output devices (Screen)
- Describe the graphics pipline. What are the 5 key stages?
**1. 3D MODEL: **Start off with 3D model
2 Model View Transformation:
- Map from the WCS(World coordinate system) to the CCS(Camera Coordinate System)
- Culling and lighting
3 Projection:
- Map from CCS to Screen CS
- Clipping(Clip any fragments not in view)
- Persp. division
4 Rasterization:
- colour
- Visibility
5: Display:
- Framebuffer Display

- What are 3D geometric models?
- These models describe 3D objects using mathematical primitives, e.g. spheres, cubes, cones and polygons.
- The most common type is a triangle mesh composed of triangles with shared vertices.

- Explain what transforms are.
- Transforms refers to the task of converting 3D spatial coordinates to a 2D view for rendering.
- 3 basic tranforms. Translate, rotate and scale.
- Work on whole objects rather than individual vertices.
- Transforms are represented as matrices.
- They set up coordinate systems.
- Describe the WCS.
World Coordinate System (WCS) - Also known as the universe or global or sometimes model coordinate system.
This is the base reference system for the overall model, ( generally in 3D ), to which all other model coordinates relate.
- A coordinate system is an origin and also the direction of the axes
- We need coordinate systems for vectors and transforms to make sense
- What is an Object Coordinate System?
An object in a scene needs to have a point of origin and an orientation set by the x,y,z axes.
Vertices defined relative to the specific object (in local coordinate space)
The object position changes relative to the world, so its vertices should follow
Sometimes objects in a scene are arranged in a hierarchy, so that the “position” of one object in the hierarchy is relative to its parent in the hierarchy scheme, rather than to the world coordinate system.
E.g., a hand may be positioned relative to an arm, and the arm relative to the torso.
This allows for grouped transformations
- Desrcribe the Viewpoint Coordinate System.
- Also known as the camera coordinate system.
- This coordinate system is based upon the viewpoint of the observer, and changes as they change their view.
- Moving an object “forward” in this coordinate system moves it along the direction that the viewer happens to be looking at the time.
- What is a screen coordinate system?
• This 2D coordinate system refers to the physical coordinates of the pixels on the computer screen, based on current screen resolution.
( E.g. 1024x768 )
- Describe a raster display.
- The basic rendering procedure is a list of polygons and vertices that produces an image of the object they represent.
- This image is an array, or raster, of picture elements (pixels).
- The raster is organised into rows and each row holds a number of pixels.
- The quality of an image is related to the accuracy of the pixel colour value and the number of pixels in the raster.
- How do you reference a Pixel?
• Displays usually index pixels in an ordered pair (x, y) indicating the row and column number of the pixels.
- If a display has nx and ny rows of pixels, the bottom left pixel is (0,0) and the top-right is (nx-1, ny -1).
- (In some cases the top left pixel has the coordinates (0,0) as it is the convention for television transmission.)
- Describe RGB colour?
- The colour of a pixel is usually recorded as three values: red, green and blue (RGB).
- Mixing these three primary lights is sufficient to give the impression that a full rainbow spectrum is reproducible.
- This is additive colour mixing (it differs from the more familiar subtractive colour mixing for paints where red, yellow and blue are the primaries).
- Describe the RGB colour Model.
- A colour in the RGB colour model is described by indicating how much of each of the red, green, and blue is included.
- The colour is expressed as an RGB triplet (r,g,b), each component of which can vary from zero to a defined maximum value.
- If all the components are at zero the result is black; if all are at maximum, the result is the brightest representable white.
- Human cones from the eye roughly corespond with the RGB colour model.
- Give examples of RGB colour mixing.
red(1,0,0)+green(0,1,0) =yellow(1,1,0)
green (0, 1, 0) + blue (0, 0, 1) = cyan (0, 1, 1)
blue (0, 0, 1) + red (1, 0, 0) = magenta (1, 0, 1)
red(1,0,0)+green(0,1,0)+blue(0,0,1) =white(1,1,1)

- Explain 24 bit colour.
- Actual RGB levels are specified with an integer for each component.
- This is most commonly a one byte integer, so each of the three RGB components is an integer between 0 and 255.
- The three integers together take up three bytes, which is 24 bits, thus a system with 24 bit colour has 256 possible levels for each of the three primary colours.
- Describe the Rasterization process.
- Converting 3D information for display on a 2D screen involves a process known as rasterization.
- Rasterization algorithms takes a 3D scene, described as polygons/mesh/wireframe, and renders it as discrete 2D primitives.
- Describe how lines are drawn to screen.
- Line drawing involves taking two endpoints in screen co-ordinates and drawing a line between them.
- For general screen co-ordinates (x0 , y0) and (x1 , y1) the algorithm should draw a set of pixels that approximates a line between them.
- Need to use algorithms to work out the nearest pixels to a uniform line.

- Name 2 line drawing algorithms.
- Commonly used procedures are the Bresenham algorithm and the midpoint algorithm (these differ slightly in their methods but produce the same lines).
- Line drawing needs to be fast and as simple as possible, giving a continuous appearance.
- Describe the **Bresenham Algorithm. **
- The algorithm works incrementally from a starting point (x0 , y0) and the first step is to identify in which one of 8 octants the direction of the end point lies.
- The line is drawn by stepping one horizontal pixel at a time from x0 to x1 and at each step making the decision whether or not to step +1 pixel in the y direction.
- Scaled to work with integers making it very fast.

- What is the decision we need to make when looking at Bresenhams algorithm?
- Since the point on the line may not be in the centre of the pixel we must find the second best point - the one where the distance from the line is the smallest possible.
- Decision: do we draw (x+1, y) or do we draw (x+1, y+1)?
- d1 is smaller than d2 so the next point after (x, y) that should be drawn is (x+1, y+1).

- Describe the **Midpoint circle **algorithm.
- The algorithm starts with the circle equation x² + y² = r².
- The midpoint circle algorithm is an algorithm used to determine the points needed for drawing a circle.
- More computationaly expensive than a simple line.
- We can work out one octant and then reflect this to give 1/4 circle and carry on using this simple reflection method to acheive a full circle.

- How is a wireframe made more realistic?
- When you want to make a wireframe more realistic you need to take away the edges you cannot see, i.e. you need to make use of hidden line and hidden surface algorithms.
- The facets in a model determine what is and what is not visible.
- Describe Hidden Surface Drawing.
- In a wireframe drawing, all the edges of the polygons making up the model are drawn.
- A hidden surface drawing procedure attempts to colour in the drawing so that joins between polygons and polygons that are out of sight (hidden by others) are not shown.
- E.g. if you look at a solid cube you can only see three of its facets at any one time, or from any one viewpoint.
- To construct a hidden surface view, each polygon is projected onto the viewing plane. Instead of drawing the edges, pixels lying inside the boundary formed by the projected edges of a polygon are given an appropriate colour.
- This is not a trivial task. Any procedure to implement the filling task must be very efficient.
- Describe recursive seed fill.
- Simple but slow.
- A pixel lying within the region to be filled is taken as a seed, set to record the chosen colour.
- The seed’s nearest neighbours are found and, with each in turn, this procedure is carried out recursively.
- The process continues until the boundary is reached.









