Overview

Simplices.jl documentation

Julia package for computing exact intersection volumes between n-dimensional simplices.

Release info

Version 0.6.2 of the package is preliminary and only works for Julia 0.6. Volume computations have been tested for up to dimension 10, but the code is messy. A cleaned up version will be released for Julia 1.0.

Usage

Simplex intersections are computed by calling simplexintersection with the simplices in question. The simplices must be arrays of size (dim, dim + 1), so that each vertex of the simplex is a column vector.

Simplex properties can also be computed for individual simplices. There are also some functions that can be used to generate pairs of simplices that overlap in certain ways, or points that lie either outside or inside a simplex (Generation of (non)intersecting simplices/points).

3D example

julia> using Simplices

julia> s₁, s₂ = rand(3, 4), rand(3, 4)
([0.351273 0.326853 0.402484 0.0292826; 0.0555226 0.425771 0.381409 0.828552; 0.972965 0.406825 0.199276 0.926748], [0.626663 0.989444 0.545463 0.453874; 0.833137 0.937704 0.397698 0.295763; 0.634586 0.818864 0.702137 0.11973])

julia> simplexintersection(s₁, s₂)
0.0

5D example

julia> using Simplices

julia> s₃, s₄ = rand(4, 5), rand(4, 5)
([0.777926 0.620857 … 0.8519 0.992835; 0.296439 0.434767 … 0.712658 0.294525; 0.55773 0.0880637 … 0.885632 0.818997; 0.16431 0.80062 … 0.810457 0.844555], [0.551828 0.963175 … 0.225292 0.609883; 0.243429 0.601787 … 0.436189 0.0783606; 0.950914 0.884803 … 0.372578 0.607932; 0.094653 0.11534 … 0.435983 0.400702])

julia> simplexintersection(s₃, s₄)
0.00013196937924059486