In this contribution we introduce the (generalized) Monge-Ampere equation, defining the shape/location of an optical surface. In particular, we consider a lens with one freeform surface and a freeform reflector. For the lens we consider a source emitting a parallel bundle of light and for the reflector we assume a point source emitting light radially outward. In both cases the target distribution is a far-field intensity. As numerical solution method we propose a least-squares method, which is a two-stage method. In the first stage the optical map is computed, and subsequently in the second stage, the shape of the optical surface. We demonstrate that our method can handle complicated source and target distributions.