Description Usage Arguments Details Value Author(s) Examples
Planar intersection of spheres
1 | planarSection(S, d, intern = FALSE, pl = 0)
|
S |
list of spheres of class |
d |
distance of the (planar) xy-plane to the origin |
intern |
logical, |
pl |
print level, |
The function computes the planar intersection of a sphere system, i.e. an intersection with the plane whose normal
vector is given by c(0,0,1)
and returns the diameters of the resulting discs.
numeric vector of disc diameters
M. Baaske
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | lam <- 100
# parameter rlnorm distribution (radii)
theta <- list("size"=list("meanlog"=-2.5,"sdlog"=0.5))
# simulation bounding box
box <- list("xrange"=c(0,5),"yrange"=c(0,5),"zrange"=c(0,5))
# simulate only 3D system
S <- simPoissonSystem(theta,lam,size="rlnorm",box=box,type="spheres",
intersect="original", pl=1)
# return only objects whose centers are within
# the intersection window
sp <- planarSection(S,d=2.5,intern=TRUE,pl=1)
# histogram of diameters
hist(sp)
summary(sp)
# distribution of radii
mean(log(sp/2))
sd(log(sp/2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.