Switch to a 3d rotation trackball implementation with path independence #29244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR summary
Different 3D rotation methods were added in #28841, with different tradeoffs to each. In that PR I was adamant that the matplotlib default method should have the property of "path independence", which is valuable since it allows users to "undo" errant rotations by returning their mouse to the original point on the screen.
Since then, I did a deep dive and writeup on different virtual trackball control methods (https://theshamblog.com/virtual-trackballs-a-taxonomy-and-new-method/), and learned that it's possible to implement the "trackball" control method in a way that preserves the path independence property, and IMO is a strict improvement on the original implementation. This PR switches to that implementation, and cleans up a little bit of the docs.
@MischaMegens2 pinging you for review! During the original PR you favored "trackball" as the default method, which I pushed back on because of the lack of path independence. I'm open to switching it over to that now if you'd prefer it!
We might be able to squeeze a change to the default into 3.10 with a quick review, I think it would be harder to switch over in 3.10.1 since it's changing behavior. But to other devs, I don't want this to block a timely 3.10 release.
PR checklist