Tetrahedron
LazySets.TetrahedronModule.Tetrahedron — TypeTetrahedron{N, VN<:AbstractVector{N}, VT<:AbstractVector{VN}} <: AbstractPolytope{N}Type that represents a (3-dimensional) tetrahedron in vertex representation.
Fields
vertices– list of vertices
Examples
A tetrahedron can be constructed by passing the list of vertices. The following builds the tetrahedron with edge length 2 from the wikipedia page Tetrahedron:
julia> vertices = [[1, 0, -1/sqrt(2)], [-1, 0, -1/sqrt(2)], [0, 1, 1/sqrt(2)], [0, -1, 1/sqrt(2)]];
julia> T = Tetrahedron(vertices);
julia> dim(T)
3
julia> zeros(3) ∈ T
true
julia> σ(ones(3), T)
3-element Vector{Float64}:
0.0
1.0
0.7071067811865475Operations
Base.:∈ — Method∈(x::AbstractVector, X::LazySet)Check whether a point lies in a set.
Input
x– point/vectorX– set
Output
true iff $x ∈ X$.
Base.:∈ — MethodExtended help
∈(x::AbstractVector, T::Tetrahedron)Algorithm
For each plane of the tetrahedron, we check if the point x is on the same side as the remaining vertex. We need to check this for each plane.
LazySets.API.σ — Methodσ(d::AbstractVector, X::LazySet)Compute a support vector of a set in a given direction.
Input
d– directionX– set
Output
A support vector of X in direction d.
Notes
The convenience alias support_vector is also available.
LazySets.API.σ — MethodExtended help
σ(d::AbstractVector, T::Tetrahedron)Algorithm
This method falls back to the VPolytope implementation.
Undocumented implementations:
Inherited from LazySet:
complementareachebyshev_center_radiusconcretizeconstraintsconvex_hullcopy(::Type{LazySet})diametereltypeeltypeisoperationispolytopicnormpolyhedronradiusrationalizerectifyreflectsingleton_listtosimplehreptriangulatetriangulate_facesverticesaffine_mapexponential_mapis_interior_pointlinear_mapsamplescaleρtranslatecartesian_productconvex_hullexact_sumisapprox==isequivalent⊂minkowski_difference
Inherited from ConvexSet:
Inherited from AbstractPolyhedron:
an_elementextremaextremahighhighispolyhedralispolyhedraltypelowlowvertices_listprojectintersectionisdisjoint
Inherited from AbstractPolytope: