Overview
 Monte Carlo Simulation
 Lab Demo
 Getting to Work
A Question
What is the area of this shape?
Monte Carlo: A Way of Estimation
Throw darts, and see how many hit!
To Implement
 representation of blob
 tell if a point is or is not contained in blob
 find bounding box of blob
 throw darts
 generate a random point in the bounding box
 test if in blob
 repeat
 combine results of experiment
 compute area of bounding box
 find proportion of hits
 estimate area
Lab 05: Implement This Procedure
Given:
AbstractShape
Circle

Blob
 consists of one or more constituent
AbstractShapes
Your Task:
 find bounding box
 determining containment
 Monte Carlo simulation to estimate area