Bidirectional weighted polygon smoothing