Bent core nematics as optical gratings