next up previous contents
Next: Continuation for one dimensional Up: Examples Previous: Example 1   Contents

Example 2

Consider the problem of finding the coordinates $x,y,z$ of a point that lie on the surface $x^3+y^3+z^3+1-(x+y+z+1)^2$, is inside the sphere centered at (-1,-1,0) of radius 1 and is the closest possible to the center of this sphere, with the constraint that $x,y,z$ lie in the range [-2,2]. Thus we have:

&&H(X)=(x+1)^2+(y+1)^2+z^2-1 \le 0

With epsilonf=0.0001 we find out that the point is located at at (-0.747,-0.747,0.086059) which is well inside the sphere and that the minimal distance is 0.13529.

We may also compute the minimal distance not to a point but to a line segment, for example defined by $x \in [0.9,1.1]$, $y=-1$, $z=0$. In that case the optimum function in the evaluation procedure may be defined as:

and with epsilonf=0.0001 the algorithm will return that the minimal distance lie in the range [0.0907,0.1925].

Jean-Pierre Merlet 2012-12-20