10 for(
unsigned vi = 0; vi < a.
vs; vi++) {
13 for(
unsigned ui = 0; ui < a.
us; ui++) {
27 for(
unsigned ui = 0; ui < a.
us; ui++) {
30 for(
unsigned vi = 0; vi < a.
vs; vi++) {
42 return multiply(omp[0], omp[1])*a[0] +
53 for(
unsigned dim = 0; dim < 2; dim++)
54 s[dim] = p[dim]*(
Linear(1) - p[dim]);
56 for(
unsigned vi = 0; vi < fg.
vs; vi++) {
58 for(
unsigned ui = 0; ui < fg.
us; ui++) {
59 unsigned i = ui + vi*fg.
us;
75 for(
unsigned i = 0; i < f.size(); i++) {
81 for(
unsigned i = 0; i < f.
us; i++) {
82 for(
unsigned j = 0; j < f.
vs; j++) {
84 Linear2d dlin(lin[1+dim]-lin[0], lin[1+2*dim]-lin[dim], lin[3-dim]-lin[2*(1-dim)], lin[3]-lin[2-dim]);
86 unsigned di = dim?j:i;
88 float motpi = dim?-1:1;
89 Linear2d ds_lin_low( lin[0], -motpi*lin[1], motpi*lin[2], -lin[3] );
92 Linear2d ds_lin_hi( lin[1+dim]-lin[0], lin[1+2*dim]-lin[dim], lin[3]-lin[2-dim], lin[3-dim]-lin[2-dim] );
120 for(
int dim = 0; dim < 2; dim++)
122 for(
unsigned k=1; k<degmax; k++){
127 Linear reste = f_on_curve[k];
128 double ax = -reste[0]/fact_k*nA[
X];
129 double ay = -reste[0]/fact_k*nA[
Y];
130 double bx = -
sign*reste[1]/fact_k*nB[
X];
131 double by = -
sign*reste[1]/fact_k*nB[
Y];
163 double D2fVV0 = f_uu.
apply(A[
X],A[
Y])*V0[
X]*V0[
X]+
166 double D2fVV1 = f_uu.
apply(B[
X],B[
Y])*V1[
X]*V1[
X]+
171 if (candidates.empty()) {
177 for (
unsigned i=0; i<candidates.size(); i++){
180 if ( new_error < error || error < 0 ){
185 return candidates[best];
Adaptor that creates 2D functions from 1D ones.
CPoint min() const
Get the corner of the rectangle with smallest coordinate values.
CPoint max() const
Get the corner of the rectangle with largest coordinate values.
Range of real numbers that is never empty.
Function that interpolates linearly between two values.
Two-dimensional point that doubles as a vector.
Linear2d & index(unsigned ui, unsigned vi)
double apply(double u, double v) const
Polynomial in symmetric power basis.
Various utility functions.
Linear extract_v(Linear2d const &a, double v)
Bezier multiply(Bezier const &f, Bezier const &g)
static float sign(double number)
Returns +1 for positive numbers, -1 for negative numbers, and 0 otherwise.
D2< SBasis > sb2d_cubic_solve(SBasis2d const &f, Geom::Point const &A, Geom::Point const &B)
Finds a path which traces the 0 contour of f, traversing from A to B as a single cubic d2<sbasis>.
D2< T > compose(D2< T > const &a, T const &b)
SBasis2d partial_derivative(SBasis2d const &a, int dim)
Linear extract_u(Linear2d const &a, double u)
D2< SBasis > sb2dsolve(SBasis2d const &f, Geom::Point const &A, Geom::Point const &B, unsigned degmax=2)
Finds a path which traces the 0 contour of f, traversing from A to B as a single d2<sbasis>.
D2< T > compose_each(D2< T > const &a, D2< T > const &b)
std::vector< D2< SBasis > > cubics_fitting_curvature(Point const &M0, Point const &M1, Point const &dM0, Point const &dM1, double d2M0xdM0, double d2M1xdM1, int insist_on_speed_signs=1, double epsilon=1e-5)
OptInterval bounds_fast(Bezier const &b)
D2< T > rot90(D2< T > const &a)
Obsolete 2D SBasis function class.
two-dimensional geometric operators.