I always wondered how 3B1B makes the animations in his videos. Super pleased to see it's available as a Python library. Can't wait to play around with this!
Grant has been one of the inspirations since my early BE days (that was years ago). I got so much inspired from manim that I tried to make my own animation tool, panim [0] where I implemented mathematical concepts I understood. Nowadays, whenever I am in a rut, I jump back to panim and try to jot down my ideas into code.
Tough luck. Using 0-indexing would have lost Matlab users to the Julia community. So they consciously decided to rather lose you. :-)
I got used to switching between 0/1-indexing. The only place it actually hurts is when using modulo to remain within some range. And this is needed much much less in Julia than in C and C-like.
It's funny, from the votes on my comment it seems like I came across as seriously criticizing Julia (a language I admire) rather than just being hyped about that video (which is excellent).
Honest question, is it that hard to just adjust to 1-indexing? I switch languages all the time and they all have their different quirks and I find it really hard to understand why people cannot deal with for example 1-indexing. From the outside looking in it seems like one of the easier things to adjust to?
It's intuitive to me that the option "c) 2 ≤ i ≤ 12" is the only acceptable answer, since it is the only range you can tell immediately at a glance what numbers are included: 2, ..., 12. There shouldn't be a 1 or a 13 in the notation if there won't be a 1 or a 13 in the sequence it's describing -- it's just bad design.
If you select the option "c) 2 ≤ i ≤ 12", then Dijkstra's subsequent argument for zero-indexing becomes an argument for one-indexing, because a sequence of length N yields the range 1 <= i <= N when subscripting with 1, but 0 <= i <= N-1 when starting at 0. The latter is uglier than the former.
It is a pain, yes, after decades of 0-indexed languages! I switched to mostly-Julia from mostly-C in the last year, and the 1-indexing is the main irritating thing. I have to learn different ways of doing things, which I guess I haven't yet, so the parts in my programs dealing with 1-indexing seem cumbersome and fiddly, every time. 0-indexing just seems mathematically much simpler. And I like things making things as simple as possible. Maybe as I learn different habits, that impression will go away.
It's also about the only thing I really don't like about Julia – so I can understand someone saying 1-indexing is a deal-breaker.
> Maybe as I learn different habits, that impression will go away.
I'd bet this is true. It doesn't seem fiddly to me as a mathematician. Thinking habits can be really hard to get past though, so I also understand people not liking 1-based. I just think the argument from math is wrong.
Yes. It looks wrong and feels wrong. I can adjust to indentation styles, programming styles, etc. but 1-based indexing is an absolute deal-breaker for me. It's one of the few things the programming community has settled on - indexing starts at 0, as it is mathematically the most natural start.
If you are counting, 1-based makes a lot of sense. If you're indexing, they're equally valid approaches. However, if you're indexing then you should be able to use an arbitrary range and not be restricted to one or the other (with a mapping function from your actual range to the language's base).
Honestly, not that many people in math think about the construction of the natural numbers frequently. Yeah, we learn about it of course, but that's about it. Very often the natural numbers do not include 0. Often they do. I've seen $\mathbb Z_{\geq0}$ and $\mathbb Z_+$ used to avoid having to worry about it.
Hell, different countries can't even agree on whether 0 is positive. In France, 0 is considered both positive and negative. In USA, 0 is considered neither.
(quick edit: I realize my last paragraph makes the $\mathbb Z_+$ option seem weird. I do math in the States.)
Only if you need zero, which you don't need for indexing. Peano's original axioms started from 1 (which is logically equivalent to starting from 0, or -1, or potato) if all you are doing is counting)
In Sweden, the set usually referred to as "de naturliga talen" (the natural numbers) is any number n such that 0 <= n.
Or, at least, that was the case when I did maths there. No idea what the default interpretation is these days.
This is mostly why I don't say "natural numbers" and instead say "positive integers" or "non-negative integers", depending on if I want 0 included or not.
I've used many languages, and I don't have much problem with any quirks or major differences (Haskell, JavaScript, ...). The only language I've bounced off of is Prolog, and I'm planning another attempt.
But I've done a lot of low level programming, and 0-based arrays are a no-brainer to deal with. Switching to 1-based arrays throws out all of my intuitions and makes me have to recalculate everything, which is error-prone.
My personal experience using Lua/love2d for some (amateur/hobbyist) game programming is that the adjustment really wasn't too difficult at all -- I've run into an off-by-one error or two, but not at any greater (or reduced) frequency compared to 0-indexed languages AFAICT. Obviously, some of the sibling comments here disagree, so the only reasonable conclusion I can draw is that it varies from person to person how much they care and how much effort it takes to adjust.
At the end of the day, like all language design decisions involving an arbitrary choice among reasonable options, you get used to it once you use the language enough (and also some folks will refuse to ever use the language because of it for aesthetic reasons).
No. Multiple dispatch means that libraries should just be able to handle it. If you ever run into problems, file a bug report. It should get fixed pretty quickly.
The course is kind of all over the place. There isn't a lot of focus in the content and the quality of the teaching is inconsistent. Grant's videos were the best by far.
The single most awesome visualization I've seen to date that uses Manim and Grant has made some amazing stuff. This video removes all mystery of how ReLU activation works. [0]
As a teacher, I'd like to use this in presentation slides, i.e. pause the output at specific times and continue only after a button is pressed. Does anyone know if there exists a tool, e.g., to automatically pause MP4 playback at specific times?
This allows you to e.g. get the current time (get_time) and pause playback (pause). So you just have to write a small script that issues the commands the way you want and you'll be good.
I built exactly this in my Manim-based library, code-video-generator [1] (via the code-video-generator command and the --slides flag). It basically turns any Manim scene.wait() call into a pause that I can then advance with a clicker. I used it for this video [2], where I was recording in front of a green screen, but wanted the exact control when the animation continued. code-video-generator played the video fullscreen, which I then captured via obs [3] and used the obs display as a monitor to see if I was pointing at the right spot. Was a bit tricky to get all set up but worked pretty well.
if you are comfortable with LaTeX, you can use the animate package on beamer slides. It does just that, and allows both playing the animation or running it frame by frame (fwd and back).
manim works by generating a "partial movie file" for each animation, i.e. a single mp4 file for each scene.wait() call and so on. The final output just stitches these together.
I did exactly what you want using a small reveal.js plugin that parses the list of partial files generated by manim and inserts the corresponding video files into the presentation in thst order, it worked quite well. Let me know if you're interested and I'll throw it up on a GitHub gist.
Aims Fertility is a Fertility and Reproductive healthcare Hospital Chain. We assist you to get the best treatment possible well within your budget and from the most experienced doctors in its network and in various Clinics and Hospitals by helping you with unbiased transparent information, and No hidden charges across Fertility center and assist with Trust, Transparency, Independence, Authority, and Patient Feedback.
• Find Best IVF Centre in india
• Get Low-Cost Surrogacy Package in india
• 100% Guaranteed Success or money back plan in IVF only with Aims Fertility
• Get Free Consultation with Highly Experienced Doctor with Aims Fertility
Contact us @ 9667619090
Email us @ support@aimsfertility.com
Visit us @ www.aimsfertility.com
https://aimsfertility.com
This is amazing. I'm looking for a low-code / no-code version of something like this for my video essays. Right now I have to rely on Adobe After effects which is a) costly and b) a little too much kitchen sink.
It reminds me of the quote from SICP whenever i a domain specific languages frameworks etc
"Establishing new languages is a powerful strategy for control-ling complexity in engineering design; we can often enhance ourability to deal with a complex problem by adopting a new lan-guage that enables us to describe (and hence to think about)the problem in a different way, using primitives, means of com-bination, and means of abstraction that are particularly wellsuited to the problem at hand." -- Harold Abelson
This feels like something that should exist on javascript/typescript, and produce results directly on a Canvas. Having to use an intermediate video feels jarring on a website. I guess people producing videos directly (Youtubers) will find it more useful.
I don't see much use in that for non-interactive content. Rendering something like that isn't cheap (computationally) and doing it potentially millions of times for a popular piece of content is just wasteful. A canvas element also wouldn't be any less "jarring", since ultimately, it's still just a box of pixels.
As for interactive content, you'd probably be better off using something else that was created with a focus on realtime performance and portability. You
81 comments
[ 5.5 ms ] story [ 64.3 ms ] threadAccording to the original Manim's readme, it's recommended to use the Community Edition, since it's updated more often.
מנים
In any case, if they were fighting mathematicians, it would be pretty awesome.
Really enjoy these kinds of tools. Though I wish you didn't need an account to preview or upload content to manim.
(Say, "panim" name might be a gimmick?)
--- [0] - https://github.com/NISH1001/panim
https://computationalthinking.mit.edu/Fall20/lecture26/
I believe he was going to do some of the visualizations
I got used to switching between 0/1-indexing. The only place it actually hurts is when using modulo to remain within some range. And this is needed much much less in Julia than in C and C-like.
If you select the option "c) 2 ≤ i ≤ 12", then Dijkstra's subsequent argument for zero-indexing becomes an argument for one-indexing, because a sequence of length N yields the range 1 <= i <= N when subscripting with 1, but 0 <= i <= N-1 when starting at 0. The latter is uglier than the former.
It's also about the only thing I really don't like about Julia – so I can understand someone saying 1-indexing is a deal-breaker.
I'd bet this is true. It doesn't seem fiddly to me as a mathematician. Thinking habits can be really hard to get past though, so I also understand people not liking 1-based. I just think the argument from math is wrong.
When you're in the supermarket and you're counting how many items are in your shopping cart, do you start from 0?
If you are counting, 1-based makes a lot of sense. If you're indexing, they're equally valid approaches. However, if you're indexing then you should be able to use an arbitrary range and not be restricted to one or the other (with a mapping function from your actual range to the language's base).
Yes, because the cart starts empty. But, more to the point, I don't call the thing I put into the cart that causes it not to be empty the zeroth item.
Honestly, not that many people in math think about the construction of the natural numbers frequently. Yeah, we learn about it of course, but that's about it. Very often the natural numbers do not include 0. Often they do. I've seen $\mathbb Z_{\geq0}$ and $\mathbb Z_+$ used to avoid having to worry about it.
Hell, different countries can't even agree on whether 0 is positive. In France, 0 is considered both positive and negative. In USA, 0 is considered neither.
(quick edit: I realize my last paragraph makes the $\mathbb Z_+$ option seem weird. I do math in the States.)
Or, at least, that was the case when I did maths there. No idea what the default interpretation is these days.
This is mostly why I don't say "natural numbers" and instead say "positive integers" or "non-negative integers", depending on if I want 0 included or not.
I've used many languages, and I don't have much problem with any quirks or major differences (Haskell, JavaScript, ...). The only language I've bounced off of is Prolog, and I'm planning another attempt.
But I've done a lot of low level programming, and 0-based arrays are a no-brainer to deal with. Switching to 1-based arrays throws out all of my intuitions and makes me have to recalculate everything, which is error-prone.
At the end of the day, like all language design decisions involving an arbitrary choice among reasonable options, you get used to it once you use the language enough (and also some folks will refuse to ever use the language because of it for aesthetic reasons).
[-1] https://docs.julialang.org/en/v1/devdocs/offset-arrays/
0: https://github.com/Wikunia/Javis.jl
[0]https://www.youtube.com/watch?v=gmjzbpSVY1A
Show HN: I made a parser visualizer using manim - https://news.ycombinator.com/item?id=26382729 - March 2021 (15 comments)
A Manim Code Template - https://news.ycombinator.com/item?id=24985609 - Nov 2020 (1 comment)
Manim: Animation engine for explanatory math videos - https://news.ycombinator.com/item?id=24926947 - Oct 2020 (19 comments)
Manim – 3Blue1Brown's animation engine for explanatory math videos - https://news.ycombinator.com/item?id=19716019 - April 2019 (80 comments)
This one is a dupe because Oct 2020 was less than a year ago (https://news.ycombinator.com/newsfaq.html) but I think we can leave it up.
This allows you to e.g. get the current time (get_time) and pause playback (pause). So you just have to write a small script that issues the commands the way you want and you'll be good.
[1] https://github.com/sleuth-io/code-video-generator [2] https://youtu.be/e21hJnB9J5k?t=44 [3] https://obsproject.com/
Or you could pause the video manually; in Keynote, press K to play/pause.
I did exactly what you want using a small reveal.js plugin that parses the list of partial files generated by manim and inserts the corresponding video files into the presentation in thst order, it worked quite well. Let me know if you're interested and I'll throw it up on a GitHub gist.
[0] https://youtu.be/gmjzbpSVY1A?t=52
Aims Fertility is a Fertility and Reproductive healthcare Hospital Chain. We assist you to get the best treatment possible well within your budget and from the most experienced doctors in its network and in various Clinics and Hospitals by helping you with unbiased transparent information, and No hidden charges across Fertility center and assist with Trust, Transparency, Independence, Authority, and Patient Feedback. • Find Best IVF Centre in india • Get Low-Cost Surrogacy Package in india • 100% Guaranteed Success or money back plan in IVF only with Aims Fertility • Get Free Consultation with Highly Experienced Doctor with Aims Fertility
Contact us @ 9667619090 Email us @ support@aimsfertility.com Visit us @ www.aimsfertility.com https://aimsfertility.com
Suggestions welcome.
"Establishing new languages is a powerful strategy for control-ling complexity in engineering design; we can often enhance ourability to deal with a complex problem by adopting a new lan-guage that enables us to describe (and hence to think about)the problem in a different way, using primitives, means of com-bination, and means of abstraction that are particularly wellsuited to the problem at hand." -- Harold Abelson
Some of their older documentation (now less relevant) is available on Internet Archive: https://web.archive.org/web/20200122124703/https://manim-tb-...
As for interactive content, you'd probably be better off using something else that was created with a focus on realtime performance and portability. You
Examples in a presentation: http://acko.net/files/gltalks/pixelfactory/online.html#35
Some documentation: https://github.com/unconed/mathbox/blob/master/docs/intro.md