Skip to content

Instantly share code, notes, and snippets.

@nathnim
nathnim / path_smoothing.py
Created May 30, 2022 12:01 — forked from jaems33/path_smoothing.py
Path smoothing
from copy import deepcopy
def printpaths(path, newpath):
for old, new in zip(path, newpath):
print('[' + ', '.join('%.3f' % x for x in old) +
'] -> [' + ', '.join('%.3f' % x for x in new) + ']')
path = [[0, 0], [0, 1], [0, 2], [1, 2], [2, 2], [3, 2], [4, 2], [4, 3], [4, 4]]