ELASTICPATHING/SOURCECODE/UbiComp2014/Get_Map_Code/lib-Dist.rb
#A 2 point interpolation class. The interface is designed to mimic that of spline.
A 2 point interpolation class. The interface is designed to mimic that of spline.
A 2 point interpolation class . The interface is designed to mimic that of spline .
def interpolate(points)
		scale = (@coords[@max_ind][2] - @coords[@min_ind][2]) / points.to_f
		return (0..points).map{|i| index = scale * i; coords = eval_point(index); [coords[0],coords[1],index]}
	end
def interpolate ( points ) scale = ( @coords [ @max_ind ] [ 2 ] - @coords [ @min_ind ] [ 2 ] ) / points . to_f return ( 0 .. points ) . map { | i | index = scale * i ; coords = eval_point ( index ) ; [ coords [ 0 ] , coords [ 1 ] , index ] } end
A 2 point interpolation class.
A 2 point interpolation class .
#array of interpolated points
points