emblem
Distance to points in rectangle
Computes the distance from a given point to the others, in a rectangle.
2024.May.16 19:17:43
x, y Location of given (source) point. •
b, h Base and height of rectangle. •
N   (≤ 1e+8) No. of random destination points. •
.seed, klass Seed for random numbers, and no. of histogram classes. •
Show values Shows the coordinates of the graph. •

Simulates, via Monte Carlo, the distances from the source point to N random points in a given rectangle, with base b and height h, in order to find the distribution of the distance, d. In the Figure, is shown a rectangle with the source point (square) and N (here, a few) random points.

Plots the density function (pdf), f(d), and the probability function (cdf), F(d), for the distance, d, and computes its mean and standard-deviation. (The user given point can be out of the rectangle.)

Other suggested data for (x, y): (0.2, 0.2), (1, 0.2), (2.6, 0.2)

rectangle
References: Plate: distInRectang

• Dartmouth College, 2014, Chapter 2.pdf, "Continuous probability densities"

• Weisstein, Eric W., "Disk Point Picking", MathWorld—A Wolfram Web Resource

• 1838-01-05: Jordan, Marie Ennemonde Camille (1922-01-22) (not Wilhelm Jordan, 1842–1899).

 
 
Valid HTML 4.01! IST http://web.tecnico.ulisboa.pt/~mcasquilho/compute/or/Fx-distInRectang.php
Created: 2014-01-04 — Last modified: 2014-01-19