Exam Questions Flashcards

1
Q

Question 1. (a) Describe the specular and diffuse types of reflection.

A

Diffuse

  • Light reflected from a diffuse surface is scattered in all directions.
  • Diffuse surface looks the same from all directions.
  • Lambert’s cosine law: diffuse surface has the same perceived luminance from any angle.
       Specular:
  • direct reflection of light by a surface
  • most light is reflected in a very narrow range of angles
  • for a perfect mirror the angle of reflection = the angle of incidence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Question 1 (b) Explain why display devices can reproduce the impression of a full rainbow sectrum using only red, green and blue light.

A
  • Colour of a pixel is usually recorded as 3 values. R,G,B.
  • Mixing these three primary lights is sufficient to give a percieved full rainbow spectrum.
  • This is additive colour mixing.
  • Each component is 8bits from 0 being black to 255 white making the full colour spectrum 24bit.
  • 256 possible levels to display the colours.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Question 1 (c) Describe the difference between local and global illumination.

A

Local illumination:

  • Light that goes directly from the light source is reflected from the surface.
  • The shading of any surface is independent of the shading of any other surface.
  • It is simply the light that goes from the light source to the surface.

Global illumination:

  • Adds to the local modal the light that is reflected from other surfaces around it.
  • More realistic than local, modes how light reacts in the real world.
  • An illumination model in which all objects are considered as potential sources of illumination for all other objects in the scene.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Question 1 (c) Explain advantages and disadvantages of local verses global illumination

A

Local Illumination:

  • Most real time graphics rendering sustems will use local illumination as it is quicker at rendering than global.
  • Local is not physically accurate.
  • Relies on a constant ambient value to represent the interreflection of a scene.

Global Illuminaton:

  • Take into account direct and indirect light illumination.
  • No need for an ambient value.
  • We get realistic physical effects like colour bleeding caustics
  • Computationaly expensive.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Question 1 (d) In scanline fill the algorithm moves across a scanline and performs a check to determine if each pixel is inside or outside the polygon.

Explain the procedure with reference to the diagram below.

A
  • The polygon is filled by scanning accross each row and colouring any pixels if they lie within it.
  • Remove any horizontal edges from the polygon.
  • Find max and min y values of all polygon edges.
  • Create a list of the scan lines that intersect the polygon.
  • List the pixels where the intersection is in asending order along x. p0, p1, p2, p3
  • Fill by point pairs eg. (p0,p1) (p2, p3)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Question 1 (d) ii In scanline fill the algorithm moves across a scanline and performs a check to determine if each pixel is inside or outside the polygon.

  • How does the alogrithm handle a case such as that illustrated in the diagram below where the intersection is an edge endpoint?
A
  • We can still fill this pair wise. (p0, p1) and (p1, p2)
  • e1 and e2 share p1 which works fine for the algorithm.
  • Computing the intersection of the scan line with e1 and e2 seperately we get p1 twice.
  • If the intersection is the y.min edges end point it is counted otherwise it is not.
  • In this case edge e1 and e2 are used as their y.min is on the intersection.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Question 2 (a)

Explain the following computer graphics term:

i. pixel

A
  • A pixel or pel (picture element) it is the smallest controllable element of a picture represented on the screen.
  • Each pixel has a specific x, y position in a rastor image.
  • Each pixel has an intesity level of colour.
  • Each pixel can be associated with other information such as z depth.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Question 2 (a) Explain the following computer graphics term:

ii. graphics pipeline

A
  • The graphics pipeline refers to the sequence of steps used to create a 2D raster representation of a 3D scene.
  • A scene is created out of geometric primitives. Triangles are the norm.
  • There are important stages the graphics pipeline goes through, vertex processing, clipping and primitive assembly, rasterization and fragment processing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Question 2 (a) Explain the following computer graphics term:

iii. wireframe

A
  • A wireframe is a visual representation of a 3D or physical object showing only the edges of polygons or other primitves.
  • Interior area is not displayed.
  • Objects are projected onto the computer screen by drawing lines at the location of each edge.
  • Simple and fast to calculate.
  • Using a wire frame model allows visualization of the underlying design structure of a 3D model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Question 2 (a) Explain the following computer graphics term:

iv. Rasterisation

A
  • The technique of mapping scene geometry to pixels.
  • A 3D scene described as polygons is rendered as discrete 2D primitives.
  • Rasterisation is currently the most popular technique for producing real-time 3D computer graphics and is used on all graphics cards.
  • Rasterization does not prescribe a particular way to compute the color of pixels.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Question 2 (b) Describe, using a diagram where appropriate, an algorithm that draws a straight line between screen co-ordinates (x0, y0) and (x1, y1) using only integer arithmetic. assume that the line is in the first octant.

A

The Bresenham line algorithm!

  • Draw the pixel at (x, y) making sure it’s the closest pixel to the point that belongs on the line.
  • (Pixels are not points so we have to find the one that is closest to the point.)
  • Move across the x-axis and decide at each step what will be the next point on the y-axis to draw.
  • 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).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Question 2 (c) The Cohen-Sutherland line clipping algorithm uses 4-bit codes to determine whether endpoints lie inside or outside the window. For the line shown in the diagram below, explain how the algorithm evaluates where clipping should occur.

