Title: | Site Percolation on Square Lattices (SPSL) |
---|---|
Description: | Provides basic functionality for labeling iso- & anisotropic percolation clusters on 2D & 3D square lattices with various lattice sizes, occupation probabilities, von Neumann & Moore (1,d)-neighborhoods, and random variables weighting the percolation lattice sites. |
Authors: | Pavel V. Moskalev |
Maintainer: | Pavel V. Moskalev <[email protected]> |
License: | GPL-3 |
Version: | 0.1-9 |
Built: | 2024-10-08 06:33:27 UTC |
Source: | CRAN |
Provides basic functionality for labeling iso- & anisotropic percolation clusters on 2D & 3D square lattices with various lattice sizes, occupation probabilities, von Neumann & Moore (1,d)-neighborhoods, and random variables weighting the percolation lattice sites.
Package: | SPSL |
Type: | Package |
Version: | 0.1-9 |
Date: | 2019-03-17 |
License: | GPL-3 |
LazyLoad: | yes |
ssi20()
and ssi30()
functions provide sites labeling of the isotropic cluster on 2D & 3D square lattice with von Neumann (1,0)-neighborhood.
ssa20()
and ssa30()
functions provide sites labeling of the anisotropic cluster on 2D & 3D square lattice with von Neumann (1,0)-neighborhood.
ssi2d()
and ssi3d()
functions provide sites labeling of the isotropic cluster on 2D & 3D square lattice with Moore (1,d)-neighborhood.
ssa2d()
and ssa3d()
functions provide sites labeling of the anisotropic cluster on 2D & 3D square lattice with Moore (1,d)-neighborhood.
fssi20()
and fssi30()
functions calculates the relative frequency distribution of isotropic clusters on 2D & 3D square lattice with von Neumann (1,0)-neighborhood.
fssa20()
and fssa30()
functions calculates the relative frequency distribution of anisotropic clusters on 2D & 3D square lattice with von Neumann (1,0)-neighborhood.
fssi2d()
and fssi3d()
functions calculates the relative frequency distribution of isotropic clusters on 2D & 3D square lattice with Moore (1,d)-neighborhood.
fssa2d()
and fssa3d()
functions calculates the relative frequency distribution of anisotropic clusters on 2D & 3D square lattice with Moore (1,d)-neighborhood.
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.
[3] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.
fssa20()
function calculates the relative frequency distribution of anisotropic clusters on 2D square lattice with von Neumann (1,0)-neighborhood.
fssa20(n=1000, x=33, p=runif(4, max=0.9), set=(x^2+1)/2, all=TRUE, shape=c(1,1))
fssa20(n=1000, x=33, p=runif(4, max=0.9), set=(x^2+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 2D square percolation lattice. |
p |
a vector of relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 and the vector p
, distributed over the lattice directions.
The anisotropic cluster is formed from the accessible sites connected with the initial subset set
, and depends on the direction in 2D square lattice.
Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x)
.
Each element of the matrix frq
is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample of size n
.
rfq |
a 2D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssa20, fssa30, fssi20, fssi30, fssa2d, fssa3d
x <- y <- seq(33) image(x, y, rfq <- fssa20(n=200, p=c(.3,.4,.75,.5)), cex.main=1, main="Frequencies of anisotropic (1,0)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) image(x, y, rfq <- fssa20(n=200, p=c(.3,.4,.75,.5)), cex.main=1, main="Frequencies of anisotropic (1,0)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssa2d()
function calculates the relative frequency distribution of anisotropic clusters on 2D square lattice with Moore (1,d)-neighborhood.
fssa2d(n=1000, x=33, p0=runif(4, max=0.8), p1=colMeans(matrix(p0[c(1,3, 2,3, 1,4, 2,4)], nrow=2))/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
fssa2d(n=1000, x=33, p0=runif(4, max=0.8), p1=colMeans(matrix(p0[c(1,3, 2,3, 1,4, 2,4)], nrow=2))/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 2D square percolation lattice. |
p0 |
a vector of relative fractions |
p1 |
averaged double combinations of |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 and the vectors p0
and 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.
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: e=c(e0,e1)
, where e0=c(-1,
1,
-x,
x)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4)], nrow=2))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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 rhoMe1=2
.
Each element of the matrix frq
is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample of size n
.
rfq |
a 2D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssa2d, fssa3d, fssa20, fssa30, fssi2d, fssi3d
x <- y <- seq(33) image(x, y, rfq <- fssa2d(n=200, p0=c(.3,.4,.75,.5)), cex.main=1, main="Frequencies of anisotropic (1,1)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) image(x, y, rfq <- fssa2d(n=200, p0=c(.3,.4,.75,.5)), cex.main=1, main="Frequencies of anisotropic (1,1)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssa30()
function calculates the relative frequency distribution of anisotropic clusters on 3D square lattice with von Neumann (1,0)-neighborhood.
fssa30(n=1000, x=33, p=runif(6, max=0.6), set=(x^3+1)/2, all=TRUE, shape=c(1,1))
fssa30(n=1000, x=33, p=runif(6, max=0.6), set=(x^3+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 3D square percolation lattice. |
p |
a vector of relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites and the vector p
, distributed over the lattice directions.
The anisotropic cluster is formed from the accessible sites connected with the initial subset set
, and depends on the direction in 3D square lattice.
Von Neumann (1,0)-neighborhood on 3D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x,
-x^2,
x^2)
.
Each element of the 3D matrix frq
is equal to the relative frequency with which the 3D square lattice site belongs to a cluster sample of size n
.
rfq |
a 3D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssa30, fssa20, fssi20, fssi30, fssa2d, fssa3d
x <- y <- seq(33) rfq <- fssa30(n=200, p=.17*c(.5,3,.5,1.5,1,.5)) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in z=17 slice of anisotropic (1,0)-clusters") contour(x, y, rfq[,,17], levels=seq(.05,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) rfq <- fssa30(n=200, p=.17*c(.5,3,.5,1.5,1,.5)) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in z=17 slice of anisotropic (1,0)-clusters") contour(x, y, rfq[,,17], levels=seq(.05,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssa3d()
function calculates the relative frequency distribution of anisotropic clusters on 3D square lattice with Moore (1,d)-neighborhood.
fssa3d(n=1000, x=33, p0=runif(6, max=0.4), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4, 1,5, 2,5, 1,6, 2,6, 3,5, 4,5, 3,6, 4,6)], nrow=2))/2, p2=colMeans(matrix(p0[c( 1,3,5, 2,3,5, 1,4,5, 2,4,5, 1,3,6, 2,3,6, 1,4,6, 2,4,6)], nrow=3))/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
fssa3d(n=1000, x=33, p0=runif(6, max=0.4), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4, 1,5, 2,5, 1,6, 2,6, 3,5, 4,5, 3,6, 4,6)], nrow=2))/2, p2=colMeans(matrix(p0[c( 1,3,5, 2,3,5, 1,4,5, 2,4,5, 1,3,6, 2,3,6, 1,4,6, 2,4,6)], nrow=3))/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 2D square percolation lattice. |
p0 |
a vector of relative fractions |
p1 |
averaged double combinations of |
p2 |
averaged triple combinations of |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites acc
and the vectors p0
, p1
, and p2
, 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 3D square lattice.
Moore (1,d)-neighborhood on 3D square lattice consists of sites, at least one coordinate of which is different from the current site by one: e=c(e0,e1,e2)
, where e0=c(-1,
1,
-x,
x,
-x^2,
x^2)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4,
1,5,
2,5,
1,6,
2,6,
3,5,
4,5,
3,6,
4,6)], nrow=2))
; e2=colMeans(matrix(p0[c(1,3,5,
2,3,5,
1,4,5,
2,4,5,
1,3,6,
2,3,6,
1,4,6,
2,4,6)], nrow=3))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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
and e2
subsets with the exponent d=1
is equal to rhoMe1=2
and rhoMe2=3
.
Each element of the matrix frq
is equal to the relative frequency with which the 3D square lattice site belongs to a cluster sample of size n
.
rfq |
a 3D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssa3d, fssa2d, fssa20, fssa30, fssi2d, fssi3d
x <- y <- seq(33) rfq <- fssa3d(n=200, p0=.17*c(.5,3,.5,1.5,1,.5)) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in z=17 slice of anisotropic (1,1)-clusters") contour(x, y, rfq[,,17], levels=seq(.05,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) rfq <- fssa3d(n=200, p0=.17*c(.5,3,.5,1.5,1,.5)) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in z=17 slice of anisotropic (1,1)-clusters") contour(x, y, rfq[,,17], levels=seq(.05,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssi20()
function calculates the relative frequency distribution of isotropic clusters on 2D square lattice with von Neumann (1,0)-neighborhood.
fssi20(n=1000, x=33, p=0.592746, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
fssi20(n=1000, x=33, p=0.592746, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 2D square percolation lattice. |
p |
the relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x)
.
Each element of the matrix frq
is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample of size n
.
rfq |
a 2D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.
ssi20, fssi30, fssa20, fssa30, fssi2d, fssi3d
x <- y <- seq(33) image(x, y, rfq <- fssi20(n=200), cex.main=1, main="Frequencies of isotropic (1,0)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) image(x, y, rfq <- fssi20(n=200), cex.main=1, main="Frequencies of isotropic (1,0)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssi2d()
function calculates the relative frequency distribution of isotropic clusters on 2D square lattice with Moore (1,d)-neighborhood.
fssi2d(n=1000, x=33, p0=0.5, p1=p0/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
fssi2d(n=1000, x=33, p0=0.5, p1=p0/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 2D square percolation lattice. |
p0 |
a relative fraction |
p1 |
|
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 and the constant parameters p0
and p1
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
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: e=c(e0,e1)
, where e0=c(-1,
1,
-x,
x,
-x^2,
x^2)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4)], nrow=2))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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 rhoMe1=2
.
Each element of the matrix frq
is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample of size n
.
rfq |
a 2D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.
ssi2d, fssi3d, fssi20, fssi30, fssa2d, fssa3d
x <- y <- seq(33) image(x, y, rfq <- fssi2d(n=200), cex.main=1, main="Frequencies of isotropic (1,1)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) image(x, y, rfq <- fssi2d(n=200), cex.main=1, main="Frequencies of isotropic (1,1)-clusters") contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssi30()
function calculates the relative frequency distribution of isotropic clusters on 3D square lattice with von Neumann (1,0)-neighborhood.
fssi30(n=1000, x=33, p=0.311608, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
fssi30(n=1000, x=33, p=0.311608, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 3D square percolation lattice. |
p |
the relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
Von Neumann (1,0)-neighborhood on 3D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x,
-x^2,
x^2)
.
Each element of the matrix frq
is equal to the relative frequency with which the 3D square lattice site belongs to a cluster sample of size n
.
rfq |
a 3D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssi30, fssi20, fssa20, fssa30, fssi2d, fssi3d
x <- y <- seq(33) rfq <- fssi30(n=200, p=0.37) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in the z=17 slice of isotropic (1,0)-clusters") contour(x, y, rfq[,,17], levels=c(0.2,0.25,0.3), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) rfq <- fssi30(n=200, p=0.37) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in the z=17 slice of isotropic (1,0)-clusters") contour(x, y, rfq[,,17], levels=c(0.2,0.25,0.3), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
fssi3d()
function calculates the relative frequency distribution of isotropic clusters on 3D square lattice with Moore (1,d)-neighborhood.
fssi3d(n=1000, x=33, p0=0.2, p1=p0/2, p2=p0/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
fssi3d(n=1000, x=33, p0=0.2, p1=p0/2, p2=p0/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
n |
a sample size. |
x |
a linear dimension of 3D square percolation lattice. |
p0 |
a relative fraction |
p1 |
|
p2 |
|
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameters p0
, p1
, and p2
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
Moore (1,d)-neighborhood on 3D square lattice consists of sites, at least one coordinate of which is different from the current site by one: e=c(e0,e1,e2)
, where e0=c(-1,
1,
-x,
x,
-x^2,
x^2)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4,
1,5,
2,5,
1,6,
2,6,
3,5,
4,5,
3,6,
4,6)], nrow=2))
; e2=colMeans(matrix(p0[c(1,3,5,
2,3,5,
1,4,5,
2,4,5,
1,3,6,
2,3,6,
1,4,6,
2,4,6)], nrow=3))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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
and e2
subsets with the exponent d=1
is equal to rhoMe1=2
and rhoMe2=3
.
Each element of the matrix frq
is equal to the relative frequency with which the 3D square lattice site belongs to a cluster sample of size n
.
rfq |
a 3D matrix of relative sampling frequencies for sites of the percolation lattice. |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
ssi3d, fssi2d, fssi20, fssi30, fssa2d, fssa3d
x <- y <- seq(33) rfq <- fssi3d(n=200, p0=.285) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in the z=17 slice of isotropic (1,1)-clusters") contour(x, y, rfq[,,17], levels=c(0.2,0.25,0.3), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
x <- y <- seq(33) rfq <- fssi3d(n=200, p0=.285) image(x, y, rfq[,,17], cex.main=1, main="Frequencies in the z=17 slice of isotropic (1,1)-clusters") contour(x, y, rfq[,,17], levels=c(0.2,0.25,0.3), add=TRUE) abline(h=17, lty=2); abline(v=17, lty=2)
ssa20()
function provides sites labeling of the anisotropic cluster on 2D square lattice with von Neumann (1,0)-neighborhood.
ssa20(x=33, p=runif(4, max=0.9), set=(x^2+1)/2, all=TRUE, shape=c(1,1))
ssa20(x=33, p=runif(4, max=0.9), set=(x^2+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 2D square percolation lattice. |
p |
a vector of relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 vector p
, distributed over the lattice directions.
The anisotropic cluster is formed from the accessible sites connected with the initial subset, and depends on the direction in 2D square lattice.
To form the cluster the condition acc[set+e[n]]<p[n]
is iteratively tested for sites of the von Neumann (1,0)-neighborhood e
for the current cluster perimeter set
, where n
is equal to direction in 2D square lattice.
Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x)
.
Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 2D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
fssa20, ssa30, ssi20, ssi30, ssa2d, ssa3d
set.seed(20120507) x <- y <- seq(33) image(x, y, ssa20(), zlim=c(0,2), main="Anisotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
set.seed(20120507) x <- y <- seq(33) image(x, y, ssa20(), zlim=c(0,2), main="Anisotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssa2d()
function provides sites labeling of the anisotropic cluster on 2D square lattice with Moore (1,d)-neighborhood.
ssa2d(x=33, p0=runif(4, max=0.8), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4)], nrow=2))/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
ssa2d(x=33, p0=runif(4, max=0.8), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4)], nrow=2))/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 2D square percolation lattice. |
p0 |
a vector of relative fractions |
p1 |
averaged double combinations of |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 p0
and 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 set
, where eN
is equal to e0
or e1
vector; pN
is equal to p0
or p1
vector; 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: e=c(e0,e1)
, where e0=c(-1,
1,
-x,
x)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4)], nrow=2))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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 rhoMe1=2
.
Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 2D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
fssa2d, ssa3d, ssa20, ssa30, ssi2d, ssi3d
set.seed(20120507) x <- y <- seq(33) image(x, y, ssa2d(), zlim=c(0,2), main="Anisotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
set.seed(20120507) x <- y <- seq(33) image(x, y, ssa2d(), zlim=c(0,2), main="Anisotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssa30()
function provides sites labeling of the anisotropic cluster on 3D square lattice with von Neumann (1,0)-neighborhood.
ssa30(x=33, p=runif(6, max=0.6), set=(x^3+1)/2, all=TRUE, shape=c(1,1))
ssa30(x=33, p=runif(6, max=0.6), set=(x^3+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 3D square percolation lattice. |
p |
a vector of relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites acc
and the vector p
, distributed over the lattice directions.
The anisotropic cluster is formed from the accessible sites connected with the initial subset set
, and depends on the direction in 3D square lattice.
To form the cluster the condition acc[set+e[n]]<p[n]
is iteratively tested for sites of the von Neumann (1,0)-neighborhood e
for the current cluster perimeter set
, where n
is equal to direction in 3D square lattice.
Von Neumann (1,0)-neighborhood on 3D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x,
-x^2,
x^2)
.
Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 3D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.
fssa30, ssa20, ssi20, ssi30, ssa2d, ssa3d
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120521) x <- y <- z <- seq(33) cls <- which(ssa30(p=.09*c(1,6,1,3,2,1))>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Anisotropic (1,0)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120521) x <- y <- z <- seq(33) cls <- ssa30(p=.09*c(1,6,1,3,2,1)) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an anisotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120521) x <- y <- z <- seq(33) cls <- which(ssa30(p=.09*c(1,6,1,3,2,1))>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Anisotropic (1,0)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120521) x <- y <- z <- seq(33) cls <- ssa30(p=.09*c(1,6,1,3,2,1)) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an anisotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssa3d()
function provides sites labeling of the anisotropic cluster on 3D square lattice with Moore (1,d)-neighborhood.
ssa3d(x=33, p0=runif(6, max=0.4), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4, 1,5, 2,5, 1,6, 2,6, 3,5, 4,5, 3,6, 4,6)], nrow=2))/2, p2=colMeans(matrix(p0[c( 1,3,5, 2,3,5, 1,4,5, 2,4,5, 1,3,6, 2,3,6, 1,4,6, 2,4,6)], nrow=3))/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
ssa3d(x=33, p0=runif(6, max=0.4), p1=colMeans(matrix(p0[c( 1,3, 2,3, 1,4, 2,4, 1,5, 2,5, 1,6, 2,6, 3,5, 4,5, 3,6, 4,6)], nrow=2))/2, p2=colMeans(matrix(p0[c( 1,3,5, 2,3,5, 1,4,5, 2,4,5, 1,3,6, 2,3,6, 1,4,6, 2,4,6)], nrow=3))/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 3D square percolation lattice. |
p0 |
a vector of relative fractions |
p1 |
averaged double combinations of |
p2 |
averaged triple combinations of |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites acc
and the vectors p0
, p1
, and p2
, 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 3D 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 set
, where eN
is equal to e0
, e1
, or e2
vector; pN
is equal to p0
, p1
, or p2
vector; n
is equal to direction in 3D square lattice.
Moore (1,d)-neighborhood on 3D square lattice consists of sites, at least one coordinate of which is different from the current site by one: e=c(e0,e1,e2)
, wheree0=c(-1,
1,
-x,
x,
-x^2,
x^2)
;e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4,
1,5,
2,5,
1,6,
2,6,
3,5,
4,5,
3,6,
4,6)], nrow=2))
;e2=colMeans(matrix(p0[c(1,3,5,
2,3,5,
1,4,5,
2,4,5,
1,3,6,
2,3,6,
1,4,6,
2,4,6)], nrow=3))
.
Minkowski distance between sites a
and b
depends on the exponent d
:rho.mink <- 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
and e2
subsets with the exponent d=1
is equal to rhoMe1=2
and rhoMe2=3
.
Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 3D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.
fssa3d, ssa2d, ssa20, ssa30, ssi2d, ssi3d
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120521) x <- y <- z <- seq(33) cls <- which(ssa3d(p0=.09*c(1,6,1,3,2,1))>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Anisotropic (1,1)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120521) x <- y <- z <- seq(33) cls <- ssa3d(p0=.09*c(1,6,1,3,2,1)) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an anisotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120521) x <- y <- z <- seq(33) cls <- which(ssa3d(p0=.09*c(1,6,1,3,2,1))>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Anisotropic (1,1)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120521) x <- y <- z <- seq(33) cls <- ssa3d(p0=.09*c(1,6,1,3,2,1)) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an anisotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssi20()
function provides sites labeling of the isotropic cluster on 2D square lattice with von Neumann (1,0)-neighborhood.
ssi20(x=33, p=0.592746, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
ssi20(x=33, p=0.592746, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 2D square percolation lattice. |
p |
the relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset.
To form the cluster the condition acc[set+e]<p
is iteratively tested for sites of the von Neumann (1,0)-neighborhood e
for the current cluster perimeter set
.
Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x)
.
Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.
acc |
an accessiblity matrix for 2D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.
fssi20, ssi30, ssa20, ssa30, ssi2d, ssi3d
set.seed(20120507) x <- y <- seq(33) image(x, y, ssi20(), zlim=c(0,2), main="Isotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
set.seed(20120507) x <- y <- seq(33) image(x, y, ssi20(), zlim=c(0,2), main="Isotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssi2d()
function provides sites labeling of the isotropic cluster on 2D square lattice with Moore (1,d)-neighborhood.
ssi2d(x=33, p0=0.5, p1=p0/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
ssi2d(x=33, p0=0.5, p1=p0/2, set=(x^2+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 2D square percolation lattice. |
p0 |
a relative fraction |
p1 |
|
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
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 constant parameters p0
and p1
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
To form the cluster the condition acc[set+eN]<pN
is iteratively tested for sites of the Moore (1,d)-neighborhood eN
for the current cluster perimeter set
, where eN
is equal to e0
or e1
vector; pN
is equal to p0
or p1
value.
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: e=c(e0,e1)
, where e0=c(-1,
1,
-x,
x,
-x^2,
x^2)
; e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4)], nrow=2))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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 rhoMe1=2
.
Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 2D square percolation lattice: |
Pavel V. Moskalev <[email protected]>
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.
fssi2d, ssi3d, ssi20, ssi30, ssa2d, ssa3d
set.seed(20120507) x <- y <- seq(33) image(x, y, ssi2d(), zlim=c(0,2), main="Isotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
set.seed(20120507) x <- y <- seq(33) image(x, y, ssi2d(), zlim=c(0,2), main="Isotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssi30()
function provides sites labeling of the isotropic cluster on 3D square lattice with von Neumann (1,0)-neighborhood.
ssi30(x=33, p=0.311608, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
ssi30(x=33, p=0.311608, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 3D square percolation lattice. |
p |
the relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites acc
and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
To form the cluster the condition acc[set+e]<p
is iteratively tested for sites of the von Neumann (1,0)-neighborhood e
for the current cluster perimeter set
.
Von Neumann (1,0)-neighborhood on 3D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x,
-x^2,
x^2)
.
Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.
acc |
an accessiblity matrix for 3D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.
fssi30, ssi20, ssa20, ssa30, ssi2d, ssi3d
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120507) x <- y <- z <- seq(33) cls <- which(ssi30(p=.285)>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Isotropic (1,0)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120507) cls <- ssi30(p=.285) x <- y <- z <- seq(33) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an isotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120507) x <- y <- z <- seq(33) cls <- which(ssi30(p=.285)>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Isotropic (1,0)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120507) cls <- ssi30(p=.285) x <- y <- z <- seq(33) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an isotropic (1,0)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
ssi3d()
function provides sites labeling of the isotropic cluster on 3D square lattice with Moore (1,d)-neighborhood.
ssi3d(x=33, p0=0.2, p1=p0/2, p2=p0/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
ssi3d(x=33, p0=0.2, p1=p0/2, p2=p0/3, set=(x^3+1)/2, all=TRUE, shape=c(1,1))
x |
a linear dimension of 3D square percolation lattice. |
p0 |
a relative fraction |
p1 |
|
p2 |
|
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
The percolation is simulated on 3D square lattice with uniformly weighted sites acc
and the constant parameters p0
, p1
, and p2
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset set
.
To form the cluster the condition acc[set+eN]<pN
is iteratively tested for sites of the Moore (1,d)-neighborhood eN
for the current cluster perimeter set
, where eN
is equal to e0
, e1
or e2
vector; pN
is equal to p0
, p1
or p2
value.
Moore (1,d)-neighborhood on 3D square lattice consists of sites, at least one coordinate of which is different from the current site by one: e=c(e0,e1,e2)
, wheree0=c(-1,
1,
-x,
x,
-x^2,
x^2)
;e1=colSums(matrix(e0[c(1,3,
2,3,
1,4,
2,4,
1,5,
2,5,
1,6,
2,6,
3,5,
4,5,
3,6,
4,6)], nrow=2))
;e2=colMeans(matrix(p0[c(1,3,5,
2,3,5,
1,4,5,
2,4,5,
1,3,6,
2,3,6,
1,4,6,
2,4,6)], nrow=3))
.
Minkowski distance between sites a
and b
depends on the exponent d
: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
and e2
subsets with the exponent d=1
is equal to rhoMe1=2
and rhoMe2=3
.
Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.
acc |
an accessibility matrix for 3D square percolation lattice: |
Pavel V. Moskalev
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.
fssi3d, ssi2d, ssi20, ssi30, ssa2d, ssa3d
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120507) x <- y <- z <- seq(33) cls <- which(ssi3d(p0=.285)>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Isotropic (1,1)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120507) cls <- ssi3d(p0=.285) x <- y <- z <- seq(33) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an isotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)
# Example No.1. Axonometric projection of 3D cluster require(lattice) set.seed(20120507) x <- y <- z <- seq(33) cls <- which(ssi3d(p0=.285)>1, arr.ind=TRUE) cloud(cls[,3] ~ cls[,1]*cls[,2], xlim=range(x), ylim=range(y), zlim=range(z), col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1, main="Isotropic (1,1)-cluster") # Example No.2. Z=17 slice of 3D cluster set.seed(20120507) cls <- ssi3d(p0=.285) x <- y <- z <- seq(33) image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, main="Z=17 slice of an isotropic (1,1)-cluster") abline(h=17, lty=2); abline(v=17, lty=2)