All effects

u += cos·z , v += sin·z

Rotozoomer.

1990 to today

A picture that spins and zooms in and out, smooth and endless. It looks expensive. It costs two additions per pixel.

Research8-bit16-bitPCGPU

How it works

The algorithm

Two directions. The first 16-bit rotozooms on the 8 MHz Atari ST mapped forward: loop over the set pixels of a logo, rotate and scale each one with precalculated sine and zoom tables, and plot it on screen. Cheap for a sparse logo, but zoom in and holes open between the points. The classic rotozoomer maps inverse: walk the screen and ask, for every pixel, which texel lies under it in a rotated and scaled coordinate system. That is a linear map, so along one row both texture coordinates change by a constant: start each row at the right spot, then just add (cos·zoom, sin·zoom) per pixel. A power-of-two texture wraps for free. Before machines were fast enough for that, the standard trick was older still: a rotation can be split into three shears (shift every row, then every column, then every row again), an identity from the HAKMEM era that Alan Paeth published for raster images in 1986. Each pass only moves whole rows or columns sideways, with no per-pixel maths at all. 8- and 16-bit coders still use it; doing it naively per pixel only became normal on 90s PCs, or at low resolution on the C64 and Amiga.

The old-hardware trick

On a planar Atari ST or Amiga, setting one pixel means masking bits across four bitplanes, and a full 320×200 screen leaves under three cycles per pixel, so inverse mapping every screen pixel was out of reach at first. Forward mapping only touches the logo's points, all with table lookups and no real-time multiplies. The trailing logos in intros like Delta Force's were a buffering trick: keep the last few frames in separate bitplanes and give older planes darker palette colours, a motion blur for free. Later, inverse mapping: fixed-point u and v in registers, one addition each per pixel, and an AND mask to wrap, no multiplications in the inner loop. Early 16-bit versions drew chunky 2×2 or 4×4 pixels to keep up. The SNES did it in hardware: Mode 7 applies a new rotation-and-scale matrix on every scanline, which turns the plane into a perspective floor. Not to be confused with the chaos zoomer, which has no texture at all and only feeds the previous frame back in, a little bigger: see its own page.

Per frame, in pseudo-code
zoom = 1 + sin(t) · 0.8 ;  a = t
du, dv = cos(a)·zoom, sin(a)·zoom
for y in 0..199:
  u = u0 − y·dv ;  v = v0 + y·du        // row start
  for x in 0..319:
    pixel = texture[(v & 255)·256 + (u & 255)]
    u += du ;  v += dv                  // two adds

// Mode 7: per scanline, zoom = height / (y − horizon)

Timeline

Documented milestones, with a source for each. Famous examples, not claims of who did it first.

  1. 1972Research

    Rotation by shears

    HAKMEM · MIT AI Lab · PDP-10 memo

    The MIT HAKMEM memo of Minsky, Gosper, Beeler and colleagues collects tricks such as rotating with successive shears; Alan Paeth later formalised the three-shear raster rotation (1986). It stayed the go-to rotation on 8- and 16-bit machines.

    Source
  2. 199016-bit

    An early rotating, zooming image

    The Gigabyte Crew · Syntax Terror (Delta Force) · Atari ST

    The Atari demo encyclopedia identifies this screen as an early rotate-and-zoom image effect. On an 8 MHz 68000 this was done forward: each logo pixel is rotated and zoomed through tables and plotted, the reverse of the later screen-to-texture rotozoom. The trailing logos come from buffering old frames in bitplanes.

    Source
  3. 199016-bit

    Mode 7

    Nintendo · F-Zero · SNES

    The Super Nintendo's background Mode 7 rotates and scales a tile layer in hardware; changing the matrix per scanline turns it into a perspective floor.

    Source
  4. 199216-bit

    World of Commodore

    Sanity · Amiga OCS/ECS

    Its blurred, rotating and zooming picture became a celebrated Amiga example, second place at World of Commodore 1992.

    Source
  5. 1993PC

    Second Reality's LNS&ZOOM

    Psi / Future Crew · DOS

    A famous software rotozoomer, documented down to its executable and source directory, that set the look of the tiled spinning image.

    Source
  6. 199616-bit

    Rotozoom meets bump mapping

    C-Lous · Kolor Remix · Amiga AGA

    Cited in Scout's coding article as a zoomrotator enhanced with bump mapping, coordinates and lighting moving together.

    Source
  7. 20038-bit

    Full screen on a C64

    AEG / Smash Designs & Axis / Oxyron · The Impossible Thing · Commodore 64

    A full-screen 2×2-pixel rotozoom at 25 fps in a 4K intro, third at Breakpoint 2003.

    Source
  8. 2010PC

    Step by step in Hugi

    Marnix Kok · Hugi 36 · Diskmag tutorial

    ‘A blast from the past!’ derives a bump-mapped rotozoom from scratch, preserving the software technique.

    Source
  9. todayGPU

    Rotozoom with feedback

    cake23 · WebGL Shader Lab · WebGL

    A running example that feeds each frame back in as the next frame's texture, the rotozoom as a feedback loop.

    Source

Over time

8 live versions, from the oldest platform to today: 6 on the CPU, 2 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.

Atari ST · 4 bitplanes

Forward-mapped logo

1990

Texture to screen: only the logo's pixels are rotated and zoomed, through integer sine and zoom tables. Each new frame goes into a bitplane and the palette fades the three older ones, so the trail is free. Note the gaps as it zooms in.

16-bitCPUforward mappingbitplane trails
Detail page
Amiga / ST · blitter shifts

Three-shear rotation

1988

Rotate with three shears: shift every row, then every column, then every row. The three panels show each pass. No multiplications per pixel, just shifted copies a blitter can do. Past 90°, the image is flipped first.

16-bitCPUshearHAKMEM / Paeth
Detail page
Amiga · chunky pixels

Chunky rotozoom

1992

Fat pixels and 32 colours. Early 16-bit rotozoomers drew at reduced resolution to keep the frame rate.

16-bitCPU32 colourslow-res
Detail page
SNES · 256×224

Mode 7

1990

A rotozoom per scanline: the zoom is the distance to that line of the floor. 15-bit colour, a sky gradient and a race track that turns under you.

16-bitCPUperspective15-bit colour
Detail page
PC · VGA mode 13h

VGA rotozoomer

1993

Full 320×200, a 256×256 texture with an XOR pattern, a ring and a monogram, two additions per pixel.

PCCPU256 coloursfixed point
Detail page
C64 · 2×2 chunks

C64 rotozoom

2003

As in The Impossible Thing: full screen in 2×2 blocks, mapped onto the C64's 16 colours. A decade after the PC, on a 1 MHz machine.

8-bitCPU16 colours4K intro
Detail page
GPU · GLSL

Filtered rotozoom

today

Procedural texture, anti-aliased and motion-blurred over four sub-frames, what the old version only hinted at.

GPUGPUmotion blurprocedural
Detail page
GPU · GLSL

Log-polar zoom

today

In log-polar coordinates zooming becomes sliding and rotation becomes wrapping, so the zoom never ends, a Droste spiral.

GPUGPUlog-polarinfinite zoom
Detail page