smouth curve and remove points

 From:  lyes (BLYESS)
2001.1 
hi michael is it possibe to script remove points from a curve or polycurve i have add animation to explain it better

ps: animation work on firefox (APNG file)