#概要
manimの作法、調べてみた。
rate_func使ってみた。
#サンプルコード
from manimlib.imports import *
class test(GraphScene):
CONFIG = {
"x_labeled_nums" : [],
"y_labeled_nums" : [],
"x_axis_label" : "Temperature",
"y_axis_label" : "Pressure",
"graph_origin" : 2.5 * DOWN + 2 * LEFT,
"corner_square_width" : 4,
"example_point_coords" : (2, 5),
}
def construct(self):
self.setup_axes()
path = VMobject().set_points_smoothly([ORIGIN, 2 * UP + RIGHT, 2 * DOWN + RIGHT, 5 * RIGHT, 4 * RIGHT + UP, 3 * RIGHT + 2 * DOWN, DOWN + LEFT, 2 * RIGHT])
point = self.coords_to_point(*self.example_point_coords)
path.shift(point)
path.set_color(GREEN)
self.play(ShowCreation(path, run_time = 10, rate_func = linear))
self.wait()
self.remove(path)
self.play(ShowCreation(path, run_time = 10, rate_func = there_and_back))
self.wait()
self.remove(path)
#生成した動画
以上。