Virtualgrid: Add new function, calculate a clip size, and new demo.