A
  1. Need to work out the intersection points. Only need to consider the end points of each bit. If both endpoints lie inside the clipped rectangle then entire line is inside and is kept with no clipping required. If one lies inside and one outside the window we need to compute intersection point. The sequence for reading the codes’ bits is LRBT (Left, Right, Bottom, Top). There are two intersection points.
  2. Once the bit codes are found need to do a logical AND to determine if the line is completely outside the window. If the point is not 0 it can be trivially rejected. A logical OR will determine if a line is completly inside the window if 0 it is trivailly accepted.
  3. This is a divide and conqier algorithm. Line (A,D) is rejected as though AND is 0000 the OR is 1001 meaning it has to be trivially rejected. The algorithm now recalulates at the intersection giving line (A,C) also rejected as OR is 0001. Next intersection is line (A,B) which is accepted as AND is 0000 and OR is 0000.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Question 3 (a) Why is Phong shading more computationally expensive than Gouraud shading?

A
  • Goroud shading computes the colours at each vertex of a polygon and interpolates those colours across the polygon.
  • Phong shading liniarly interpolates a normal vector accross the surface of a polygon from the polygons vertex normals.
  • The surface normal is interpolated and normalised at each pixel and is used to attain the final pixel colour.
  • Phong shading computes reflections at each pixel rather than at each vertex like Gouraud shading does making it musch more computatonally expensive.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Question 3 (b) Describe the technique of bump mapping.

A
  • Bump mapping is like texture mapping. It adds what appears to have surface variations.
  • Bump mapping evaluates the current light intensity and adds fake depth by modifying the surface normals. NOT THE GEOMETRY.
  • The surface of a 2D texture is flat and teh surface normals go straight up.
  • Bump mapping changes the brightness of the pixels on the surface in respose to the hight map that is specified for the surface.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Question 3 (c) i Explain the concept of raytracing.

A
  • A ray of light is traced for every pixel starting from what the eye or camera sees working backwards through the scene.
  • The ray is tested for intersection with every object in the scene calculating either reflection, refraction or obsorbtion.
  • If an object is hit a ray is projected from the interseaction point towards the light source.
  • If object is reflected a secondary ray is projected from the intersection point.
  • If an object is trasparant a ray is projected along the angle of refraction.
  • If any of the scondary rays hit objects then tertiary rays are generated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Question 3 (c) ii Describe the advantages of using ray tracing to render a scene.

A

3 Advantages?

  • Raytracing is the most complete simulation of the illumintation reflection model in computer graphics that we have.
  • It can handle indirect light very well.
  • It combines hidden surface removal with shading due to direct illumination, shading due to global illumination and shadow computation all in a single model.
17
Q

Question 3 (d) i Give an overview of radiosity.

A
  • Radiosity is a global illumination algorithm used in 3D computer graphics rendering.
  • Radiosity calculations are viewpoint independent which increases the computations involved, but makes them useful for all viewpoints.
  • As the algorithm iterates, light can be seen to flow into the scene, as multiple bounces are computed.
  • The main idea of the method is to store illumination values on the surfaces of the objects.
  • The surfaces of the scene to be rendered are each divided up into one or more smaller surfaces (patches).
  • The radiosity for each patch is calculated.
18
Q

Question 3 (d)

ii. What are the advantages of radiosity over ray tracing?

A
  • Radiosity enables calculation of the overall light propogation within a scene- something that would be very time consuming with ray tracing.
  • Radiocity is viewpoint independant unlike raytracing. It does not matter where one views the scene from.
  • Radiocity is fast and efficient. Very good for indoor scenes where most lighting would is indirect where raytracing can be inadequate.
19
Q

Question: Transforms, projections and rasterisation.

a) What is the difference between orthographic projection and perspective projection?

A

Orthographic projection: is an example of parralel projection.

It is used for mainly 2D gaming or blue print plans as parralel lines are kept which can be useful.

There is no persepctive. All objects appear the same size however far they are from the camera.

If distance to the center of projection (COP) is finite then: perspective

If distance is infinite: Parallel

**Perspective projection: **

Is more realisitic with converging viewpoints. Models the way we perceive the real world.

• Characterized by diminution of size of more distant objects

20
Q

Question: Transforms, projections and rasterisation.

b) Giving an example, explain why orthographic projection might be useful in practice. [2 marks]

A

Orthographic projection can be useful for CAD(computer aoded design) where modeling requires an acurate distance measure to be shown regardless of position.

21
Q

Question: Textures

a) Describe the co-ordinate systems required to perform texture mapping? [6 marks]

A

Texture mapping also known as image mapping.

Any image can be used as the source for an image map.

Allows for greater control ober the appearance of a texture.

To attach the texture map onto an object we need to use coordinate systems to help position the different pixel data.