Question 1
Suppose we are determining the intensity of the pixel above (The pixel is shown by the dotted line box) with a value between 0 and 1. What value will the pixel have if sampling is performed by:
1/16 1/16 1/16 1/16 1/2 1/16 1/16 1/16 1/161/16 + 1/16 = 1/8
Question 2:
The image below shows an eye ray from the camera hitting a glass sphere.
Draw the reflected and transmitted rays. Use Snell's law to compute refraction angles, assuming the speed of light in the sphere is 50% of the speed in air.
The transmitted ray will branch again as it exits the sphere. The angle of incoming ray t1 to the normal n2 also happens to be 12.9 degrees (due to the symmetry of the circle) so the angle of the outgoing transmitted ray t2 is 26.6 degrees to n2.
There is also an internally reflected ray r2.
Question 3:
We can rearrange the terms in Snell's Law to get:
What happens when this value is greater than one? Under what circumstances will this occur?
This is a case of total internal reflection. All the light is reflected internally and none is transmitted. Note that it can only occur when moving from a slow medium to a faster one (eg, from water to air).In case you are interested, the general formulae for the amount of light reflected vs transmitted is the Fresnel equation . It depends on the polarisation of the light source. A simpler approximation is Schlick's Approximation .
Question 4:
Consider a cloud represented as the array of densities below:
The cloud has uniform colour C(x,y) = (1,1,1) and transparency alpha(x,y) equal to the density values above. The sky behind the cloud is blue C = (0,0,1).
Suppose we are looking up at the cloud from below. Assume the cloud is far enough away that we can render it with an orthographic camera (parallel rays) with little distortion.
Cast six equally spaced vertical rays through the cloud, taking samples distance 1 apart. Calculate the pixel values for each ray.
What happens to the result if we take samples at twice the frequency? or half? Is this behaviour correct? How could we adapt the algortihm from lectures to make it less sensitive to such changes?
An example for one ray, as illustrated, using back-to-front compositing:What happens to the result if we take samples at twice the frequency? or half? Is this behaviour correct? How could we adapt the algortihm from lectures to make it less sensitive to such changes?
If the same method is applied with more samples along the ray, the transparency of the cloud is reduced because the algorithm as shown does not take sample density into account. If the cells are spaced every d units and sample points on the ray are r units apart then the alpha value should be:Non-examinable Questions
Use this algorithm to compute anti-aliased pixel values for the line from P(3,3) to Q(10,5) from Q1.
What are the trade-offs between this and a post-filtered version of Bresenham's algorithm?
Take a look at Eric Chan's method for computing anti-aliased lines using the GPU. What tradeoffs are involved in using this method?