%display the results and write to gif file