Generate X-Y grid for 2D bounded polyhedra.
[X,Y] = P.meshGrid
[X,Y] = P.meshGrid(N)
[X,Y] = meshGrid(P,N)
P |
Polyhedron given by V- or H-representation in dimension 2. Class: Polyhedron |
N |
The number of points for gridding. The value must be positive and integer-valued. Class: double Default: 20 |
X |
Matrix with x-coordinates of the grid values. Class: double |
Y |
Matrix with y-coordinates of the grid values. Class: double |
P = ExamplePoly.randVrep;Grid the polyhedron
[X,Y] = P.meshGrid;Define Z coordinate as
Z=10./(1+exp((X-Y).^2));Plot the Polyhedron and the Z values.
plot(P,'color','limegreen','alpha',0.4); hold on; surf(X,Y,Z); view(3);
◀ | be | ge | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch