Slice the polyhedron through given dimensions at specified values.
S = P.slice(dims, values)
S = slice(P, dims, values)
S = P.slice(dims, values, 'keepDim', true/false)
P |
Polyhedron in any format Class: Polyhedron |
dims |
Dimensions to cut through Class: double |
values |
Set of values at which to compute the slices. Class: double Default: 0 |
S |
Polyhedron that represents the cut of the polyhedron P over the specified dimensions. Class: Polyhedron |
P = ExamplePoly.poly3d_sin('d',3);Compute slices over the dimension 2 but preserve the dimension
S = P.slice(2,0,'keepDim',true);Plot the result
P.plot('alpha',0.2,'color','lightblue'); hold on; S.plot('color','blue','alpha',0.2,'linestyle','--','linewidth',3); axis tight;
v = [-7, -3, -10, 2; 1,-5, 6, 8; -2, 6, -5, -5; 4, -4, 9, -8; 3, -4, 5, -3];
P = Polyhedron(v);Slice it over dimensions 2 and 4 at values [1;-5]
S = P.slice([2,4], [1;-5])
Polyhedron in R^2 with representations: H-rep (redundant) : Inequalities 5 | Equalities 0 V-rep : Unknown (call computeVRep() to compute) Functions : noneThe resulting polyhedron S is in reduced dimension and can be plotted.
S.plot('color','green','alpha',0.5);
◀ | chebycenter | extreme | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch
© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk