import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-6,2,0]) # หางลูกศร
p2 = np.array([6,-2,0]) # หัวลูกศร
lukson = mnm.Arrow(p1,p2,fill_color='#efa5c4')
self.add(mnm.Dot(p1),
mnm.Dot(p2))
self.play(
mnm.Write(lukson),
run_time=1
)
self.wait(0.5)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-6,0,0])
p2 = np.array([6,0,0])
lukson = mnm.VGroup(*[mnm.Arrow(p1,p2,buff=i*0.25,fill_color='#a76fe0') for i in range(11)])
lukson.arrange(mnm.UP)
self.play(
mnm.Write(lukson),
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])
lukson = mnm.VGroup(*[mnm.Arrow(p1,p2,
buff=0,
color='#a5c1ef',
fill_opacity=0,
stroke_width=5,
path_arc=np.radians(-90+i*30))
for i in range(7)])
self.add(mnm.Dot(p1),
mnm.Dot(p2))
self.play(
mnm.Write(lukson),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-5,-2,0]) # จุดหางลูกศร
p2 = np.array([5,3,0]) # จุดหัวลูกศร
p3 = np.array([3,-3,0]) # จุดหัวลูกศรจุดใหม่
lukson = mnm.Arrow(p1,p2,buff=0,fill_color='#c4efa5')
# วาดจุด
self.add(mnm.Dot(p1),
mnm.Dot(p2),
mnm.Dot(p3))
self.play(
lukson.animate.set_points_by_ends(p1,p3),
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([5,-2,0]) # จุดหัวลูกศร
lukson = mnm.Arrow(p1,p2,buff=0,fill_color='#efa5b1',thickness=0.01)
self.play(
lukson.animate.set_thickness(1),
run_time=1.5
)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-6,0,0]) # จุดหางลูกศร
p2 = np.array([6,0,0]) # จุดหัวลูกศร
lukson = mnm.VGroup(*[mnm.Arrow(p1,p2,buff=0,tip_width_ratio=i*2+1,fill_color='#9eb2c8') for i in range(10)])
lukson.arrange(mnm.DOWN)
self.play(
mnm.Write(lukson),
run_time=1
)
self.wait(0.5)
import manimlib as mnm
import numpy as np
class Manimala(mnm.Scene):
def construct(self):
p1 = np.array([-6,0,0]) # จุดหางลูกศร
p2 = np.array([6,0,0]) # จุดหัวลูกศร
lukson = mnm.VGroup(*[mnm.Arrow(p1,p2,
buff=0,
tip_angle=np.radians(5+i*10),
fill_color='#c89eb8')
for i in range(14)])
lukson.arrange(mnm.DOWN)
self.play(
mnm.Write(lukson),
run_time=1
)
self.wait(0.5)
ติดตามอัปเดตของบล็อกได้ที่แฟนเพจ