Fundamentals of optics