Skip to content
Snippets Groups Projects
Commit ce2129ac authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

implement the exponential map

[[Imported from SVN: r5533]]
parent d34bae65
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,15 @@ public:
return *this;
}
/** \brief The exponention map */
static UnitVector exp(const UnitVector& p, const TangentVector& v) {
const double norm = v.two_norm();
UnitVector result = p;
result.data_ *= std::cos(norm);
result.data_.axpy(std::sin(norm)/norm, v);
return result;
}
/** \brief Length of the great arc connecting the two points */
static double distance(const UnitVector& a, const UnitVector& b) {
return std::acos(a.data_ * b.data_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment