Browse Search Popular Register Upload Rules User list Login:
Search:
non-destructive pixelart rotation

Image:
screenshot of the scene

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:

Scene tag

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
edit
Similar scenes
Title: The time gears! (fix)
Rating: 5
Filesize: 22.18 kB
Downloads: 617
Comments: 0
Ratings: 1
Date added: 2024/07/14 16:49:32
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: a destructive remote
Rating: 5
Filesize: 93.32 kB
Downloads: 623
Comments: 2
Ratings: 1
Date added: 2018/09/09 11:43:03
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Tornado [Working]
Rating: 5.625
Filesize: 82.51 kB
Downloads: 8111
Comments: 1
Ratings: 2
Date added: 2018/10/13 15:20:52
Made with: Phun
Rating: rated 5.6
download
Title: some pixelart weapons
Rating: 5
Filesize: 36.18 kB
Downloads: 700
Comments: 1
Ratings: 1
Date added: 2022/01/26 11:16:21
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Ratcheting Wheel
Rating: 5
Filesize: 40.72 kB
Downloads: 439
Comments: 0
Ratings: 1
Date added: 2014/03/20 16:22:51
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: realistic car destructive
Rating: 5
Filesize: 253.59 kB
Downloads: 352
Comments: 1
Ratings: 1
Date added: 2025/06/17 10:18:59
Made with: Algodoo v2.2.3
Rating: rated 5
download
Very interesting! Could you please share a link to that standupmaths video that you mentioned in the description? THANKS!
does this also work with a texture image or just with solid color pixels?

cool stuff, by the way!!!
Xray - I should have lol, here's the link, I'll add it to the description shortly:
https://www.youtube.com/watch?v=1LCEiVDHJmc

Algodooper - I'm not certain what you're asking, so I'll answer multiple questions: This scene is set up to only transform the position vectors of the boxes and doesn't do anything with textures. If a texture was applied to the boxes, it would not change as the pixelart is rotated. The 3 transformations, when applied in order on anything, will result in that thing rotating.
Ah, yes... The standupmaths guy was explaining how to rotate a pixel image by Skewing (also called shearing) the image matrix. It's an excellent video because he makes an otherwise confusing subject understandable even for people like me who are not math geniuses. Thanks!