Subtract a Polyhedron or a vector from a Polyhedron.
Q = P - S
Q = minus(P,S)
Q = P - x
Q = minus(P, x)
P |
Polyhedron in any format Class: Polyhedron |
S |
Polyhedron in any format Class: Polyhedron |
x |
Column vector of length P.Dim
Class: Polyhedron |
Q |
Polyhedron Q = P-S or Q = P-x. Class: Polyhedron |
P = Polyhedron('H',[sin([0:0.5:2*pi])' cos([0:0.5:2*pi])' ones(13,1)]);
S = Polyhedron('lb',[-1;-1]*0.1,'ub',[1;1]*0.1);
Q = P-S;
P.plot('color','b'); hold on; Q.plot('color','g'); S.plot('color','r');
P = Polyhedron('H',[sin([0:0.5:2*pi])' cos([0:0.5:2*pi])' ones(13,1)]);
S = Polyhedron('V', 0.1*[-1 1;1 -1]);
Q = P-S;
P.plot('color','b'); hold on; Q.plot('color','r'); S.plot('color','g','linewidth',2);
P = Polyhedron('lb',-[1;1;1]*0.5,'ub',[1;1;1]*0.5,'He',[randn(1,3) 0.1]);
S = Polyhedron('V',randn(10,3),'R',[1 1 1])+[1;1;1];
Q = S-P;
P.plot('color', 'g'); hold on; S.plot('color', 'b'); Q.plot('color','r');
◀ | ge | ispointed | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch