<gh_stars>0
from manimlib.imports import *
import numpy as np
class SeeIfFormulaMakesSense(ThreeDScene,Scene):
    def construct(self):
        grid = NumberPlane()
        axis = Axes()
        self.add(grid, axis)
        dot3 = Dot(np.array([4,3,0]), radius=0.08, color=YELLOW)
        apaa1 = TextMobject("Suatu sistem koordinat dapat dikatakan Rectangular jika jarak diantara dua titik C (X1,X2,...) dan D (Y1,Y2,...) memenuhi persamaan berikut: ")
        apaa2 = TextMobject("$$ \sqrt{(x^{1}-x^{1})^{2}+(x^{2}-x^{2})^{2}+\cdots }=\sqrt{\delta _{ij}\Delta x^{i}\Delta x^{j}}\therefore \Delta x^{i}=x^{i}-y^{i}$$")
        apaa1.shift(2*DOWN+1.5*RIGHT)
        apaa2.next_to(apaa1,DOWN)
        garissapa = TextMobject("x1")
        garissapa1 = TextMobject("x2")
        garissapa2 = TextMobject("B")
        garissapa3 = TextMobject("O")
        apaateh = (VGroup(apaa1,apaa2))
        garissapa.shift(0.25*DOWN+2*RIGHT)
        garissapa1.shift(1.5*UP+4.4*RIGHT)
        garissapa2.shift(3*UP+4.4*RIGHT)
        garissapa3.shift(0.25*DOWN+0.25*LEFT)

        apaateh.set_color_by_gradient(PURPLE,RED) 
        apaateh.scale(0.7)
        apaateh.shift(1.5*LEFT)
        apatehkotak = Rectangle(height = 2.2, width = 12)
        apatehkotak.set_fill(YELLOW, opacity= 1)
        #apatehkotak.fill_color(WHITE)
        apatehkotak.shift(2.5*DOWN)
        #apatehkotak.set_depth(-1)
        
        gariss= DashedLine([3, 0, 0], color=RED)
        gariss.shift(3*UP)
        gariss.scale(2)
        START = (4,0,0)
        END =   (4,1.5,0)
        gariss1= DashedLine(START,END)
        gariss1.scale(2)
        gariss1.shift(0.75*UP)
        gariss2= Arrow([0, 0, 0], [4, 3, 0], color=BLUE)
        gariss2.scale(1.1)
        self.play(FadeIn(dot3))
        self.play(Write(gariss1))
        self.play(Write(gariss))
        self.wait()
        self.play(Write(gariss2))
        self.play(FadeIn(garissapa))
        self.play(FadeIn(garissapa1))
        self.play(FadeIn(garissapa2))
        self.play(FadeIn(garissapa3))
        self.wait(2)
     
        garissteh = (VGroup(gariss1,gariss2,gariss,dot3,garissapa,garissapa1,garissapa2,garissapa3))
        self.wait(1.5)

        self.wait()
        self.play(Write(apatehkotak),
                  Write(apaateh))
        self.wait(2)

        self.wait(3)
        self.play(FadeOut(apatehkotak), FadeOut(garissteh), FadeOut(axis))
        definisii = TextMobject("syarat rectangular kordinat")
        definisii.scale(1.25)
        definisii.set_color_by_gradient(PURPLE,RED)
        definisii = TextMobject("Syarat Rectangular Coordinates")
        definisi = TextMobject(" 1. P adalah sebuah titik pada sistem koordinat","$(xi)$"," yang ditunjukan dengan" "$P : (x¹,x²,...,x^{n})$")
        definisi1 = TextMobject(" 2.","$\\vec{x}^{i}$","adalah sistem koordinat lain yang memenuhi bilangan riil sehingga koordinat P dalam sistem ini adalah", "$(x1,x2,...,xn)$")
        definisi2 = TextMobject(" 3. misal", "$\\vec{x}^{i}= \\vec{x}^{i}(x¹,x²,...,x^{n}) \\mathcal{F}$", "transformasi")
        definisi3 = TextMobject("jika fungsi", "$\\vec{x}^i(x^1, x^2, ...., x^{n}$" "adalah bilangan real, memiliki turunan parsial kedua yang kontinu disetiap titik,")
        definisi4 = TextMobject("dan dapat persamaannya dapat bulak balik maka", "$\\mathcal{F}$", "disebut transformasi koordinat")
        definisii.set_color_by_gradient(PURPLE,RED)
        self.play(ReplacementTransform(apaateh,definisii, run_time=2))
        definisi.shift(1.5*UP)
        definisi1.next_to(definisi,DOWN)
        definisi2.next_to(definisi1,DOWN)
        definisi3.next_to(definisi2,DOWN)
        definisi4.next_to(definisi3,DOWN)
        self.wait()
        self.play(ApplyMethod(definisii.move_to, 3.5*UP))
        apatehkotak1 = Rectangle(height =5.5, width = 12.8)
        apatehkotak1.set_fill(YELLOW, opacity= 1)
        apatehkotak1.shift(0.25*DOWN)
        definisiteh = (VGroup(definisi,definisi1,definisi2,definisi3,definisi4))
        definisiteh.scale(0.75)
        definisiteh.shift(0.75*UP)
        definisiteh.set_color_by_gradient(PURPLE,RED)
        self.play( Write(apatehkotak1,run_time=3), Write(definisiteh,run_time=5))
        self.wait()
        
        
        self.wait()
        


