where is the Bernstein basis in degree
, on the interval
. The polynomial
will be represented by its control coefficients
and the domain
. It can be subdivided by applying the de Casteljau algorithm, in the
and
direction.
The subdivision algorithm is based on a criterion for detecting the regularity of the curve , in the domain
.
Definition: We say that a domain ![]() ![]() ![]() ![]() ![]() ![]() |
Here is a property that we use to detect regular domains:
Proposition: If ![]() ![]() ![]() ![]() ![]() |
The test is implemented by checking that the control coefficients of or
on D have a constant sign, which implies the previous proposition.
Algorithm: Subdivision algorithm for implicit curves.
input:
![]() |
void topology::assign(point_graph<C> & g, MPol<QQ>& p, TopSbdBdg2d<C> mth, C x0, C x1, C y0, C y1);
g
of type topology::point_graph<C>
, which is isotopic to the curve defined by the polynomial p
, in the box g
are of type C
. The implementation is designed for C=double
.p
are rational numbers. During the computation, they are rounded to double
number types. If the topology in the box can be certified from this approximation, a graph of points connecting the intersection of the curve with the boundary of TopSbdBdg2d<C>
. The default value is synaps/topology/TopSbdBdg2d.h
, TopSbdBdg
.#include <synaps/topology/TopSbdBdg2d.h> int main(int argc, char** argv) { MPol<QQ> p("x^6+3*x^4*y^2+3*x^2*y^4+y^6-4x^2*y^2"); topology::point_graph<double> g; topology::assign(g, p, TopSbdBdg2d<double>(), -2., 2.1, -2.2, 2., 2); }
Here is a picture of such output:
![]() |