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...
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.
Good point, I missed this when rendering the animation. I'll review this and update the github code. Thanks for pointing it out
this channel should be getting a 100 views in first 5 mins
Thanks a lot for your tutorials. Just started with manim and I'm loving it.
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
Thanks for the compliment! I hope the learning is going well
@@BrianAmedee I'm currently applying what I learned in this video.Thank you.
youtube is not doing great in recommending the best videos
Thank you so much for your videos!
A great teacher ❤️
Nice content bro! Keep it up!
Thanks, will do!
Very helpfull. Thanks!!
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!
Thanks otherwise I mess up updater then my animation went wild
what res is doing in animate_coin function
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?
Thanks. I use Premiere Pro for layering the videos, and OneNote to ink over the code
@@BrianAmedee ty
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.
Ah I see, very good point. Thanks for indicating to me
I didn't understand the last example. Why do you need two "coin" functions?
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)
@@BrianAmedee So, the get_coin function is so long to ensure the first state of the coin is random?
@@igorerovenko Essentially yeah. And to intially call a coin onto the scene
first again!
My friend, you are too fast!
@@BrianAmedee time zone advantage
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.
Modify as in change the text? Or modify as in change the position on the screen?
@@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")
@@scollyer.tuition I would be using 'self.play(Transform(text1, text2))' where you create 2 separate text objects!
@@BrianAmedee Thanks. That's a nice solution. I wonder if the .become() method can be used in a similar way here too?
@@scollyer.tuition maybe. I haven't tried that method, but you could ask people in the discord if it's possible!