Created
April 16, 2020 16:46
-
-
Save cobanov/3f266433adb75144d131706552ac0b89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from manimlib.imports import * | |
import math | |
class Shape(Scene): | |
def construct(self): | |
circle = Circle() | |
self.play(ShowCreation(Circle())) | |
self.wait(1) | |
class makeText(Scene): | |
def construct(self): | |
first_line = TextMobject("Herkese Merhaba!") | |
second_line = TextMobject("Mert Cobanov Kanalına Hoşgeldiniz") | |
third_line = TextMobject("Bugün sizlerle birlikte") | |
forth_line = TextMobject("Manim Animasyonlarının Nasıl Yapıldığına Bakacağız") | |
second_line.next_to(first_line, DOWN) | |
self.wait(1) | |
self.play(Write(first_line)) | |
self.play(Transform(first_line, second_line)) | |
self.wait(1) | |
self.play(FadeOut(second_line), ReplacementTransform(first_line, third_line)) | |
self.wait(1) | |
self.play(Transform(third_line, forth_line)) | |
self.wait(2) | |
class makeText2(Scene): | |
def construct(self): | |
first_line = TextMobject("Batuhan Senin Aq") | |
second_line = TextMobject("Neden yanımıza gelmiyorsun") | |
third_line = TextMobject("Neyse") | |
forth_line = TextMobject("Yarın kamp yapıyoz mu?") | |
second_line.next_to(first_line, DOWN) | |
self.wait(1) | |
self.play(Write(first_line)) | |
self.play(Transform(first_line, second_line)) | |
self.wait(1) | |
self.play(FadeOut(second_line), ReplacementTransform(first_line, third_line)) | |
self.wait(1) | |
self.play(Transform(third_line, forth_line)) | |
self.wait(2) | |
class Graphing(GraphScene): | |
CONFIG = { | |
"x_min": -5, | |
"x_max": 5, | |
"y_min": -4, | |
"y_max": 4, | |
"graph_origin": ORIGIN, | |
"function_color": WHITE, | |
"axes_color": BLUE | |
} | |
def construct(self): | |
#Make graph | |
self.setup_axes(animate=True) | |
func_graph=self.get_graph(self.func_to_graph,self.function_color) | |
graph_lab = self.get_graph_label(func_graph, label = "x^{2}") | |
func_graph_2=self.get_graph(self.func_to_graph_2,self.function_color) | |
graph_lab_2 = self.get_graph_label(func_graph_2, label = "x^{3}") | |
vert_line = self.get_vertical_line_to_graph(1,func_graph,color=YELLOW) | |
x = self.coords_to_point(1, self.func_to_graph(1)) | |
y = self.coords_to_point(0, self.func_to_graph(1)) | |
horz_line = Line(x,y, color=YELLOW) | |
point = Dot(self.coords_to_point(1,self.func_to_graph(1))) | |
#Display graph | |
self.play(ShowCreation(func_graph), Write(graph_lab)) | |
self.wait(1) | |
self.play(ShowCreation(vert_line)) | |
self.play(ShowCreation(horz_line)) | |
self.add(point) | |
self.wait(1) | |
self.play(Transform(func_graph, func_graph_2), Transform(graph_lab, graph_lab_2)) | |
self.wait(2) | |
def func_to_graph(self, x): | |
return (x**2) | |
def func_to_graph_2(self, x): | |
return(x**3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment