简体   繁体   中英

Linear transformation: vectors landing at unintended places, manim

when applying a Linear transformation with a matrix [3, 0],[0, 2], the i hat should elongate to 3 times its length and j hat should elongate to 2 times its length, right? The i hat shouldn't move in the direction of j hat because the second coordinate is zero. But when I rendered the animation, what I got is this: See image

Look, instead of the i hat (green) moving from (2,-1) to (6,-3) it has moved a little in the direction of j hat?

Why is this so? Can somebody explain to me?

When we "apply" matrix in manim with self.apply_matrix , it is not actually applying the matrix.

For example, if we self.apply_matrix(A) and then self.apply_matrix(B) , what we should get is the matrix BA which is the result of applying B after A.

But what we actually get is AB.

And as matrix multiplication is not commutative, these are different. That is why we get the wrong transformation.

Don't know why manim is behaving this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM