#include <qsc_approximation_fcts.hpp>
Definition at line 954 of file qsc_approximation_fcts.hpp.
normal_vector | ( | ) | [inline] |
Definition at line 957 of file qsc_approximation_fcts.hpp.
normal_vector | ( | const point< K > & | a, | |
const point< K > & | b, | |||
const point< K > & | c | |||
) | [inline] |
Definition at line 968 of file qsc_approximation_fcts.hpp.
References KVPOL, and mmx::shape::orth_vect().
00969 { 00970 data = KVPOL(1,1); //defines a degree one polynomial 00971 data[0]=orth_vect(2*(b-a)); 00972 data[1]=orth_vect(2*(a-2*b+c)); 00973 00974 std::cout<< Bezier_curve<K>(a,b,c).normal(0)<<" toto " <<data[0]<<"\n"; 00975 std::cout<< Bezier_curve<K>(a,b,c).normal(1)<<" toto " <<data[0]+data[1]; 00976 00977 }
point< K > eval_unit | ( | const K & | t | ) | [inline] |
Definition at line 980 of file qsc_approximation_fcts.hpp.
References mmx::shape::dot(), mmx::shape::myeval(), mmx::sqrt(), and VECT.
Referenced by normal_vector< K >::middle(), and quad_supp_func< K >::quad_supp_func().
point< K > middle | ( | ) | [inline] |
Definition at line 988 of file qsc_approximation_fcts.hpp.
References mmx::shape::dot(), normal_vector< K >::eval_unit(), mmx::shape::orth_vect(), mmx::sqrt(), and VECT.
Referenced by quad_supp_func< K >::quad_supp_func().
00989 : est ce meilleur que de prendre tout simplement t=1/2 ? */ 00990 { 00991 VECT n0=eval_unit(0); 00992 VECT n1=eval_unit(1); 00993 VECT n2; 00994 if ( n0 == -n1 ) 00995 n2=orth_vect(n0); // Achtung ! check later if there are some numerical problems (with numerical computations, we should never have n0=-n1, but n0+n1 could be very small ! 00996 else 00997 { 00998 n2=n0+n1; 00999 n2=n2/std::sqrt(dot(n2,n2)); 01000 } 01001 VECT n=eval_unit(0.5); 01002 K p1=dot(n,n2); 01003 K p2=dot(n0,n2); 01004 if ( p1 < p2 ) 01005 return -n2; 01006 else 01007 return n2; 01008 }