intersectSystem: Intersection in 3D

Description Usage Arguments Details Value Author(s) Examples

View source: R/spheroid.R

Description

Intersect a system of spheres, spheroids or spherocylinders by a plane

Usage

1
intersectSystem(S, d, n = c(0, 1, 0), intern = FALSE, pl = 0)

Arguments

S

list of spheres, spheroids or spherocylinders, see simPoissonSystem

d

distance of the the box-aligned intersecting plane from the origin

n

normal vector which defines the intersecting plane

intern

logical, FALSE (default), return all section profiles otherwise only those which have their centers inside the corresponding intersection window (if the intersected system had been simulated using exact simulation this makes sense)

pl

integer, pl=0 (default), for no verbose output and otherwise a full specification list of section profiles in case of sphere and spheroid intersections

Details

The function intersects a given (Poisson) system made of spheres, spheroids or cylinders as grains by a plane defined by a normal vector, e.g. n=c(0,1,0), perpendicular to one of the bounding planes of the simulation box. For a print level pl>=0 some verbose output is given. Also it sets the type of return value. In case of spheroid intersections, setting pl=10, leads to a short version of the full specification return list of section profiles with elements named A (major semi-axis), C (minor semi-axis), S (the shape factor as the ratio of these two) and phi as the angle in the intersecting plane between [0,2π] w.r.t. the 'x' axis. Otherwise additional components are returned such as the ellipse's rotation matrix, also named A, the center point center and a constant type=10 (defining the object of full ellipses among other types of intersection objects) of the section profiles. For sphere intersections only a numeric vector of disc radii are returned as a short version of return values.

Value

For spheroid intersections the function returns a list of size, shape and angle of section profiles or a short version of it; for sphere intersections either radii or lists containing the centers of discs and the object number.

Author(s)

M. Baaske

Examples

1
2
3
4
5
6
7
8
9
 box <- list("xrange"=c(0,5),"yrange"=c(0,5),"zrange"=c(0,5))
 
 # constant size-shape orientation distribution (spheroids)
 theta <- list("size"=list(0.1),"shape"=list(0.5), "orientation"=list("kappa"=10))

 S <- simPoissonSystem(theta,lam=100,box=box,type="prolate",pl=1)
 
 # return short version of section profiles
 sp <- intersectSystem(S, 2.5, pl=10)		

unfoldr documentation built on Sept. 25, 2021, 1:07 a.m.