#NEWLINE# def simplifyRadialDistance( points , tolerance ) : #NEWLINE# #INDENT# length = len ( points ) #NEWLINE# prev_point = new_points [ 0 ] #NEWLINE# new_points = [ prev_point ] #NEWLINE# for i in range ( length ) : #NEWLINE# #INDENT# point = points [ i ] #NEWLINE# if ( getSquareDistance ( point , prev_point ) > tolerance ) : #NEWLINE# #INDENT# new_points . append ( point ) #NEWLINE# prev_point = point #NEWLINE# #UNINDENT# #UNINDENT# if ( prev_point != point ) : #NEWLINE# #INDENT# new_points . append ( point ) #NEWLINE# #UNINDENT# return new_points