z0b's realm

Effects: Rotozoom

Rotozoom

This is the classic rotozoomer effect. Again, the code is old, but it has been cleaned up. It is somewhat optimized, because I don't want to un-optimize the old code. I did add a bilinear texture filtering to it to make it look slightly better.

(There is no hardware version of this. It'd be just one rotating polygon. You can do that yourself.)

Basically, it textures the destination area with copies of the texture, rotating and zooming in/out repeatedly. The zoom origin is changed on every frame. The demo contains three movement functions:

  1. 3:2 Lissajous figure
  2. Circular
  3. Fixed midpoint (just zoom in/out)

Press Tab to change the movement function, or Space to pause/unpause. Esc quits. The demo uses a 512x512 window and when compiled with SSE3 optimizations (GCC -O2 -ffast-math -msse3) it produces fairly fast code.

My original code had no FPS measurement or framerate capping and I was too lazy to add them now, so the demo runs as fast (or slow) as your computer can handle.

As usual, there is a precompiled x86 Windows binary. It requires the SDL DLL to run, but SDL is not required for the effect itself.

Texture credits to the old Limefly.net texture collection. Sadly it no longer exists.

Rotozoom source
Filerotozoom.zip
Size47 KiB (48009 bytes)
ReleasedSep 6. 2011
SHA-256583e5fa8040875bb308e2fbc03c715450304c7dac2982adb85b68254dc02c0d5

Precompiled x86 Windows executable
Filerotozoom_win.zip
Size60 KiB (61521 bytes)
ReleasedSep 6. 2011
SHA-256e277f890fc263d15c9d5caa520ff08e351db5f03f98d38c5dddf019fe567c7ef