Practical informations Practical informations • Send source code to: christophe.leblanc@ulg.ac.be p g
2D and 3D curves: curvature 2D and 3D curves: curvature • Compute the curvatures of two curves: – 2D: (Semi) circle of radius r=1 ( ) κ = ( ( ) ) 1 / u r – 3D: Helix of radius r=10 κ κ = + + ( ( ) ) /( /( ² 1 1 ) ) u u r r r r
2D and 3D curves: curvature 2D and 3D curves: curvature • For doing the calculations, you will need the following member functions of npoint3 : – double norm(void) const – double dotprod(const npoint3 other) const – Overloading of operators +, -, *, /
2D and 3D curves: curvature 2D and 3D curves: curvature • For doing the calculations, you will need the following member functions of npoint3 : – double norm(void) const – double dotprod(const npoint3 other) const – Overloading of operators +, -, *, / • Warning: need to convert Warning: need to convert npoint <-> npoint3 Homogeneous Euclidean coordinates (4D) coordinates (4D) coordinates (3D) coordinates (3D)
2D and 3D curves: curvature 2D and 3D curves: curvature • For doing the calculations, you will need the following • A vector in homogeneous coordinates has weight member functions of Vector : w = 0 – double Norm(void) const • A point in homogeneous coordinates equal to an – double operator * (const Vector &V) const euclidean point has weight w = 1 – void Cross(Vector &V1, Vector &V2)
2D and 3D curves: curvature 2D and 3D curves: curvature • ADVICE : try to be organized by implementing new functions in the main.cc file – first and second derivatives. – Tangent. Tangent – Normal. – Derivative of the tangent.
Recommend
More recommend