The rise of micro/nanooptics and lab-on-chip devices demands the fabrication
of three-dimensional structures with decent resolution. Here, we demonstrate
the combination of grayscale electron beam lithography and direct forming
methodology to fabricate antimony sulfide structures with free form for the
first time. The refractive index of the electron beam patterned structure was
calculated based on an optimization algorithm that is combined with genetic
algorithm and transfer matrix method. By adopting electron irradiation with
variable doses, 4-level Fresnel Zone Plates and metalens were produced and
characterized. This method can be used for the fabrication of three-dimensional
diffractive optical elements and metasurfaces in a single step manner.