import manimlib as mnm
import math
def func(p):
return p[0],2/(2+p[1])-2,p[2]
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('แมงมุมแล้วไง\n\nข้องใจเหรอคะ?',color='#d0adff',size=2)
self.play(
text.animate.apply_function(func),
run_time=1
)
def func(p):
return p[0],0.1*p[1]*p[0]**2,p[2]
def func(p):
return p[0],p[1]/(1+p[0]**2),p[2]
def func(p):
return p[0]*1.5,p[1]+0.25*p[0]**2-2,p[2]
def func(p):
return p[1]*2,p[0]*0.5,p[2]
def func(p):
return p[0],p[1]*1.2**p[0],p[2]
def func(p):
s = math.sin((p[0]+p[1])*5)*0.06
return p[0]+s,p[1]+s,p[2]
def func(p):
r = 2.5-p[1]/2
theta = (p[0]*0.2-0.5)*math.pi
x = r*math.cos(theta)*1.8
y = r*math.sin(theta)
return x,y,p[2]
import manimlib as mnm
import math
def func(p):
s = math.sin(p[0]*2)
return p[0]+s*0.3,p[1]*(s+1.8),p[2]
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('มานีกับมาลี',color='#adffd0',size=4)
self.play(
mnm.ApplyPointwiseFunction(func,text),
run_time=1
)
import manimlib as mnm
import cmath
def cf(p):
return cmath.sinh((p-1j)*0.5)+2j
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ระนาบเชิงซ้อน\n\nแล้วไง ข้องใจเรอะ?',color='#ffade3',size=1.8)
self.play(
text.animate.apply_complex_function(cf),
run_time=1
)
import manimlib as mnm
import cmath
def cf(p):
return cmath.sin(p*0.4)*5
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ระนาบเชิงซ้อนแล้วไง\n\n ข้องใจตรงไหนกัน?',color='#fff1ad',size=1.7)
self.play(
mnm.ApplyComplexFunction(cf,text),
run_time=1
)
ติดตามอัปเดตของบล็อกได้ที่แฟนเพจ