enclose a point in a box avoiding real polynomial constraints
EnclosingBox(constraints, point, output=format)
EnclosingBox(constraints, pointlist, output=format)
EnclosingBox(constraints, variables, values, output=format)
EnclosingBox(constraints, variables, valueslist, output=format)
polynomial or list of polynomials; the constraints
list or set of coordinates of the form name=numeric
list of list (or set) of coordinates of the form name=numeric
list of names
list of numeric values; the coordinates
list of list of numeric values; the coordinates
decomposition data structure (returned from CellDecomposition)
(optional) type of output: either list or plot
The EnclosingBox function computes a rectangular box containing a point defined by point or by variables and values. The main property of the returned box is that its interior has an empty intersection with the real roots of the polynomials given in constraints.
The box returned is maximal in the sense that the borders of the box contain at least one real root of the constraint polynomials.
constraints is a polynomial p (or a list of polynomials p1,...,pk) with rational coefficients. EnclosingBox computes a box that contains no real root of p (or, for a list, no real root of any of the polynomials p1,...,pk) in its interior.
In the EnclosingBox(constraints, variables, values) calling sequence, variables is a list of variable names v1,...,vn and values is a list of numerical values r1,...,rn. These are used to specify a point, described by the coordinates v1=r1,...,vn=rn.
pointlist and valueslist can be used to specify a list of points. In this case, an enclosing box will be computed for each point.
In the last calling sequence, decomposition is a data structure returned by the command CellDecomposition. The constraints are taken from the field decomposition:-DiscriminantVariety and the points coordinates are taken from decomposition:-SamplePoints
You can specify the output format. If output = list, the output is a box described by a set of intervals of the form name=rational,rational where name is a variable and the two numerics are the bound of the interval. This is the default.
If output=plot and the number of variable is less than or equal to 3, then the output is a plot that displays the point, the enclosing box, and the constraints.
The following example shows the box enclosing the origin inside a circle:
p ≔ x2+y2−1
inbox ≔ EnclosingBox⁡p,x=0,y=0:
A second box, outside the circle:
outbox ≔ EnclosingBox⁡p,x=1,y=1:
Compute and display both boxes together with the circle.
Alternatively, use the following calling sequence, specifying variables and values individually:
This example uses EnclosingBox in connection with WitnessPoints to cover all the connected open cells.
pts ≔ WitnessPoints⁡p≠0
This example uses EnclosingBox on the output from CellDecomposition.
dec ≔ CellDecomposition⁡x6+a⁢y2−a=0,a3⁢x6+a⁢y2−b=0,x,y:
Download Help Document