Sampling Attila Gyulassy Image Synthesis. Overview Problem Statement Random Number Generators Quasi-Random Number Generation Uniform sampling of Disks,

Slides:



Advertisements
Similar presentations
Monte Carlo Methods and Statistical Physics
Advertisements

BAYESIAN INFERENCE Sampling techniques
Monte Carlo Integration Robert Lin April 20, 2004.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
Function Optimization Newton’s Method. Conjugate Gradients
Stochastic Differentiation Lecture 3 Leonidas Sakalauskas Institute of Mathematics and Informatics Vilnius, Lithuania EURO Working Group on Continuous.
CF-3 Bank Hapoalim Jun-2001 Zvi Wiener Computational Finance.
Nonlinear and Non-Gaussian Estimation with A Focus on Particle Filters Prasanth Jeevan Mary Knox May 12, 2006.
Pseudorandom Number Generators
Generating Continuous Random Variables some. Quasi-random numbers So far, we learned about pseudo-random sequences and a common method for generating.
K. Desch – Statistical methods of data analysis SS10
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
Fast integration using quasi-random numbers J.Bossert, M.Feindt, U.Kerzel University of Karlsruhe ACAT 05.
1 Simulation Modeling and Analysis Pseudo-Random Numbers.
A) Transformation method (for continuous distributions) U(0,1) : uniform distribution f(x) : arbitrary distribution f(x) dx = U(0,1)(u) du When inverse.
Nonlinear Stochastic Programming by the Monte-Carlo method Lecture 4 Leonidas Sakalauskas Institute of Mathematics and Informatics Vilnius, Lithuania EURO.
Monte Carlo Methods in Partial Differential Equations.
APPENDIX D RANDOM NUMBER GENERATION
Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.
Monte Carlo Integration Digital Image Synthesis Yung-Yu Chuang with slides by Pat Hanrahan and Torsten Moller.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Analysis of Monte Carlo Integration Fall 2012 By Yaohang Li, Ph.D.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Surface Simplification Using Quadric Error Metrics Michael Garland Paul S. Heckbert.
Copyright © 2010 Lumina Decision Systems, Inc. Monte Carlo Simulation Analytica User Group Modeling Uncertainty Series #3 13 May 2010 Lonnie Chrisman,
1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing.
1 Lesson 2: RNGs and Choosing from distributions Random number generators (RNG) Random number generators (RNG) General need for random numbers General.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
Random Numbers and Simulation  Generating truly random numbers is not possible Programs have been developed to generate pseudo-random numbers Programs.
1 Lesson 8: Basic Monte Carlo integration We begin the 2 nd phase of our course: Study of general mathematics of MC We begin the 2 nd phase of our course:
Monte Carlo Methods.
02/10/03© 2003 University of Wisconsin Last Time Participating Media Assignment 2 –A solution program now exists, so you can preview what your solution.
Chapter 4 Stochastic Modeling Prof. Lei He Electrical Engineering Department University of California, Los Angeles URL: eda.ee.ucla.edu
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
APPENDIX D R ANDOM N UMBER G ENERATION Organization of chapter in ISSO* – General description and linear congruential generators Criteria for “good” random.
Quasi-Monte Carlo Methods Fall 2012 By Yaohang Li, Ph.D.
Monté Carlo Simulation  Understand the concept of Monté Carlo Simulation  Learn how to use Monté Carlo Simulation to make good decisions  Learn how.
Importance Resampling for Global Illumination Justin F. Talbot Master’s Thesis Defense Brigham Young University Provo, UT.
Example: Bioassay experiment Problem statement –Observations: At each level of dose, 5 animals are tested, and number of death are observed.
© The MathWorks, Inc. ® ® Monte Carlo Simulations using MATLAB Vincent Leclercq, Application engineer
Duy & Piotr. How to reconstruct a high quality image with the least amount of samples per pixel the least amount of resources And preserving the image.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Bracketing Methods Chapter 5.
CS348B Lecture 9Pat Hanrahan, Spring 2005 Overview Earlier lecture Statistical sampling and Monte Carlo integration Last lecture Signal processing view.
1 Introduction to Statistics − Day 4 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Lecture 2 Brief catalogue of probability.
Quasi-Random Techniques Don P. Mitchell. MC Integration for Rendering Ray tracing yields point samples f(x i ) Discontinuous f thwarts efficient methods.
CHAPTER 5 Simulation Modeling. Introduction In many situations a modeler is unable to construct an analytic (symbolic) model adequately explaining the.
Variance Reduction Fall 2012
CS774. Markov Random Field : Theory and Application Lecture 15 Kyomin Jung KAIST Oct
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Statistical Data Analysis: Lecture 5 1Probability, Bayes’ theorem 2Random variables and.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
STAT 534: Statistical Computing
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
Computer graphics III – Low-discrepancy sequences and quasi-Monte Carlo methods Jaroslav Křivánek, MFF UK
Introduction to emulators Tony O’Hagan University of Sheffield.
Monte Carlo Integration Digital Image Synthesis Yung-Yu Chuang 12/3/2008 with slides by Pat Hanrahan and Torsten Moller.
10.Deterministic Randomness 1.Random Sequences Random Sequences A sequence of numbers r 1, r 2,... is random if there are no discernible patterns.
Introduction to Monte Carlo Method
Rouwaida Kanj, *Rajiv Joshi, and Sani Nassif
Basic simulation methodology
Markov chain monte carlo
Computing and Statistical Data Analysis Stat 3: The Monte Carlo Method
Monte Carlo I Previous lecture Analytical illumination formula
Monte Carlo Rendering Central theme is sampling:
Lecture 4 - Monte Carlo improvements via variance reduction techniques: antithetic sampling Antithetic variates: for any one path obtained by a gaussian.
Monte Carlo Integration
Sampling Plans.
Presentation transcript:

Sampling Attila Gyulassy Image Synthesis

Overview Problem Statement Random Number Generators Quasi-Random Number Generation Uniform sampling of Disks, Triangles, Spheres Stratified Sampling Importance Sampling of General Functions

Problem Statement What is sampling? –Want to Take a function f and recreate it using only certain values e.g. data points used in interpolation where to pick those points? –Sometimes don’t know f but can evaluate it would like to choose data points used to reconstruct function in an optimal way

Problem Statement (ctd) Monte Carlo Integration –2 ways to improve improve estimation method carefully selecting samples****** Use filtering to recreate original function –covered next time –important to know necessary sampling frequency

Example

Overview of Sampling Over some domain –Sometimes parametrizable Some sample density Random / Regular

Random Numbers Would like to get uniformly distributed random numbers over a range [a,b] Problems –large open spaces –slow convergence –nondeterministic

RNG methods Non-linear additive feedback Linear congruence methods Mersenne Twister algorithm many more...

Quasi-Monte Carlo Use deterministic roughly uniform aperiodic distribution through domain –I.e. pseudo-random numbers Want low discrepancy –small = evenly distributed –large = clustering causes clumping and sparse regions Want high speed

Quasi-Random Generators

Halton Sequence N-dimensional points x i x m = (  2 (m),  3 (m),…,  PN-1 (m),  PN (m)) PI = ith prime number (2,3,5,7,…)  r (m) is the radical-inverse function of m to the base r. The value is obtained by writing m in base r and then reflecting the digits around the decimal point = reflecting = 11/27 10

Halton Sequence N-dimensional points x i x m = (  2 (m),  3 (m),…,  PN-1 (m),  PN (m)) PI = ith prime number (2,3,5,7,…) m = a 0 r 0 + a 0 r 1 + a 0 r 2 + a 0 r  r (m) = a 0 r -1 + a 0 r -2 + a 0 r -3 + a 0 r

Halton Sequence Starting at (1,1,…,1) better than starting at (0,0,…,0) 1 = 1.0 => 0.1 = 1/2 2 = 10.0 => 0.01 = 1/4 3 = 11.0 => 0.11 = 3/4 4 = => = 1/8 5 = => = 5/8 6 = => = 3/8 7 = => = 7/8 Notice even distribution

Hammersley Sequence Similar to Halton x m = (m/N,  2 (m),  3 (m),…,  PN-1 (m)) PI = ith prime number (2,3,5,7,…) m = a 0 r 0 + a 0 r 1 + a 0 r 2 + a 0 r  r (m) = a 0 r -1 + a 0 r -2 + a 0 r -3 + a 0 r Where N is number of total samples

Hammersley Sequence

Poisson Random Numbers Generate random numbers according to the Poisson distribution function This turns out to be the same as just “throwing darts”**

Result of RNGs Basically, now we have random numbers in [0,1] –what do we do with these? –How does this relate to sampling?

Uniform Sampling of a Disk Want Subdivision into equal area regions

Uniform Sampling Over a Sphere demo

Uniform Sampling - Disk vs Sphere Sampling of disk and projecting onto hemisphere = sampling on 1/2 of sphere

Uniform Sampling of Triangles Compute probability density function for triangles

Uniform Sampling of Triangles The u and v are not independent

Stratified Sampling Alternative to uniform –break domain into strata –fills in gaps faster

Importance Sampling Basic Idea –sample at important locations to decrease variance

Importance Sampling ctd. As seen last time, use a probability density function f to pick samples –properties

Importance Sampling ctd. Then, our approximation becomes (here g(x) is prob. Dens. Funciton, not f(x))

Importance Sampling ctd. How do we pick f? –want to minimize variance –where G is integral of original function g(x) –… after much math we get –which is great!! Except, G is what we are trying to find f(x) = |g(x)| / G G2G2

Importance Sampling ctd. If we don’t know G, how can we pick f –If we apply a filter to g, so integral is of form Then if the filter is clamped [0,1] the filter itself becomes a reasonable estimate for f Problems with this method?

Importance Sampling ctd. Remember f(x) = |g(x)| / G gives least variance motivation for adaptive sampling build f from first few samples

Conclusion Multiple ways to generate “random” numbers –have to pick best method for each application Many sampling techniques, with pros and cons –uniform –stratified –importance –adaptive

References /lectures/lecture13/montecarlo.1.pdf Principles of Digital Image Synthesis, Glassner