Principles of solid state electron optics