In recent years, subwavelength dielectric gratings have been engineered for use as planar focusing elements at optical communication frequencies. Pioneering designs were based on aperiodic one-dimensional gratings, which were polarization-sensitive and designed bar by bar. In this paper, we present our recent designs which eliminated the polarization dependence by using a novel two-dimensional hexagonal lattice and algorithm to build the lens. In this way, lens can be designed algorithmically, with the inherent geometry requiring the use of only one period for the hexagonal lattice. We propose a unique geometry for designing two-dimensional grating lenses: dielectric posts arrayed in concentric circles. Because it is straightforward to space concentric rings apart at varying distances, we no longer need to restrict the design to a uniform grating period. By choosing two periodicities to work with, we managed to algorithmically design a two-dimensional lens, but with the advantage that our smallest feature sizes are up to twice as large as those of lenses designed with only one period. This increases the ease of fabrication for lenses working at current wavelengths and opens up the possibility for working with shorter wavelengths. Furthermore, this concentrically arrayed grating lens can be designed using phase information calculated for a periodic hexagonal lattice, even though the two designs show very little geometric resemblance. Also, we found that the grating lens is suitable not only for focusing plane waves, but also for imaging point sources. Finally, we show that bifocal lenses can be crated from diffraction gratings using our algorithm as well.