’Two-mirror and two-lens devices converting an incident plane wave of a given cross section and intensity distribution into an output plane wave irradiating at a given target set with prescribed intensity are required in many applications. Most of the known designs are restricted to rotationally symmetric mirrors/lenses. In this talk I will discuss designs with freeform mirrors/lenses, that is, without a priori assumption of rotational symmetry. Assuming the geometrical optics approximation, it is shown that the functions describing such freeform mirrors/lenses satisfy Monge-Amp‘ere type partial differential equations (PDEs) derived from the basic laws of geometrical optics. However, because of strong nonlinearities numerical solution of such PDEs by known numerical methods is difficult. Fortunately, the above design problems can also be formulated as problems in calculus of variations in which instead of solving the nonlinear PDEs one needs to find extrema of some Fermat-like functionals taking the role of cost functions in optimal transportation problems. This approach was successfully applied in single and two-mirror design problems and allowed to calculate solutions with high accuracy by methods based on linear programming. I will describe some of these results and indicate their extensions to the two-lens design problem.’