Manim Tutorial | How to use Updaters & Updater Functions

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024
  • Code from this video at github.com/bri...
    IF you are struggling to install Manim, here are some links to help;
    ManimCE: • Installing Manim CE | ...
    Manim3B1B: • The Manim Cast #1 - In...
    ManimGL & ManimCE: • Video
    I will be using the Community Edition of Manim (ManimCE). I'll be more impressed if you can download and install the program than if you can follow along with this video!
    Discord link: / discord
    Manim Documentation: docs.manim.com...

Комментарии • 36

  • @kostadineftimov9685
    @kostadineftimov9685 3 года назад +5

    Hey Brian, regarding the last example:
    it seems that the animate_coin() function is "overwritten" by the always_redraw(), therefore we never see the coin being shifted during the animation. What is inside the animating function has no effect; writing 'pass' inside would produce the same animation as the one @3:53
    So I removed always_redraw() and instead created the coin only once with get_coin(), but then the text was not being updated, since we are not addressing the Tex object of the coin.
    Writing coin[1].become(Tex("...")) makes it work, but I assume this isn't the best solution.
    PS: Your videos have been extremely helpful to me. Many thanks.

    • @BrianAmedee
      @BrianAmedee  3 года назад

      Good point, I missed this when rendering the animation. I'll review this and update the github code. Thanks for pointing it out

  • @eshaannagavenkata8836
    @eshaannagavenkata8836 3 года назад +5

    this channel should be getting a 100 views in first 5 mins

  • @pdfarrell
    @pdfarrell 2 года назад +1

    Thanks a lot for your tutorials. Just started with manim and I'm loving it.

  • @statproacademy
    @statproacademy 3 года назад +1

    Thank you so much
    Brian Amedee.You make learning manim very easy.Great video again.We wait every time to see your new video on manim.Keep making

    • @BrianAmedee
      @BrianAmedee  3 года назад +2

      Thanks for the compliment! I hope the learning is going well

    • @statproacademy
      @statproacademy 3 года назад +1

      ​@@BrianAmedee I'm currently applying what I learned in this video.Thank you.

  • @eshaannagavenkata8836
    @eshaannagavenkata8836 3 года назад +2

    youtube is not doing great in recommending the best videos

  • @estudiosogarboso
    @estudiosogarboso 3 года назад +1

    Thank you so much for your videos!

  • @weshare-7days
    @weshare-7days 3 года назад +2

    A great teacher ❤️

  • @gubby740
    @gubby740 3 года назад

    Nice content bro! Keep it up!

  • @Higgsinophysics
    @Higgsinophysics Год назад

    Very helpfull. Thanks!!

  • @galaxysplus2011
    @galaxysplus2011 2 года назад +1

    Hi Brian, thank you very much for the tutorial. I really like the style of your explanations, going through the code and explaining the parts!
    I have one question:
    In the "New" scene you wrote the "get_helper_function" outside the class. But in the last example the "get_coin" function is inside the class. How do decide, which function has to be inside and qhich one can be inside. I hope the question makes sense...
    Thanks a lot!

  • @yashrawat9409
    @yashrawat9409 3 года назад +1

    Thanks otherwise I mess up updater then my animation went wild

  • @yellamillivijayasandeepch2483
    @yellamillivijayasandeepch2483 Год назад

    what res is doing in animate_coin function

  • @ducabyte
    @ducabyte 3 года назад

    Nice presentation. I wandering now about sobreposition of elements. Can you tell us how do you show animations over code editor, and what you are using for annotation?

    • @BrianAmedee
      @BrianAmedee  3 года назад

      Thanks. I use Premiere Pro for layering the videos, and OneNote to ink over the code

    • @ducabyte
      @ducabyte 3 года назад

      @@BrianAmedee ty

  • @StarFury2
    @StarFury2 2 года назад

    2:36 Unfortunately the helper_function is not a replacement for always_redraw (rather a clever workaround in this special case), as it can't change any attributes of text after it's creation. It just groups mobjects, to be translated together, that's why it's faster.
    To point out my meaning, "move_to(box.get_center())" chained method can be completely removed in the "get_helper_function" as it has no effect on this animation.
    For real-time dynamically updating text label, it seems we still have to use slow always_redraw() method.

    • @BrianAmedee
      @BrianAmedee  2 года назад

      Ah I see, very good point. Thanks for indicating to me

  • @igorerovenko
    @igorerovenko 3 года назад +1

    I didn't understand the last example. Why do you need two "coin" functions?

    • @BrianAmedee
      @BrianAmedee  3 года назад +1

      I have a 'get_coin' function, which displays the Mobject of the coin. (it returns a VGroup of stuff).
      The second function 'animate_coin' will give the coin the flipping effect, as this is the 'Updater Function' (ie, do all those things a for each frame of rendering)

    • @igorerovenko
      @igorerovenko 3 года назад

      @@BrianAmedee So, the get_coin function is so long to ensure the first state of the coin is random?

    • @BrianAmedee
      @BrianAmedee  3 года назад

      @@igorerovenko Essentially yeah. And to intially call a coin onto the scene

  • @eshaannagavenkata8836
    @eshaannagavenkata8836 3 года назад +2

    first again!

  • @scollyer.tuition
    @scollyer.tuition 3 года назад

    This is a very useful addition to the manim documentation, which seems pretty thin in places. However, I have a question: is it possible to use an updater to modify a Text object in some way? I can see no setter method for these objects that would allow that, but I'm wondering if I'm missing some clever trick.

    • @BrianAmedee
      @BrianAmedee  2 года назад

      Modify as in change the text? Or modify as in change the position on the screen?

    • @scollyer.tuition
      @scollyer.tuition 2 года назад

      @@BrianAmedee Yes, sorry, I meant "modify the text", rather than any other property of the object so for example, given:
      t = Text("ABC")
      do something like:
      t.set_text("DEF")

    • @BrianAmedee
      @BrianAmedee  2 года назад +1

      @@scollyer.tuition I would be using 'self.play(Transform(text1, text2))' where you create 2 separate text objects!

    • @scollyer.tuition
      @scollyer.tuition 2 года назад

      @@BrianAmedee Thanks. That's a nice solution. I wonder if the .become() method can be used in a similar way here too?

    • @BrianAmedee
      @BrianAmedee  2 года назад

      @@scollyer.tuition maybe. I haven't tried that method, but you could ask people in the discord if it's possible!