{x : Ax = 0}
instead
LazySets.minkowski_sum
.
minkowski_sum
, didn't even think to check the operators...
julia> h = HalfSpace([1], 1) ∩ HalfSpace([-1], 0)
H-representation Polyhedra.Intersection{Int64,Array{Int64,1},Int64}:
2-element iterator of HalfSpace{Int64,Array{Int64,1}}:
HalfSpace([1], 1)
HalfSpace([-1], 0)
julia> p = polyhedron(h)
Polyhedron Interval{Int64,StaticArrays.SArray{Tuple{1},Int64,1,1},StaticArrays.Size{(1,)}}:
2-element iterator of HalfSpace{Int64,StaticArrays.SArray{Tuple{1},Int64,1,1}}:
HalfSpace([1], 1)
HalfSpace([-1], 0):
2-element iterator of StaticArrays.SArray{Tuple{1},Int64,1,1}:
[1]
[0]
julia> similar(p, Polyhedra.FullDim(p), Polyhedra.coefficient_type(p), hyperplanetype(p)[], halfspacetype(p)[])
Polyhedron Interval{Int64,StaticArrays.SArray{Tuple{1},Int64,1,1},StaticArrays.Size{(1,)}}:
1-element iterator of StaticArrays.SArray{Tuple{1},Int64,1,1}:
[0],
1-element iterator of Line{Int64,StaticArrays.SArray{Tuple{1},Int64,1,1}}:
Line([1])
\in[TAB]
for the symbol)
in(x, P)
x
belongs to each and every half-space defining P
Hello all, long time no messages, I hope everybody is well. I have a few questions if that's alright:
Polyhedron
? A sort of roundabout way I got working would use MeshIO to load it, then decompose it into an Array{Point{3, Float64}, 2}
, then recollect that into an Array{Float64, 3}
, which I then feed into vrep
. There must be some better way...translate
function is extremely useful for a moving object; would it also be possible to implement a rotate
function, taking a rotation matrix? I have multiple polyhedral rigid bodies translating and rotating through space and I need to compute their intersection volume when collisions happen - I would like to minimise the V- to H-representation conversions, so if we could translate and rotate both of these without creating new Polyhedron
s, it would be amazing!translate
function's source code, it seems that we're losing the V-representation if the H- one exists. Could we translate both representations if available? It would mean creating new Polyhedron
s with both V- and H- representations defined, so we'd have to ensure both refer to the same spatial object. Also, could we define an in-place translate!
function to avoid creating new objects?And a more open / subjective one:
JuliaGeometry
stack, specifically Meshes.jl
and GeometryBasics
? E.g. creating Polyhedral approximations from the more continuous types there, like cones, cylinders or spheres? Both the JuliaPolyhedra
and JuliaGeometry
stacks are in most cases complementary, so perhaps merging or at least closer side-by-side development would be very helpful for a powerful geometry stack!Hi @mforets , thanks for taking the time to look into this, the resources you included here are very helpful! LazySets
does include most of what I need, even more so than Polyhedra
(which it does seem to build and expand upon) - thank you for developing and maintaining it. As I said, I would like to use it in accurate force models for rigid bodies (granular media specifically) which need intersection volume computations; this is rather hard to implement so most simulators today use gross approximations. Though LazySets
was not specifically developed for rigid body dynamics, do you think it would be suitable as an efficient backend for more complex geometric operations?
I will post two new issues on Polyhedra.jl
about rotation and in-place functions.
Regarding point one, the inverse of decompose
is exactly what I need, for the very common mesh representations like STL, OBJ (which are what 3D modelling software use) - it would be useful to model complex shapes in a specialised graphical CAD-like program, then use LazySets.jl
for the heavy maths.
If I seem to be chatting bollocks please call me out, my mathematical background is rather different from convex analysis and I do seem to want to use those packages in a non-standard way.
hi @anicusan, about
Though LazySets was not specifically developed for rigid body dynamics, do you think it would be suitable as an efficient backend for more complex geometric operations?
i can't tell without knowing in more detail what kind of algorithm you'd like to implement. with sets, there are many ways to do the same computation (either lazily, or concretely, or a combination of those, depends on which set representation is used, how does it behave with the dimensions, closedness under set operations linear map, minkowski sum, convex hull, intersection, and so on)
which need intersection volume computations; this is rather hard to implement so most simulators today use gross approximations.
ok. the intersection of zonotopes is not necessarily a zonotope but you could use lazysets to simplify the intersection by overapproximating (or underapproximating) and get a better estimate. along the lines of : https://juliareach.github.io/LazySets.jl/dev/man/lazy_intersections/