Simulation. Monte Carlo

Similar documents
Simulation. Variance reduction Example

A Random Number Based Method for Monte Carlo Integration

Lecture 34: Curves defined by Parametric equations

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Anti-aliasing and Monte Carlo Path Tracing

Global Illumination The Game of Light Transport. Jian Huang

SPH3UW Unit 7.2 Reflection Page 1 of 7

Basics of treatment planning II

Practical Course WS12/13 Introduction to Monte Carlo Localization

Numerical Integration

Propagation and Reflection of Light

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. - Statistics and Error Analysis -

Lecture Ray Model of Light. Physics Help Q&A: tutor.leiacademy.org

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

Experiment 8 Wave Optics

Reflection and Refraction of Light

13 Distribution Ray Tracing

Chapter 3. Physical phenomena: plane parallel plate. This chapter provides an explanation about how rays of light physically behave when

Synrad3D Photon propagation and scattering simulation

TracePro s Monte Carlo Raytracing Methods, reducing statistical noise, memory usage and raytrace times

Practice problems from old exams for math 233

At the interface between two materials, where light can be reflected or refracted. Within a material, where the light can be scattered or absorbed.

2017 Summer Course on Optical Oceanography and Ocean Color Remote Sensing. Monte Carlo Simulation

Monte Carlo Integration

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Optics. a- Before the beginning of the nineteenth century, light was considered to be a stream of particles.

Light and the Properties of Reflection & Refraction

A 10-minute introduction to. SynRad+ A test-particle Monte Carlo simulator for synchrotron radiation

COMPUTER SIMULATION TECHNIQUES FOR ACOUSTICAL DESIGN OF ROOMS - HOW TO TREAT REFLECTIONS IN SOUND FIELD SIMULATION

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0

1) Find. a) b) c) d) e) 2) The function g is defined by the formula. Find the slope of the tangent line at x = 1. a) b) c) e) 3) Find.

Modeling Custom Surface Roughness with LucidShape 2D Scatter Curve BSDF Material

Reflection AB5 Concave Mirror. Teacher s Notes

Monte Carlo Techniques. Professor Stephen Sekula Guest Lecture PHY 4321/7305 Sep. 3, 2014

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. - Statistical Methods -

REFLECTION & REFRACTION

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

ISyE 6416: Computational Statistics Spring Lecture 13: Monte Carlo Methods

Chapter 33 The Nature and Propagation of Light by C.-R. Hu

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Ordinary Level

Physics 1C. Lecture 22A. "There are two ways of spreading light: to be the candle or the mirror that reflects it." --Edith Wharton

Radiography and Tomography Lab 2: Computing Radiographs

Probability and Statistics for Final Year Engineering Students

This part of the course addresses the idea of path guiding and how it can be used to reduce variance of Monte Carlo volumetric light transport

A Direct Simulation-Based Study of Radiance in a Dynamic Ocean

ACCURACY AND EFFICIENCY OF MONTE CARLO METHOD. Julius Goodman. Bechtel Power Corporation E. Imperial Hwy. Norwalk, CA 90650, U.S.A.

Figure 1: Derivation of Bragg s Law

Precalculus 2 Section 10.6 Parametric Equations

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. Lecture 14

Ray Optics I. Last time, finished EM theory Looked at complex boundary problems TIR: Snell s law complex Metal mirrors: index complex

Chapter 35. The Nature of Light and the Laws of Geometric Optics

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

specular diffuse reflection.

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

PHY 171 Lecture 6 (January 18, 2012)

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Imperfections and Errors (Chapter 6)

LECTURE 15 REFLECTION & REFRACTION. Instructor: Kazumi Tolich

GG450 4/5/2010. Today s material comes from p and in the text book. Please read and understand all of this material!

Realization of Improved Solar UV Diffusers

4X Beam Expander P/N SPZ17022 and Optional Beam Splitter P/N SPZ17027 User Notes

Home Lab 7 Refraction, Ray Tracing, and Snell s Law

Monte Carlo Integration

Engineered Diffusers Intensity vs Irradiance

Light and refractive index

Direction Fields; Euler s Method

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

Ray Optics. Lecture 23. Chapter 34. Physics II. Course website:

Ch. 25 The Reflection of Light

Random Numbers Random Walk

Chapter 33 cont. The Nature of Light and Propagation of Light (lecture 2) Dr. Armen Kocharian

Light. Form of Electromagnetic Energy Only part of Electromagnetic Spectrum that we can really see

Physics 11 Chapter 18: Ray Optics

Modeling the ORTEC EX-100 Detector using MCNP

Nested Sampling: Introduction and Implementation

Probabilistic Robotics

SIMULATION AND VISUALIZATION IN THE EDUCATION OF COHERENT OPTICS

12. Reflection and Refraction

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

