The traits class Arr_Bezier_curve_traits_2<RatKernel,AlgKernel,NtTraits> is a model of the ArrangementTraits_2 concept that handles planar Bézier curves. A planar Bézier curve $$B is a parametric curve defined by a sequence of control points $$p_{0}, ..., p_{n} as follows:
$$
B(t) = (X(t), Y(t)) = _{k=0}^{n}p_{k} · (n!)/(k! (nk)!) · t^{k} (1t)^{nk} . 
where $$t [0, 1]. The degree of the curve is therefore $$n  namely, $$X(t) and $$Y(t) are polynomials of degree $$n. Bézier curves have numerous applications in computer graphics and solid modelling. They are used, for example, in freeform sketches and for defining the truetype fonts.
In our representation, we assume that the coordinates of all control points are rational numbers (namely they are given as objects of the RatKernel::Point_2 type), so both $$X(t) and $$Y(t) are polynomials with rational coefficients. The intersection points between curves are however algebraic numbers, and their exact computation is timeconsuming. The traits class therefore contains a layer of geometric filtering that performs all computation in an approximate manner whenever possible, and it resorts to exact computations only when the approximate computation fails to produce an unambiguous result.
We therefore require separate representations of the control points and the intersection points. The NtTraits should be instantiated with a class that defines nested Integer, Rational and Algebraic number types and supports various operations on them, yielding certified computation results (for example, in can convert rational numbers to algebraic numbers and can compute roots of polynomials with integer coefficients). The other template parameters, RatKernel and AlgKernel should be geometric kernels templated with the NtTraits::Rational and NtTraits::Algebraic number types, repectively. It is recommended to instantiate the CORE_algebraic_number_traits class as the NtTraits parameter, with Cartesian<NtTraits::Rational> and Cartesian<NtTraits::Algebraic> instantiating the two kernel types, respectively. The number types in this case are provided by the CORE library, with its ability to exactly represent simple algebraic numbers.
#include <CGAL/Arr_Bezier_curve_traits_2.h>
The Curve_2 class nested within the Bézier traits class is used to represent a Bézier curve of arbitrary degree, which is defined by a sequence of rational control points. The only resriction we have is that the curve does not contain any selfintersections. In addition to the methods listed below, the I/O operators operator<< and operator>> for standard output streams are also supported. The copy constructor and assigment operator are also supported.
 
default constructor.
 
 
 
constructs a Bézier curve as defined by the given range of control
points. The valuetype of InputIterator is RatKernel::Point_2.


 returns the number of control points that define B.  


returns the $$kth control point. Note that the first control point equals
the curve source, while the last control point equals its target. The rest
of the control points do not lie on the curve.
 

 returns the point $$B(t) on the curve that corresponds to the given rational parameter value.  

 returns the point $$B(t) on the curve that corresponds to the given algebraic parameter value. 
The Point_2 class nested within the Bézier traits class is used to represent: (i) an endpoint of a Bézier curve, (ii) a vertical tangency point of a curve, used to subdivide it into $$xmonotone subcurve, and (iii) an intersection point between two curves. While, points of type (i) have rational coordinates and are given as part of the input, points of the two latter types have algebraic coordinates. However, to speed up the arrangement construction, such point are not computed in an exact manner, and instead are given in an approximate representation. Note that the exact coordinates of a point may only be accessed if it is exactly computed.
In addition to the methods listed below, the copy constructor and assigment operator for Point_2 objects are also supported.
 
default constructor.
 
 
constructs the point $$B(t_{0}) on the given curve. As $$t_{0} is an
algebraic number, the point has algebraic coordinates.
 
 
constructs the point $$B(t_{0}) on the given curve. As $$t_{0} is a
rational number, the point has rational coordinates.


 returns the approximated coordinates of p.  

 returns whether the coordinates of p are computed in an exact manner.  


returns the $$xcoordinate of p.
 


returns the $$ycoordinate of p.
 

 returns whether the coordinates of p are rational numbers.  

 
casts p to a point with rational coordinates.

The X_monotone_curve_2 class nested within the Bézier traits is used to represent $$xmonotone subcurves of Bézier curves. The subcurve is defined by a supporting Bézier curve $$B(t) and a range of definition in the parameter space $$[t_{1}, t_{2}] [0, 1], where $$B(t_{1}) is the subcurve source and $$B(t_{2}) is its target. Note that as the point endpoints may only be approxiamted, the parameter range definining the subcurve may only be approximately known.
It is not possible to construct $$xmonotone subcurves directly. Instead, use the Make_x_monotone_2 functor supplied by the traits class to subdivide a Curve_2 object into $$xmonotone cubcurves.

 returns the supporting Bézier curve of b. 

 returns the source point of b. 

 returns the target point of b. 

 returns the left ($$xylexicographically smaller) endpoint of b. 

 returns the right ($$xylexicographically smaller) endpoint of b. 

 return the approximate parameter range defining the subcurve b. 