Expensive laser cutters have a 3D engraving mode that varies the laser ... He wrote the program in MatLab to analyze a grey scale image and then assign power levels to the different shades ...