Simulates polygons,
i.e., n-gons, with given n sides,
randomly inscribed in a circle to compute their perimeter,
for application of remote parallel computing. The vertices of each polygon
are points uniformly distributed on the circle, here with radius
R = 1 (w/out loss of generality).
The perimeter of such a polygon is in [0, P], with
P the perimeter of the regular polygon (maximum),
P = 2 n R sin (π ⁄ n).
When n → ∞, P = 2 π R,
so the x-axis has size 2 π. The y-axis also has fixed size
to facilitate comparisons.
This sample problem has been set to test
remote parallel computing, in which two (or more) independent simulation runs
are distributed to remote computers. These can be different,
running on Windows, Mac, Linux, so the parallelization is controlled
(not MPI-style).
Plots the density (f) and cumulative distribution
(F) for the simulated variable. |