c3 Torus PDF
c3 Torus PDF
Maths21a, O. Knill 6) IN LAS VEGAS. The Monte Carlo Method is to shoot randomly onto the cube [L, L] [L, L] [L, L]
and see how many times we hit the sphere. Here an experiment with Mathematica:
We first calculate the volume of a sphere of radius R in different ways. Then we show how to calculate the R := (2Random[] 1); k = 0; Do[x = R; y = R; z = R; If[x2 + y2 + z2 < 1, k + +], {10000}]; k/10000
volume of the torus in three different ways. The page serves more as an illustration for the variety of tools
which are available. We did not cover all the material (yet) to understand all of the methods. Assume, we hit 5277 of 10000 the measured fraction of the volume of the sphere with the volume of the cube 8
is 0.5277. The volume of 1/8th of the sphere is /6 = 0.524
7) USING GAUSS THEOREM (see later) The vector field F (x, y, z) = (x, y, z) has divergence 3 Gauss theorem
tells that 3V is the flux of the vector field through the surface which is L times the surface area 4L2 . Therefore,
V = 4L3 /3