This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 398 - Nlerp fallback problem where applying slerp to opposed quaternions
Summary: Nlerp fallback problem where applying slerp to opposed quaternions
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: unspecified
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 09:36 UTC by Mathieu Joubert
Modified: 2019-12-04 11:21 UTC (History)
3 users (show)



Attachments
Test case (521 bytes, application/octet-stream)
2011-12-23 09:36 UTC, Mathieu Joubert
no flags Details

Description Mathieu Joubert 2011-12-23 09:36:50 UTC
Created attachment 242 [details]
Test case

In Quaternion.h, using slerp with two quaternions which are opposed (i.e. a,b,c,d and -a,-b,-c,-d) result in an incorrect nlerp interpolation.

(a,b,c,d) and (-a,-b,-c,-d) represent the same rotation and thier scalar product is one. This results in nlerp fallback but this interpolation cannot be done without inverting scale 0 or scale 1.

I think the solution is to put the (d<0) test out of the else statement so it applies to all angles. Puting the line 706 ( "}" )in place on the line 704 solved this issue for me.

Mathieu
Comment 1 Gael Guennebaud 2011-12-23 22:40:35 UTC
thanks for the report,

https://bitbucket.org/eigen/eigen/changeset/cca1df640bd5/
changeset:   cca1df640bd5
date:        2011-12-23 22:39:32
summary:     fix bug 398, the quaternion returned by slerp was not always normalized,
add a proper unit test for slerp
Comment 2 Gael Guennebaud 2011-12-23 22:46:12 UTC
https://bitbucket.org/eigen/eigen/changeset/7a3491a304e4/
changeset:   7a3491a304e4
branch:      3.0
user:        ggael
date:        2011-12-23 22:39:32
summary:     fix bug 398, the quaternion returned by slerp was not always normalized,
add a proper unit test for slerp
(transplanted from cca1df640bd516e4a7dd0761695e05f4eababe00)
Comment 3 Nobody 2019-12-04 11:21:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/398.

Note You need to log in before you can comment on or make changes to this bug.