mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 21:44:19 +08:00
Factored out topics/complex_numbers constructs to the appropriate places with mobject/, animation/ and scene/
This commit is contained in:
@ -34,6 +34,18 @@ class SmoothedVectorizedHomotopy(Homotopy):
|
||||
Homotopy.update_submobject(self, submob, start, alpha)
|
||||
submob.make_smooth()
|
||||
|
||||
class ComplexHomotopy(Homotopy):
|
||||
def __init__(self, complex_homotopy, mobject, **kwargs):
|
||||
"""
|
||||
Complex Hootopy a function Cx[0, 1] to C
|
||||
"""
|
||||
def homotopy(event):
|
||||
x, y, z, t = event
|
||||
c = complex_homotopy((complex(x, y), t))
|
||||
return (c.real, c.imag, z)
|
||||
Homotopy.__init__(self, homotopy, mobject, *args, **kwargs)
|
||||
|
||||
|
||||
class PhaseFlow(Animation):
|
||||
CONFIG = {
|
||||
"virtual_time" : 1,
|
||||
|
Reference in New Issue
Block a user