Finished preliminary animations for eola intro video

This commit is contained in:
Grant Sanderson
2016-07-13 13:09:18 -07:00
parent d35a8f76ac
commit fa708dd92a
5 changed files with 547 additions and 24 deletions

View File

@ -11,6 +11,8 @@ from scipy import linalg
from constants import *
CLOSED_THRESHOLD = 0.01
def get_smooth_handle_points(points):
num_handles = len(points) - 1
dim = points.shape[1]
@ -76,7 +78,7 @@ def diag_to_matrix(l_and_u, diag):
return matrix
def is_closed(points):
return np.all(points[0] == points[-1])
return np.linalg.norm(points[0] - points[-1]) < CLOSED_THRESHOLD
def color_to_rgb(color):
return np.array(Color(color).get_rgb())