from manimlib.imports import *
import numpy as np
class SeeIfFormulaMakesSense(ThreeDScene,Scene):
    def construct(self):
        grid = NumberPlane()
        axis = Axes()
        self.add(grid, axis)
        dot3 = Dot(np.array([4,3,0]), radius=0.08, color=YELLOW)
        apaa1 = TextMobject("Suatu sistem koordinat dapat dikatakan Rectangular jika jarak diantara dua titik C (X1,X2,...) dan D (Y1,Y2,...) memenuhi persamaan berikut: ")
        apaa2 = TextMobject("$$ \sqrt{(x^{1}-x^{1})^{2}+(x^{2}-x^{2})^{2}+\cdots }=\sqrt{\delta _{ij}\Delta x^{i}\Delta x^{j}}\therefore \Delta x^{i}=x^{i}-y^{i}$$")
        apaa1.shift(2*DOWN+1.5*RIGHT)
        apaa2.next_to(apaa1,DOWN)
        garissapa = TextMobject("x1")
        garissapa1 = TextMobject("x2")
        garissapa2 = TextMobject("B")
        garissapa3 = TextMobject("O")
        apaateh = (VGroup(apaa1,apaa2))
        garissapa.shift(0.25*DOWN+2*RIGHT)
        garissapa1.shift(1.5*UP+4.4*RIGHT)
        garissapa2.shift(3*UP+4.4*RIGHT)
        garissapa3.shift(0.25*DOWN+0.25*LEFT)

        apaateh.set_color_by_gradient(PURPLE,RED) 
        apaateh.scale(0.7)
        apaateh.shift(1.5*LEFT)
        apatehkotak = Rectangle(height = 2.2, width = 12)
        apatehkotak.set_fill(YELLOW, opacity= 1)
        #apatehkotak.fill_color(WHITE)
        apatehkotak.shift(2.5*DOWN)
        #apatehkotak.set_depth(-1)
        
        gariss= DashedLine([3, 0, 0], color=RED)
        gariss.shift(3*UP)
        gariss.scale(2)
        START = (4,0,0)
        END =   (4,1.5,0)
        gariss1= DashedLine(START,END)
        gariss1.scale(2)
        gariss1.shift(0.75*UP)
        gariss2= Arrow([0, 0, 0], [4, 3, 0], color=BLUE)
        gariss2.scale(1.1)
        self.play(FadeIn(dot3))
        self.play(Write(gariss1))
        self.play(Write(gariss))
        self.wait()
        self.play(Write(gariss2))
        self.play(FadeIn(garissapa))
        self.play(FadeIn(garissapa1))
        self.play(FadeIn(garissapa2))
        self.play(FadeIn(garissapa3))
        self.wait(2)
     
        garissteh = (VGroup(gariss1,gariss2,gariss,dot3,garissapa,garissapa1,garissapa2,garissapa3))
        self.wait(1.5)

        self.wait()
        self.play(Write(apatehkotak),
                  Write(apaateh))
        self.wait(2)

        self.wait(3)
        self.play(FadeOut(apatehkotak), FadeOut(garissteh), FadeOut(axis))
        definisii = TextMobject("syarat rectangular kordinat")
        definisii.scale(1.25)
        definisii.set_color_by_gradient(PURPLE,RED)
        definisii = TextMobject("Syarat Rectangular Coordinates")
        definisi = TextMobject(" 1. P adalah sebuah titik pada sistem koordinat","$(xi)$"," yang ditunjukan dengan" "$P : (x¹,x²,...,x^{n})$")
        definisi1 = TextMobject(" 2.","$\\vec{x}^{i}$","adalah sistem koordinat lain yang memenuhi bilangan riil sehingga koordinat P dalam sistem ini adalah", "$(x1,x2,...,xn)$")
        definisi2 = TextMobject(" 3. misal", "$\\vec{x}^{i}= \\vec{x}^{i}(x¹,x²,...,x^{n}) \\mathcal{F}$", "transformasi")
        definisi3 = TextMobject("jika fungsi", "$\\vec{x}^i(x^1, x^2, ...., x^{n}$" "adalah bilangan real, memiliki turunan parsial kedua yang kontinu disetiap titik,")
        definisi4 = TextMobject("dan dapat persamaannya dapat bulak balik maka", "$\\mathcal{F}$", "disebut transformasi koordinat")
        definisii.set_color_by_gradient(PURPLE,RED)
        self.play(ReplacementTransform(apaateh,definisii, run_time=2))
        definisi.shift(1.5*UP)
        definisi1.next_to(definisi,DOWN)
        definisi2.next_to(definisi1,DOWN)
        definisi3.next_to(definisi2,DOWN)
        definisi4.next_to(definisi3,DOWN)
        self.wait()
        self.play(ApplyMethod(definisii.move_to, 3.5*UP))
        apatehkotak1 = Rectangle(height =5.5, width = 12.8)
        apatehkotak1.set_fill(YELLOW, opacity= 1)
        apatehkotak1.shift(0.25*DOWN)
        definisiteh = (VGroup(definisi,definisi1,definisi2,definisi3,definisi4))
        definisiteh.scale(0.75)
        definisiteh.shift(0.75*UP)
        definisiteh.set_color_by_gradient(PURPLE,RED)
        self.play( Write(apatehkotak1,run_time=3), Write(definisiteh,run_time=5))
        self.wait()
        
        
        self.wait()
#apatehkotak.fill_color(WHITE) #apatehkotak.set_depth(-1)