Dynamics of a Liquid-Crystal Variable Optical Prism Based on Pancharatnam Phase