A twister makes a column appear to turn like a strip of soft material. Its top and bottom face different directions, and the twist travels along its length. A useful way to construct it is to treat the column as a stack of horizontal slices, each with its own rotation angle.
Drawing a slice
Imagine looking down on a square slice. As it rotates, the positions of its corners change. Viewed from the front, its visible sides become horizontal spans on one screen line. Give successive slices different angles and the column twists; change those angles over time and it moves.
Nikos Papadopoulos demonstrates this in a shader, a program that calculates the image on the graphics processor. His example computes corner positions with sine functions, draws the visible spans and applies a texture. It calculates these positions while rendering, so pre-drawn rotation frames are not a requirement of the effect.
A C64 approach
Bitbreaker’s Codebase64 example prepares narrow strips of an eight-sided shape at different rotation steps. During display, the C64 selects those stored strips in an order that produces the twist. The preparation program and the running demo have different jobs: one generates graphics; the other chooses which graphics to show.
His implementation uses FLI on alternate display lines to select character and screen data. Sprites cover the unwanted area beside the shape. This is a particular C64 rendering method, not the definition of a twister.
The same article adapts its stored-strip approach to an x-rotating cube and a waving chequerboard. Their motion differs, but they share prepared graphics and tables that select the visible strips. The examples show why an apparent three-dimensional movement need not involve redrawing a complete solid object every frame.
Sources
- Nikos Papadopoulos, “Classic Demo Effects, Twister”, 21 April 2020 — primary implementation article and GLSL source: slice geometry, visibility and runtime calculation.
- Bitbreaker, “2nd line FLI — another approach to twisters, x-rotators and waving carpets”, Codebase64 — primary implementation account with C graphics-generation and 6502 display code. Describes one method, not the effect’s origin.