distribution ray-tracing

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Introduction to Mobile Robotics Bayes Filter Particle Filter and Monte Carlo Localization. Wolfram Burgard

A 10-minute introduction to. Molfow+ A test-particle Monte Carlo simulator for UHV systems

MATHEMATICS SYLLABUS SECONDARY 5th YEAR

Uncertainty analysis in spatial environmental modelling. Kasia Sawicka Athens, 29 Mar 2017

distribution ray tracing

What is Monte Carlo Modeling*?

Rules for Deviation of Light Rays During Refraction

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Outline. Monte Carlo Radiation Transport Modeling Overview (MCNP5/6) Monte Carlo technique: Example. Monte Carlo technique: Introduction

Klaus Dehmelt EIC Detector R&D Weekly Meeting November 28, 2011 GEM SIMULATION FRAMEWORK

Radiometry (From Intro to Optics, Pedrotti 1-4) Radiometry is measurement of Emag radiation (light) Consider a small spherical source Assume a black

Ghost and Stray Light Analysis using TracePro. February 2012 Webinar

Rendering Smoke & Clouds

Chapter 1. Introduction

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

Transcription:

Simulation Monte Carlo

Monte Carlo simulation Outcome of a single stochastic simulation run is always random A single instance of a random variable Goal of a simulation experiment is to get knowledge about the distribution of the random variable (mean, variance) Right value is deterministic but it can not be determined explicitly.

Buffons needle Classical example of simulation experiment where exact result is known. Count of Buffon presented a method to define the value for p in 1733. Throw a needle of length l on a plane that has parallel lines with distance d. Count how often the needle crosses a line. Compute experimental probability for hits P= #hits/#trials

Buffons needle Needle hits a line if The distance from the center of the needle to closest line is less than l sin a, where a is the angle between the needle and the line d l a Angle ~ Unif(0, p/2) Center ~ Unif (0,d/2)

Buffons needle Probability of hit can be computed using the volume of the area bounded by the sinusoidal curve. p= 2l/(pd) Hence estimate is p = 2l/(pd) for experimental value for p. d/2 l/2 p/2

Buffons needle Result of a single throw is random So is the average of N throws. What do we know after N throws? Can we define the distribution of the average P after N throws. Or at least expectation and variance P is an average of N independent random variables Single attempts obey binomial distribution with mean p (=2l/(pd)) E(P)=p.

Buffons needle Variance of the result in one throw is p(1-p) (result is a Bin(p) variable) Variance of the average of N independent trials is p(1-p)/n I.e. Var(P) = p(1-p)/n So now we have observation of a random variable with known variance. We can estimate the relationship between the sample average and the expectation.

Confidence interval Assume we know a sample average of a random variable Where is the true expectation with, say 99% probability. Define sc. confidence interval for which P( P-d < p< P+d) >0.99. Can be defined if distribution of P is known. P is average of N independent Bin variables. For large N, P is approximately normally distributed. d is of form c(p)n^(-1/2).

Monte Carlo -integration Buffon s needle was sampling a variable expectation has a formula as definite integral. The approach can be used generally to approximate integrals. Integrate f on [a,b] given that 0<f<c If x is Unif(a,b) and y is Unif(0,c), determine experimentally the probability p for y< f(x). The sought integral is p(b-a)c.

Monte Carlo -integration More experiments lead to more accurate estimate for p. Confidence interval (error) is proportional to N^(-1/2). Not efficient for one dimensional integrals Length of confidence interval and asymptotic behavior depend only on p, not the dimension of the integral. Efficient way to get rough estimates for high dimensional integrals.

Monte Carlo Previous Monte Carlo does not apply directly to all cases Unbounded interval or function Possible to give up y variable Compute only E(f(x)) Cheaper but error analysis is more demanding Flat upper bound c can be replaced Find a pdf g such that f(x)< cg(x) Draw x:s from distribution g Aim for success rate p ~ 1

Monte Carlo applications Typical Monte Carlo case is (very) high dimensional integral arising from modelling ray propagation in material. Each collision is modelled with multidimensional integral (probabilities for absorption, scattering as functions of incident angle, energy, particle shapes, surface properties, adsorption in free path, etc) For single ray the complexity grows only linearily with number of collisions.

M C Example Consider scattering of laser beam from a material layer MSc thesis of Jukka Räbinä 2005 Goal is to simulate different statistics of the scattered image using Monte-Carlo

Experimental set up

Simulate propagation of ray in cloud of particles Basically ray tracing Positions and scattering directions of particles are random Scattering

Compute the intensity, center of mass etc of the scatter image captured by camera Goal of simulation I.e. an integral of a function involving the intensity distribution.

Simulation experiment Send parallel rays with normally distributed intensity Collect the (few) rays scattered to the camera

Simulation results Three different implementations of M-C Each with 100M simulated rays Differences in execution times and confidence intervals Differences can be explained after learning about variance reduction methods