Vertical voxel is simple too, you just need some trigonometry to do it. Basically you draw a half tube in the middle of the screen and the surface of the tube is distorted by a texture. So for every pixel on the screen, you have to find out where it is, by taking the arccos of your position (x) on the diameter of the tube divided by the radius and then dividing this by because a half tube is covering a
angle (it can cover less too, if you want). Then you have to look up in the texture the height of this pixel (it’s useful if this height field is pretty smooth) and finally draw a horizontal line corresponding to this distortion taking into account the angle it’s seen on (the angle we just calculated, though we need its cotangent now, but that’s just
). You have to be careful though that the lines must be drawn from the outside to the inside for overdraw to work in our favor. The texture is the same as used in the rotozoomer.
