Add a Polyhedron and a vector or Polyhedron.
Q = P + S
Q = plus(P,S,method)
Q = P + x
Q = plus(P, x)
P |
Polyhedron in any format Class: Polyhedron |
S |
Polyhedron in any format or a point given as column real vector of the length P.Dim
Class: Polyhedron or double |
method |
String selecting the projection method to be used. Can be 'vrep', 'fourier', or 'mplp'. Class: string |
Q |
Polyhedron Q = P+S. Class: Polyhedron |
P = Polyhedron('H',[sin([0:0.5:2*pi])' cos([0:0.5:2*pi])' ones(13,1)]);
Q = P + [2;2];
plot([P;Q],'alpha',0.1);
P = Polyhedron('H',[sin([0:0.5:2*pi])' cos([0:0.5:2*pi])' ones(13,1)]);
S = Polyhedron('lb',[-1;-1],'ub',[1;1]);
Q = P + S;
Q.plot('color','r','alpha',0.2); hold on; S.plot('color','b','alpha',0.5); P.plot('color','g','alpha',0.5);
P = Polyhedron('H',[sin([0:0.5:2*pi])' cos([0:0.5:2*pi])' ones(13,1)]);
S = Polyhedron('R', [1 1;1 0.5]);
Q = P + S;
Q.plot('color','r','alpha',0.5); hold on; S.minus([5;0]).plot('color','b','alpha',0.5); P.minus([2.5;0]).plot('color','g','alpha',0.5);
P = Polyhedron('lb',-ones(3,1),'ub',ones(3,1),'He',[1 1 1 0.2]);
S = Polyhedron('lb',-ones(3,1),'ub',ones(3,1),'He',[-1 1 1 0.4]);
Q = P + S;
P.plot('color','g','alpha',0.5); hold on; S.plot('color','b','alpha',0.5); Q.plot('color','r','alpha',0.2);
Z = Polyhedron;
for (i=1:5) Z = Z + Polyhedron('V',[0 0 0;randn(1,3)]); end;
Z.plot('color','b','alpha',0.7);
◀ | volume | mldivide | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch