Stratified Sampling of Spherical Triangles

by James Arvo
Computer Science 256-80
California Institute of Technology


This applet demonstrates an algorithm for generating random samples from arbitrary spherical triangles, as described in the paper Stratified Sampling of Spherical Triangles (SIGGRAPH `95). The program allows you to interactively change a spherical triangle by picking and dragging its vertices. Observe that the pattern of samples changes smoothly with the triangle, yet always remains as evenly distributed as it did initially.

To run this applet you must use a Java-compatible browser such as HotJava or Netscape Navigator 2.0 (or later).


When the Resample button is pressed, a set of random numbers is generated and mapped to the sphere. These random numbers remain fixed as the triangle is altered. The samples within the triangle can be either Stratified or Uniform. Both sampling methods use the same set of random numbers and the same mapping to the sphere.

source code


James Arvo (arvo@cs.caltech.edu)