adapted for beamer and add linear interpolation in cartesian space