ELASTICPATHING/SOURCECODE/UbiComp2014/Get_Map_Code/lib-Dist.rb
#A container for the two splies that make up a lat/lon function. Can calculate individual points on the spline, or fill in the points between a range
A container for the two splies that make up a lat/lon function. Can calculate individual points on the spline, or fill in the points between a range
A container for the two splies that make up a lat / lon function . Can calculate individual points on the spline or fill in the points between a range
def deriv_interp(points)
		lat_interp = @lat_spline.deriv_arr(points)
		lon_interp = @lon_spline.deriv_arr(points)
		return (0..lat_interp.length-1).map{|i| [lat_interp[i][0],lon_interp[i][0],lat_interp[i][1]]}
	end
def deriv_interp ( points ) lat_interp = @lat_spline . deriv_arr ( points ) lon_interp = @lon_spline . deriv_arr ( points ) return ( 0 .. lat_interp . length - 1 ) . map { | i | [ lat_interp [ i ] [ 0 ] , lon_interp [ i ] [ 0 ] , lat_interp [ i ] [ 1 ] ] } end
A container for the two splies that make up a lat/lon function.
A container for the two splies that make up a lat / lon function .
#points is an integer that is the number of points you want to fill in between the first and last index #returns the derivative between said indicies
points