View Single Post
Old 05-28-2019, 10:06 PM   #28
Agemegos
 
Agemegos's Avatar
 
Join Date: May 2005
Location: Oz
Default Re: [Space] Mapping Large Flat Areas

To have a nearest neighbour at distance x you have to have a neighbour at distance x and no neighbours at any distance less than x.

A hex has 6x other hexes at distance x for integer x, so the probability of a neighbour there is 1-(1-p)^(6x).

A hex has 3x(x-1) other hexes closer than x, and the probability that they are all empty is (1-p)^(3x(x-1)).

So the probability of a nearest neighbour at distance x is (1-(1-p)^(6x))((1-p)^(3x(x-1))).

So the expected nearest-neighbour distance is the limit of an infinite sequence with the nth term n(1-(1-p)^(6n))((1-p)^(3n(n-1))). That's a pig of a thing, but it converges pretty sharply for moderate p, so we can solve it numerically.

I summed the first hundred terms for each of a selection of probability values up to 95%, which will put the errors in the 12th decimal place even for the lowest P tabulated below. I hope the results will be useful.

Probability
of a feature

in each hexE(hex count to nearest feature)
0.1% — 16.19
0.2% — 11.45
0.3% — 9.36
0.4% — 8.11
0.5% — 7.25
0.6% — 6.63
0.7% — 6.14
0.8% — 5.74
0.9% — 5.42
1.0% — 5.14
1.1% — 4.91
1.2% — 4.70
1.3% — 4.52
1.4% — 4.35
1.5% — 4.21
1.6% — 4.08
1.7% — 3.96
1.8% — 3.85
1.9% — 3.75
2.0% — 3.65
2.3% — 3.45
2.5% — 3.28
2.8% — 3.13
3.0% — 3.00
3.3% — 2.89
3.5% — 2.78
3.8% — 2.69
4.0% — 2.61
4.3% — 2.54
4.5% — 2.47
4.8% — 2.41
5.0% — 2.35
5.5% — 2.24
6.0% — 2.15
6.5% — 2.08
7.0% — 2.01
7.5% — 1.94
8.0% — 1.89
8.5% — 1.83
9.0% — 1.79
9.5% — 1.75
10.0% — 1.71
10.5% — 1.67
11.0% — 1.64
11.5% — 1.60
12.0% — 1.58
12.5% — 1.55
13.0% — 1.52
13.5% — 1.50
14.0% — 1.48
14.5% — 1.45
15.0% — 1.43
16.0% — 1.40
17.0% — 1.36
18.0% — 1.33
19.0% — 1.31
20.0% — 1.28
21.0% — 1.26
22.0% — 1.24
23.0% — 1.22
24.0% — 1.20
25.0% — 1.18
27.5% — 1.15
30.0% — 1.12
32.5% — 1.10
35.0% — 1.08
37.5% — 1.06
40.0% — 1.05
42.5% — 1.036
45.0% — 1.028
47.5% — 1.021
50.0% — 1.016
55.0% — 1.008
60.0% — 1.004
65.0% — 1.002
70.0% — 1.000 7
75.0% — 1.000 2
80.0% — 1.000 06
85.0% — 1.000 011
90.0% — 1.000 001 00
95.0% — 1.000 000 02
__________________

Decay is inherent in all composite things.
Nod head. Get treat.

Last edited by Agemegos; 05-29-2019 at 06:57 PM. Reason: extra precision
Agemegos is offline   Reply With Quote