Image:
 Author: UnityDogGaming04 Group: Default Filesize: 13.8 kB Date added: 2024-03-10 Rating: 5 Downloads: 879 Views: 234 Comments: 4 Ratings: 1 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
press AD to spin the 9x9 pixelart image. i found the math in a recent standupmaths video, and decided to make something of my own out of it. the novelty in this system for rotation is how it doesn't duplicate nor destroy any pixels.
details on how it's done:
applying two special matrix transformations to a vector (the first, then the second, then the first again) have the same effect as rotating the vector about an angle. though, these matrices have non-integers within them, so, to make it work with pixelart, the pixels have to be re-aligned with the nearest integer position after each transformation. this means there is a little bit of random distortion in the rotated image, as it's impossible to translate the pixels a fractional amount.
sidenote, notice that the rotation breaks down around 180 degrees. this is because of a term in one of the matrices: tan(angle/2), which approaches infinity near 180 degrees. this could be fixable by applying two rotations at half the angle, meaning no individual rotation matrix ever surpasses 90 degrees.
standupmaths video: https://www.youtube.com/watch?v=1LCEiVDHJmc |
Last edited at 2024/03/14 22:40:36 by UnityDogGaming04
Please log in to rate this scene
|