path = "../gallery/"
map = {"c"=>"cylindrical","o"=>"orthographic","p"=>"orthographic-polar"}


[0,50,100,200,400,1000,4000,10000].each do |i|
  (101..125).collect{|ii|ii.to_s}.each do |j|
    %w(vor potvor strfunc).each do |v|
      map.keys.each do |l|
        gif = "#{path}#{v}_lon-lat_#{map[l]}_Omega#{i}_Case#{j}.gif"
        next if File.exist?(gif)
        p gif
        com = "xvfb-run ruby lonlat-anim.rb #{v} #{i} #{j} #{l} && convert dcl_*.png #{gif}"
        begin
          system(com)
        ensure
          system("rm -f dcl_*.png")
        end
      end
    end
  end
end
