36 return std::atan2(-sinangle,cosangle);
45 const double modv2(v2.
modulo());
46 const Vector nv2(v2/modv2);
70 const double x=-sinangle/cosangle;
71 const Vector dx_dv1=-dsinangle_dv1/cosangle + sinangle/(cosangle*cosangle) * dcosangle_dv1;
72 const Vector dx_dv2=-dsinangle_dv2/cosangle + sinangle/(cosangle*cosangle) * dcosangle_dv2;
73 const Vector dx_dv3=-dsinangle_dv3/cosangle + sinangle/(cosangle*cosangle) * dcosangle_dv3;
75 const double torsion=std::atan2(-sinangle,cosangle);
76 d1=1.0/(1.0+x*x) * dx_dv1;
77 d2=1.0/(1.0+x*x) * dx_dv2;
78 d3=1.0/(1.0+x*x) * dx_dv3;
TensorGeneric< 3, 3 > dcrossDv2(const VectorGeneric< 3 > &v1, const VectorGeneric< 3 > &v2)
double compute(const Vector &v1, const Vector &v2, const Vector &v3) const
Compute the angle between the projections of v1 and v3 on the plane orthogonal to v2...
double modulo() const
Compute the modulo.
VectorGeneric< 3 > crossProduct(const VectorGeneric< 3 > &v1, const VectorGeneric< 3 > &v2)
Class implementing fixed size matrices of doubles.
TensorGeneric< n, l > matmul(const TensorGeneric< n, m > &a, const TensorGeneric< m, l > &b)
Class implementing fixed size vectors of doubles.
void zero()
set it to zero
static TensorGeneric< n, n > identity()
return an identity tensor
TensorGeneric< 3, 3 > dcrossDv1(const VectorGeneric< 3 > &v1, const VectorGeneric< 3 > &v2)
T dotProduct(const std::vector< T > &A, const std::vector< T > &B)
Calculate the dot product between two vectors.
TensorGeneric< n, m > extProduct(const VectorGeneric< n > &v1, const VectorGeneric< m > &v2)