The figure above shows the rotation matrix of the Tetris block.
How does this result in the following…
I don't know how to calculate it.
How is xr-3/2 and x-3/2 on the right calculated?
This may be a rudimentary question, but please let me know m(__)m
sin 90° is 1 and cos 90° is 0 so
The applicable expression is
| xR-3/2 | | 0-1 | | x-3/2 |
| | = | | | |
| yR-3/2 | | 10 | | y-3/2 |
By the way, the multiplication of 2 行列2 and 2 行列1 matrices is
| ab | | A | | aA + bB |
| | | | = | |
| cd | | B | | cA + dB |
so
|xR-3/2||-1(y-3/2)||-y+3/2|
| | = | | = | |
|yR-3/2 | | 1 (x-3/2) | | x + 3/2 |
The term multiplied by zero disappears.
will be .
|3/2|
| |
| 3/2 |
Add to
|xR-3/2+3/2||-y+3/2+3/2||-y+3|
| | = | | = | |
|yR-3/2 + 3/2 | | x-3/2 + 3/2 | | x |
| xR | | -y + 3 |
| | = | |
| yR||x|
will be
© 2024 OneMinuteCode. All rights reserved.