This program is part of Netpbm.
ppm3d reads two PPM images as input and produces a PPM as output, with the images overlapping by horizontal_offset pixels in blue/red format. The idea is that if you look at the image with 3-D glasses (glasses that admit only red through one eye and only green through the other), you see an image with depth. This is called a stereogram.
horizontal_offset defaults to 30 pixels. The input PPMs must be the same dimensions.
To make a different kind of stereogram, use pamstereogram. That makes a steregram that you view without special glasses, just by letting your eyes unfocus so that each eye sees different parts of the image.