There are analogous devices that modify the focal length of various lens systems:
Some projectors actually have very small focus distances, from the factory:
Discussions of close-up lenses on the projector, specifically for structured-light scanning
If you learn about basic telescope theory, you see that this can be done with two lenses: