implementing lagrangian_vtk function