Metasurfaces provide a versatile platform for realizing ultrathin flat optics
for use in a wide variety of optical applications. The design process involves
defining or calculating the phase profile of the metasurface that will yield
the desired optical output. Here, we present an inverse design method for
determining the phase profile for shaping the intensity profile of a collimated
incident beam. The model is based on the concept of optimal transport from
non-imaging optics and enables a collimated beam with an arbitrary intensity
profile to be redistributed to a desired output intensity profile. We derive
the model from the generalized law of refraction and numerically solve the
resulting differential equation using a finite-difference scheme. Through a
variety of examples, we show that our approach accommodates a range of
different input and output intensity profiles, and discuss its feasibility as a
design platform for non-imaging optics