mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Merge pull request #1757 from TurkeyBilly/patch-7
Reorganize getters for ParametricCurve
This commit is contained in:
commit
dfbbb34035
1 changed files with 12 additions and 6 deletions
|
@ -48,6 +48,18 @@ class ParametricCurve(VMobject):
|
|||
self.set_points([self.t_func(t_min)])
|
||||
return self
|
||||
|
||||
def get_t_func(self):
|
||||
return self.t_func
|
||||
|
||||
def get_function(self):
|
||||
if hasattr(self, "underlying_function"):
|
||||
return self.underlying_function
|
||||
if hasattr(self, "function"):
|
||||
return self.function
|
||||
|
||||
def get_x_range(self):
|
||||
if hasattr(self, "x_range"):
|
||||
return self.x_range
|
||||
|
||||
class FunctionGraph(ParametricCurve):
|
||||
CONFIG = {
|
||||
|
@ -67,12 +79,6 @@ class FunctionGraph(ParametricCurve):
|
|||
|
||||
super().__init__(parametric_function, self.x_range, **kwargs)
|
||||
|
||||
def get_function(self):
|
||||
return self.function
|
||||
|
||||
def get_point_from_function(self, x):
|
||||
return self.t_func(x)
|
||||
|
||||
|
||||
class ImplicitFunction(VMobject):
|
||||
CONFIG = {
|
||||
|
|
Loading…
Add table
Reference in a new issue