The method of <a href="http://en.wikipedia.org/wiki/Coupling_from_the_past">coupling from the past</a> can be used to sample uniformly at random from certain distributions. Here is a <a href="http://www.probability.ca/jeff/java/cftp.html">simple demonstration</a> which illustrates the method, and <a href="http://faculty.uml.edu/jpropp/tiling/www/applets/aztec.html">here</a> it is in action computing random Aztec diamond tilings.