optical simulation