Simulate images acquired with microscopes and projected by optical lithography systems