Intersect two polyhedra.
PnS = intersect(P, S)
P |
Polyhedron in any format Class: Polyhedron |
S |
Polyhedron in any format Class: Polyhedron |
PnS |
Intersection of ![]() ![]() Class: Polyhedron |
P = ExamplePoly.randVrep;
S = ExamplePoly.randHrep;
PnS = intersect(P,S)
Polyhedron in R^2 with representations: H-rep (redundant) : Inequalities 15 | Equalities 0 V-rep : Unknown (call computeVRep() to compute) Functions : none
plot([P;S],'alpha',0.1);hold on; plot(PnS,'color','r','alpha',0.6);
P = Polyhedron('V', [1 1;0 1;1 0], 'R', -[1 0]);
S = Polyhedron('H', [randn(10,2) 4*ones(10,1)]);
PnS = intersect(P,S)
Polyhedron in R^2 with representations: H-rep (redundant) : Inequalities 13 | Equalities 0 V-rep : Unknown (call computeVRep() to compute) Functions : none
plot(P,'color','b','alpha',0.1);hold on; plot(S,'color','g','alpha',0.1); plot(PnS,'color','r','alpha',0.6);
P = Polyhedron('lb',-0.5*ones(3,1), 'ub', 0.5*ones(3,1));
S = Polyhedron('R', [-1 0 .5;-1 2 2]);
PnS = intersect(P,S)
Polyhedron in R^3 with representations: H-rep (redundant) : Inequalities 8 | Equalities 1 V-rep : Unknown (call computeVRep() to compute) Functions : none
plot(P,'color','b','alpha',0.1);hold on; plot(S,'color','g','alpha',0.1); plot(PnS,'color','r','alpha',1);
◀ | le | outerapprox | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch