def contours(*values)
		(values = (0..values[0]+1).to_a.map{|i| i.to_f * (@grid.max - @grid.min) / ( values[0]+1) + @grid.min}; values.pop; values.shift) if values.size==1 and values[0].kind_of? Integer
		cons = values.inject({}){|hash, val| hash[val] = []; hash}
		get_startpoints(cons)
		#@analysed = {}
		@found = {}
		#p cons
		starts = cons

		cons = values.inject({}){|hash, val| hash[val] = []; hash}
		temp_cons = values.inject({}){|hash, val| hash[val] = []; hash}
		starts.each do |val, arr|
			#p 'arr', arr
			arr.each do |start_con|
			#arr.map{|edges| edges[-1][1].slice(0..1)}.each do |starti, startj|
				starti, startj = start_con[-1][1].slice(0..1)	
				temp_cons[val] = [start_con]
				p 'startj',  starti, startj
				loop do
					starti, startj = trace_contour(val, temp_cons, starti, startj)
					break unless starti and startj
				end
				cons[val].push temp_cons[val][0]
			end
		end
		cons.keys.each{|val| cons[val] = connect_contours(cons[val]);
			cons[val].map!{|con| con.map{|point| point[0]}}}
		
		@last_contours = cons
		gk =  graphkit
		#gk.gp.style = 'data with linespoints'
		gk.data.each{|dk| dk.with = 'lp'}
		gk.gnuplot
		@last_contours
	end
def contours(*values)
		(values = (0..values[0]+1).to_a.map{|i| i.to_f * (@grid.max - @grid.min) / ( values[0]+1) + @grid.min}; values.pop; values.shift) if values.size==1 and values[0].kind_of? Integer
		cons = values.inject({}){|hash, val| hash[val] = []; hash}
		get_startpoints(cons)
		#@analysed = {}
		@found = {}
		#p cons
		starts = cons

		cons = values.inject({}){|hash, val| hash[val] = []; hash}
		temp_cons = values.inject({}){|hash, val| hash[val] = []; hash}
		starts.each do |val, arr|
			#p 'arr', arr
			arr.each do |start_con|
			#arr.map{|edges| edges[-1][1].slice(0..1)}.each do |starti, startj|
				starti, startj = start_con[-1][1].slice(0..1)	
				temp_cons[val] = [start_con]
				p 'startj',  starti, startj
				loop do
					starti, startj = trace_contour(val, temp_cons, starti, startj)
					break unless starti and startj
				end
				cons[val].push temp_cons[val][0]
			end
		end
		cons.keys.each{|val| cons[val] = connect_contours(cons[val]);
			cons[val].map!{|con| con.map{|point| point[0]}}}
		
		@last_contours = cons
		gk =  graphkit
		#gk.gp.style = 'data with linespoints'
		gk.data.each{|dk| dk.with = 'lp'}
		gk.gnuplot
		@last_contours
	end
Create a series of contours at the given values. Returns a hash of {value => array_of_contours}. The array_of_contours is a an array of arrays, where each array is a list of [x, y] coordinates along the contour.