Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update matrix_decompose to include shear and non-isotropic scaling #32

Open
FirefoxMetzger opened this issue Jan 14, 2023 · 0 comments
Open

Comments

@FirefoxMetzger
Copy link
Contributor

As we allow non-isotropic scaling in pygfx and pylinalg, it would be good if our matrix decomposition routine could support this as well.

Currently, we extract a uniform scale via the matrix determinant, and we also don't account for shear that may be introduced as the result of chaining two matrices with non-trivial rotation and non-isotropic scale.

From an implementation side, I found an interesting document that walks through some of the math behind decomposing such a transform. It uses our convention (all parameters in source/parent space, our desired order of applying matrices), so it is mostly just implementing those functions in pylinalg. Here is a link to the document: https://caff.de/posts/4X4-matrix-decomposition/decomposition.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant