buffon yasai

11

Click here to load reader

Upload: wilson-rojas-bayona

Post on 15-Sep-2015

221 views

Category:

Documents


0 download

DESCRIPTION

metodo de buffon basai.

TRANSCRIPT

VALUESBUFFON'S NEEDLE PROBLEMA needle of length L =1.2is dropped on equally spaced parallel linesNeedleSimulationTheoreticala distance D =1apart. The probability that the needle willLengthOutputResultcross a line is2 L / Pi D0.10.063060.0636619772This formula makes sense fo L< Pi D/2 for otherwise it gives value > 10.20.127010.1273239545Explanation:0.30.19180.1909859317B16a random number for the x-coordinate of the first end of the needle0.40.253950.2546479089C16a random number for the angle of the needle0.50.316490.3183098862D16the x-coordinate of the first end of the needle, computed as B*D0.60.380970.3819718634E16the angle (in radians), computed as C*2*Pi0.70.445740.4456338407F16the x-coordinate of the second end of the needle, computed as D + L * COS(E)0.80.508520.5092958179G161 if a line is crossed, 0 otherwise0.90.571480.572957795110.635660.63661977241.10.681210.7002817496xanglexCrossing?1.20.714540.76394372680.07282859490.42611807370.07282859492.6773788196-1.000179994111.30.739420.82760570411.40.760450.89126768131.50.779330.95492965861.60.794751.01859163581.70.809471.0822536131.80.819821.14591559031.90.827941.209577567520.837391.2732395447These values give the "Theoretical"or higher graph, that does not makesense after it crosses the y=1 lineThese values give the "Simulation" or lowergraph that approaches y=1 asymptoticallyA good agreement between the theoreticalresults and the simulation output for L