Your browser does not support the canvas tag.

MovingTunnel

Tunnel Demo Effect This effect shows a tunnel in which you fly while the tunnel rotates, seemingly in 3D. The animation of the tunnel actually isn't calculated on the fly while the animation runs, but is precalculated. These calculations are stored in two tables: one for the angle and one for the distance. For every frame, go through every pixel (x,y) and use the angle and distance tables to get which pixel of the texture it should draw at the current pixel. To look like its rotating and zooming, the values of the angle and distance tables are shifted.

Source code: MovingTunnel

Built with Processing and Processing.js