import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-5.5,3.5,0])
p2 = np.array([6.5,-2.5,0])
sen = mnm.Line(p1,p2)
self.play(
mnm.Write(sen),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
# จุดต้นปลายเดิม
p1 = np.array([-5,3,0])
p2 = np.array([5,-3,0])
# จุดต้นปลายใหม่
p3 = np.array([7,0,0])
p4 = np.array([-7,0,0])
# สร้างเส้น
sen = mnm.Line(p1,p2)
self.play(
sen.animate.set_points_by_ends(p3,p4),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([6,-3,0])
p2 = np.array([-6,3,0])
sen = mnm.Line(p1,p2,
stroke_width=10,
stroke_color='#71ff92',
stroke_opacity=0.2)
self.play(
sen.animate.set_stroke(width=70,
color='#b86fe7',
opacity=1),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([5,1,0])
p2 = np.array([-5,-1,0])
sen = mnm.Line(p1,p2,
path_arc=np.radians(120),
color='#8583e1',
stroke_width=20)
self.play(
sen.animate.set_path_arc(-np.radians(80)),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([6.5,3,0])
p2 = np.array([-6.5,-2.5,0])
senpra = mnm.DashedLine(
p1,p2,
dash_length=0.2,
color='#d4b1f2',
stroke_width=19
)
self.play(
mnm.Write(senpra),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([6,3.5,0])
p2 = np.array([-6,-3.5,0])
senpra1 = mnm.DashedLine(
p1,p2,
dash_length=0.8
)
senpra2 = mnm.DashedLine(
p1,p2,
dash_length=0.1
)
self.play(
mnm.Transform(senpra1,senpra2),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([5.5,-3.5,0])
p2 = np.array([-6,3.5,0])
senpra1 = mnm.DashedLine(
p1,p2,
positive_space_ratio=0.2
)
senpra2 = mnm.DashedLine(
p1,p2,
positive_space_ratio=0.8
)
self.play(
mnm.Transform(senpra1,senpra2),
run_time=1.5
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ภาษี',size=7,color='#c27bff')
kakabat = mnm.Cross(text)
kakabat.set_stroke(color='#77ffaa',width=30)
self.add(text)
self.play(
mnm.Write(kakabat),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ความหมาย',size=4,color='#ff7bf1')
# เส้นขีดทั้งหมด
sentai1 = mnm.Underline(text)
sentai1.set_stroke(color='#f2a756',width=20)
# เส้นขีดเฉพาะส่วน
sentai2 = mnm.Underline(text[4:7])
sentai2.set_stroke(color='#f2567b',width=30)
self.add(text)
self.play(
mnm.FadeTransform(sentai1,sentai2),
run_time=1
)
self.wait(0.5)
ติดตามอัปเดตของบล็อกได้ที่แฟนเพจ