Changing the way VMobject handles its internal bezier curves so as to eliminate the need for sup_paths

This commit is contained in:
Grant Sanderson
2019-02-05 11:02:15 -08:00
parent eb0c63606d
commit eaf25ff34b
29 changed files with 432 additions and 278 deletions

View File

@ -15,11 +15,13 @@ def choose_using_cache(n, r):
if n not in CHOOSE_CACHE:
CHOOSE_CACHE[n] = {}
if r not in CHOOSE_CACHE[n]:
CHOOSE_CACHE[n][r] = choose(n, r)
CHOOSE_CACHE[n][r] = choose(n, r, use_cache=False)
return CHOOSE_CACHE[n][r]
def choose(n, r):
def choose(n, r, use_cache=True):
if use_cache:
return choose_using_cache(n, r)
if n < r:
return 0
if r == 0: