Image Synthesis Assignment 4: Monte Carlo

Due: March 20

For the following problems, please show all your work.

  1. Derive an algorithm for uniformly sampling points on the surface of a cylinder with height h.

  2. We will find a uniform sampling distribution for a cylinder of height h and radius r. First we must compute the marginal and conditional density functions. These are given by:


     

     

    Marginal Density
    Conditional Density
    Now we use these to find the sampling function by integrating and inverting:
    Where u1 and u2 are randomly generated points
      Finally, we can convert to rectilinear coordinates by the standard transformations from cylindrical to rectilinear coordinates:
     


  3. Derive an algorithm for uniformly sampling points on the surface of a cone with height h and base radius r.

  4. We will find a uniform sampling distribution for a cone of height h and base radius r. First we must compute the marginal and conditional density functions. These are given by:


     

     

    Marginal Density
    Conditional Density
    Now we use these to find the sampling function by integrating and inverting:
    Where u1 and u2 are randomly generated points
      Finally, we can convert to rectilinear coordinates by the standard transformations from cylindrical to rectilinear coordinates:
     


  5. Derive an algorithm for uniformly sampling points on the surface of a sphere with radius r.

  6. We will find a uniform sampling distribution for a sphere of radius r. First we must compute the marginal and conditional density functions. These are given by:


     

     

    Marginal Density
    Conditional Density
    Now we use these to find the sampling function by integrating and inverting:
    NOTE: (1- 2u1) can be replaced by -2u1
    Where u1 and u2 are randomly generated points
    Finally, we can convert to rectilinear coordinates by the standard transformations from spherical to rectilinear coordinates:
     


  7. Suppose you are rendering a scene of a glossy plane lit by an area light source. When reflecting rays off the plane, you are faced with the choice of either importance sampling the glossy reflection (distributing rays carefully around the mirror direction), or importance sampling the light source (sending rays to points chosen on the light). Describe properties of the scene (e.g., the glossiness of the plane and the size of the light source) that would make one technique preferable over the other.
    In general it is a good idea to sample points in and around the mirror direction for glossy surfaces. This is because this is where the high frequencies occur in the image. For more diffuse areas, the BRDF is changing very slowly and so a low sample rate will suffice. However, this assumes that there is a large enough light source for this. If the light source is too small, then even though the glossy points are being sampled well, it can easily be the case that they are not even contributing much to the resulting image becuase little light is hitting them. In this case, the diffuse areas may be receiving a lot of light, but since the sample rate has been reduced there, imperfections will occur in the image. So, for small light sources, it is more efficient to send rays to the light source rather than biasing the glossiness.