©
Random polygons: area, perimeter
Simulates area and perimeter of polygons inscribed in a circle.
2024.Nov.25 06:43:49
N  (N ≥ 3) Number of vertices. •
Simulation language     Language for Monte Carlo. •
Trials*, seed (* ≤ 107) Monte Carlo: trials, seed (0: unrepeatable). •
Histogram classes N. of classes.
Show values Show graph coordinates.

Simulates the area and the perimeter of random polygons of N vertices, inscribed in a unit circle (R = 1).

Files involved: RandomPolygons.php, randomPolygons.py, modRandomPolygons.f90.

Advantage is taken from: PHP, for the web page; Python, as "glue"; Fortran and C, for numerical segment; and 'gnuplot', for plotting.

Draws graphs of the statistical behavior of the area and of the perimeter.


Python file (download): randPolygons.py (all scripts available, if sollicited)

Computation structure — A PHP file (this page: 'P-RandPolygons.php') calls (via 'action=...') an intermediate PHP file ('RandPolygons.php'), which (through $_POST) sends the problem data as command line arguments to a Python script. This last does the computing, and makes 'system' call(s) to 'gnuplot', for the final (temporary) webpage.

Keywords: PHP, command line arguments, Python script, FOrtran, C, gnuplot.

References: Plate: RandPolygons

• (Wikipedia) PHP (from Personal Home Page) • Python (programming language) • Fortran 90

• Python as glue • Using Python as glue • F2PY Users Guide and Reference Manual

• Zwillinger, Dan (editor), 2018, "CRC Standard Mathematical Tables and Formulas", 33.rd Ed., CRC Press, Taylor & Francis Group, Chapman & Hall. ISBN:978-1-4987-7780-3 (Hardback), 873 pp.

• Symbols: Unicode character table; Unicode.pdf (charts); square root

• icSoftComp2023, 5.th International Conference on Soft Computing, CHARUSAT, Changa (India), 07–09 December 2023.

• 1851-01-28: Teixeira, Francisco Gomes (†1933-02-08, 82 yrs.).

 
 
Valid HTML 5! IST http://web.ist.utl.pt/~mcasquilho/compute/meeting/Polygons/P-RandPolygons.php
Created: 2022-01-28 — Last modified: 2024-06-18