Project a point onto the given polyhedron.
ret = P.project(x)
ret = project(P, x)
P |
Polyhedron in any format Class: Polyhedron |
y |
Vector of size P.Dim that represent single point ![]() ![]() Class: double |
ret |
Optimal solution Class: struct |
ret.x |
Projected point or [] if ![]() |
ret.exitflag |
Informs about the termination status of the optimization problem. Class: double Allowed values:
|
ret.dist |
Distance from ![]() ![]() |
P = ExamplePoly.poly3d_sin;Choose a point and project:
y = [2;2];
ret = P.project(y);Plot the result
P.plot; hold on; pplot([ret.x';y'],'or'); axis square; th=linspace(0,2*pi,100)'; pplot(ret.dist*[sin(th) cos(th)]+repmat(y',100,1),'k');
◀ | eq | incidencemap | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch