Javascript code for the spiral flow map