Skip to content

Instantly share code, notes, and snippets.

View UnaiM's full-sized avatar
🤓
Learning

Unai Martínez Barredo UnaiM

🤓
Learning
View GitHub Profile
@UnaiM
UnaiM / retimestab.py
Last active September 24, 2018 19:33 — forked from lcrs/retimestab.py
# Retime a tracked object to better fit a target curve
# Select two Transform nodes: the first with a jerky tracked curve, the
# second with a smooth target curve
# Group effort by Lewis Saunders, Unai Martínez Barredo, Erwan Leroy
# Make a function to calculate the distance between two points
def distance(a, b):
return pow((a[0]-b[0])**2 + (a[1]-b[1])**2, 0.5)
# Find the closest point to p on the line ab