09-Nov-2022 09:01:27 maple_area_test(): MATLAB/Octave version 4.2.2 maple_area() estimates the area of the maple leaf from its image. Polygonal boundary involves 1776 vertices. Graphics saved as "maple_leaf.png" maple_area_estimate_grid_test(): maple_area_estimate_grid() is given a polygon defining the boundary of the maple leaf, using a regular NxN grid of points to estimate the relative area. Hayes got a relative area of 0.4185 using a 1024x1024 grid. I N N^2 Estimated relative area 0 1 1 1.000000 1 2 4 0.000000 2 4 16 0.500000 3 8 64 0.406250 4 16 256 0.406250 5 32 1024 0.417969 6 64 4096 0.417480 7 128 16384 0.417664 8 256 65536 0.417557 9 512 262144 0.417191 10 1024 1048576 0.417447 maple_area_estimate_mc_test(): maple_area_estimate_mc() is given a polygon defining the boundary of the maple leaf, and uses SAMPLE_NUM Monte Carlo points to estimate the relative area. Each computation is done 10 times. Hayes got a relative area of 0.4185 using a 1024x1024 grid. I SAMPLE_NUM Estimate Variance 0 1 0.400000 0.240000 1 4 0.475000 0.043125 2 16 0.418750 0.023477 3 64 0.432812 0.004104 4 256 0.442969 0.001078 5 1024 0.406152 0.000135 6 4096 0.413306 0.000071 7 16384 0.416144 0.000011 8 65536 0.417165 0.000002 9 262144 0.417577 0.000001 maple_area_estimate_qmc_test(): maple_area_estimate_qmc() is given a polygon defining the boundary of the maple leaf, and uses SAMPLE_NUM Quasi Monte Carlo points to estimate the relative area. Hayes got a relative area of 0.4185 using a 1024x1024 grid. I SAMPLE_NUM Estimate 0 1 0.000000 1 4 0.500000 2 16 0.250000 3 64 0.390625 4 256 0.406250 5 1024 0.416016 6 4096 0.418213 7 16384 0.417908 8 65536 0.417328 9 262144 0.417412 10 1048576 0.417396 maple_area_test(): Normal end of execution. 09-Nov-2022 09:20:23