Generation of (non)intersecting simplices/points
Points inside/outside a simplex
Given a simplex, the following points can generate a point or simplices that lies either in the interior or outside that simplex.
Simplices.insidepoints
— Method.insidepoints(npts::Int, parentsimplex::Array{T, 2}) where {T<:Number}
Generates npts
points that located inside parentsimplex
.
Simplices.outsidepoint
— Method.outsidepoint(parentsimplex::Array{T, 2}) where {T<:Number}
Generate a single point that is guaranteed to lie outside parentsimplex
.
Simplices.outsidepoints
— Method.outsidepoints(npts::Int, parentsimplex::Array{T, 2}) where T <: Number
Generates npts
points that located outside parentsimplex
.
Simplices.childsimplex
— Method.childsimplex(parentsimplex::Array{T, 2}) where {T<:Number} -> Array{Float64, 2}
Generates a random simplex which is entirely contained within parentsimplex
, which is a (dim+1)-by-dim array.
Generating simplices that intersect
There are many ways simplices possibly can intersect, but they all boil down to three cases: 1) there is no intersection, 2) they intersect along a common vertex or boundary, or 3) the intersection is more complex. The following functions generate simplices that either share at least one vertex, or simplices that intersect in nontrivial ways (i.e. intersection is not along a vertex or an edge).
simplices_sharing_vertices(dim::Int)
nontrivially_intersecting_simplices(dim::Int)