Merge pull request #1327 from techdude/master

Add CONFIG parameter to allow disabling smoothing on ParametricCurve
This commit is contained in:
Grant Sanderson 2021-02-03 12:09:33 -08:00 committed by GitHub
commit c2b2cb3b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,7 @@ class ParametricCurve(VMobject):
"epsilon": 1e-8,
# TODO, automatically figure out discontinuities
"discontinuities": [],
"smoothing": True,
}
def __init__(self, t_func, t_range=None, **kwargs):
@ -41,7 +42,8 @@ class ParametricCurve(VMobject):
points = np.array([self.t_func(t) for t in t_range])
self.start_new_path(points[0])
self.add_points_as_corners(points[1:])
self.make_smooth()
if self.smoothing:
self.make_smooth()
return self