ssa2d() function provides sites labeling of the anisotropic cluster on 2D square lattice with Moore (1,d)-neighborhood.
1 2 3 4
a linear dimension of 2D square percolation lattice.
a vector of relative fractions
averaged double combinations of
a vector of linear indexes of a starting sites subset.
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites.
The percolation is simulated on 2D square lattice with uniformly weighted sites
acc and the vectors
p1, distributed over the lattice directions, and their combinations.
The anisotropic cluster is formed from the accessible sites connected with the initial subset
set, and depends on the direction in 2D square lattice.
To form the cluster the condition
acc[set+eN[n]]<pN[n] is iteratively tested for sites of the Moore (1,d)-neighborhood
eN for the current cluster perimeter
eN is equal to
pN is equal to
n is equal to direction in 2D square lattice.
Moore (1,d)-neighborhood on 2D square lattice consists of sites, at least one coordinate of which is different from the current site by one:
Minkowski distance between sites
b depends on the exponent
rhoM <- function(a, b, d=1)
if (is.infinite(d)) return(apply(abs(b-a), 2, max))
else return(apply(abs(b-a)^d, 2, sum)^(1/d)).
Minkowski distance for sites from
e1 subset with the exponent
d=1 is equal to
Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.
an accessibility matrix for 2D square percolation lattice:
Pavel V. Moskalev
 Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
fssa2d, ssa3d, ssa20, ssa30, ssi2d, ssi3d
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.