Ha, yeah, I remember the first time I looked at RotoZoom sub... yikes! a head scratcher until you realize it draws a rectangular image by drawing two triangles: 2 edges and the diagonal, then the other 2 edges and same diagonal. To do that, it calculates the (x, y) points at corners for the triangles at drawing surface. The mapping then takes all points in triangle of image and translates them to triangle on drawing surface.