[HN Gopher] Manim: An animation engine for explanatory math videos
       ___________________________________________________________________
        
       Manim: An animation engine for explanatory math videos
        
       Author : agmm
       Score  : 427 points
       Date   : 2021-08-20 12:32 UTC (10 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | stevenpetryk wrote:
       | Shameless plug for my React library for creating similar-looking,
       | interactive visualizations on the web. Highly inspired by
       | 3blue1brown/manim's style. Less focused around animation, more
       | focused on interaction. :)
       | 
       | https://mafs.dev/
       | 
       | Edit: probably needs a bit of chores done, especially around
       | typescript declaration organization. I built it during a brief
       | 3-week funemployment last year. Side projects are hard!
        
         | da39a3ee wrote:
         | That looks like a really nice project. Are you familiar with
         | Mathbox https://github.com/unconed/mathbox?
        
           | stevenpetryk wrote:
           | Nope! I like Three.js though. These visualizations are pretty
           | intense.
        
           | Uehreka wrote:
           | I'm pretty sure mathbox got abandoned when mathbox2 came out
           | (understandably, it's mostly one guy building it). But then
           | mathbox2 appears to be abandoned now, and last time I tried
           | to use it (a couple years ago) the coffeescript would no
           | longer compile.
           | 
           | It was a really visionary piece of work, it's a bummer to see
           | it fall apart like this, and I don't think anything has come
           | out since that really replaces it (though manim does look
           | cool).
        
         | 6gvONxR4sf7o wrote:
         | That looks super clean. Very cool.
        
         | tenaciousDaniel wrote:
         | This is great, do you use anything under the hood? D3/ThreeJS?
        
           | stevenpetryk wrote:
           | SVG. It's remarkably powerful given that it supports
           | arbitrary linear transformations and all sorts of computer
           | graphics things.
        
             | westoncb wrote:
             | Can anyone give a brief explanation of what it means to use
             | SVG in this context?
             | 
             | I think of it as a file format, but I'm assuming no files
             | are involved here. Aside from that I've noticed the
             | contents of SVG files look similar to the 2d canvas
             | operations--which to my mind seems like the natural thing
             | to use for something like this--so why use SVG instead? And
             | is there any relationship between canvas drawing and SVG?
        
               | stevenpetryk wrote:
               | SVG works much more naturally with React, since it's able
               | to be managed via the DOM. Doesn't have to be an <img />.
        
               | remram wrote:
               | JavaScript can write SVG just like it writes HTML. Your
               | React render() can return <svg><rect ... /></svg> as
               | easily as <div><p>...</p></div>
        
               | tenaciousDaniel wrote:
               | Yep, svg + react = declarative graphics. I love it. I
               | used it to replace D3 in a project I worked on last year
               | and no regrets at all.
        
           | nighthawk454 wrote:
           | glancing at the code, it appears to just be SVG. and pretty
           | cleanly at that
        
         | pc86 wrote:
         | Haven't looked at the code yet but the animations/interactivity
         | is gorgeous.
        
           | [deleted]
        
         | dxbydt wrote:
         | Your example on Projectile motion and Riemann sum is quite
         | nice! I am going to share it with a few kids I work with. Thank
         | you for creating this.
        
       | snicker7 wrote:
       | For Julia coders, there is Javis.jl
       | 
       | https://www.youtube.com/watch?v=ckvsc6ukdOc
        
       | nuclearnice1 wrote:
       | Very cool
       | 
       | At a glance, it seems tightly bound to making math animations,
       | unsurprisingly.
       | 
       | Are there more general open source animation tools? Or other
       | narrow tools for other niches?
        
         | cmrdsprklpny wrote:
         | You might like Wick Editor: https://wickeditor.com
        
           | 5faulker wrote:
           | Nice name.
        
       | bsenftner wrote:
       | Does anyone have experience to compare this with MathBox?
       | https://github.com/unconed/mathbox Mathbox is JavaScript, not
       | Python, but presentation graphics are often web based, so I
       | consider these two to be supplying solutions for similar needs.
        
         | Zhyl wrote:
         | I've only seen on the author's website [0], but the
         | explainables there are some of the best I've seen. [1,2]
         | 
         | [0] https://acko.net
         | 
         | [1] https://acko.net/blog/how-to-fold-a-julia-fractal/
         | 
         | [2] https://acko.net/blog/to-infinity-and-beyond/
        
           | bsenftner wrote:
           | I've used Mathbox quite a bit, it is flat out incredible, a
           | jaw dropping artful simplicity to use. So I am wondering if
           | this is worth even looking into...
        
       | baby wrote:
       | Feedback on the landing page: it's an animation engine but I can
       | find no examples.
        
         | srott wrote:
         | There is a link to "our online Jupyter environment."...
         | 
         | https://mybinder.org/v2/gist/behackl/725d956ec80969226b7bf9b...
        
       | bradrn wrote:
       | A Haskell equivalent: https://reanimate.github.io/. Haven't used
       | it myself, but the examples are incredibly impressive.
        
       | lordleft wrote:
       | I've always marveled at Grant's videos -- very cool to see this
        
       | skratlo wrote:
       | Why does it follow this pattern, at least in the docs, where the
       | user is supposed to subclass Scene and provide a construct
       | method? How does inheritance help here? Wouldn't it be simpler if
       | instead users can make Scene using their own abstractions and
       | functions in whatever way they feel is appropriate?
        
         | kzrdude wrote:
         | That's how OOP (but not Python) is taught sometimes
        
         | nuclearnice1 wrote:
         | I assume the Scene class is called into from some other part of
         | the engine. So, your code needs to at least enter via those
         | functions and return the right value / have the required side
         | effects.
         | 
         | There are probably other methods defining the scene interface
         | defined in the base class definition.
        
       | [deleted]
        
       | SamBam wrote:
       | This is very nice. It looks well-designed for a moderately-
       | technical teacher to create stuff with a lot of reasonable
       | defaults and assumptions over configuration.
       | 
       | Here's the gallery of example stuff you can do:
       | https://docs.manim.community/en/stable/examples.html
        
         | mcphage wrote:
         | Why is the method to set the text on an object "get_text()" ?
        
           | SamBam wrote:
           | It seems slightly confusing, but I think the idea is that the
           | brace is creating a new text object, which is returned and
           | you can then add it to the scene. So it's not "get the
           | current string" it's "give me a text object with this
           | string." Could have been named `create_text()` perhaps.
        
       | msdrigg wrote:
       | This is an extension of an animation library used by math
       | YouTuber 3blue1brown [0]. He has an excellent channel that I
       | would recommend anything from. One of my favorite videos of his
       | is where he shows the thought process behind solving a level 6
       | Putnam competition problem and makes it seem almost doable [1].
       | 
       | [0] https://m.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
       | 
       | [1] https://m.youtube.com/watch?v=OkmNXy7er84
        
         | sundarurfriend wrote:
         | I've never been able to get into these animated videos of 3b1b,
         | but the more recent videos with a more conversational tone
         | (Lockdown math, the MIT Computational thinking course, the
         | podcast) have made me a big fan of Grant.
        
       | abetusk wrote:
       | A community fork of 3Brown1Blue's [0] Manim [1] for creating the
       | math animations and pictures used in their videos. From the
       | manimcommunity's README:
       | 
       | """ NOTE: This repository is maintained by the Manim Community
       | and is not associated with Grant Sanderson or 3Blue1Brown in any
       | way (although we are definitely indebted to him for providing his
       | work to the world). If you would like to study how Grant makes
       | his videos, head over to his repository (3b1b/manim). This fork
       | is updated more frequently than his, and it's recommended to use
       | this fork if you'd like to use Manim for your own projects. """
       | 
       | See the gallery for it in action [2].
       | 
       | [0] https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
       | 
       | [1] https://github.com/3b1b/manim
       | 
       | [2] https://docs.manim.community/en/stable/examples.html
        
         | omgJustTest wrote:
         | While this seems to be good intentions, the message is unclear
         | and confusing.
         | 
         | 3b1b's explaination in his readme is much clearer and Manim
         | community should decouple itself from the 3B1B name /
         | popularity.
         | 
         | "Manim is an animation engine for explanatory math videos. It's
         | used to create precise animations programmatically, as
         | demonstrated in the videos of 3Blue1Brown." [1]
         | 
         | "Note, there are two versions of manim. This repository began
         | as a personal project by the author of 3Blue1Brown for the
         | purpose of animating those videos, with video-specific code
         | available here. In 2020 a group of developers forked it into
         | what is now the community edition, with a goal of being more
         | stable, better tested, quicker to respond to community
         | contributions, and all around friendlier to get started with.
         | See this page for more details." [2]
         | 
         | [1] Manim Community Edition Readme [2] Manim 3B1B edition
        
           | dmix wrote:
           | Agreed, I immediately got the impression it was what 3b1b was
           | using...
        
             | AnotherGoodName wrote:
             | To be fair the gist of it is that "this is what the 3b1b
             | team are using except it is a bit better".
        
               | xmprt wrote:
               | Although the fact that the 3b1b team isn't using the
               | community version makes me wonder why and whether the
               | community version is actually better. In any case I'll
               | take their word for it that it's more beginner friendly.
        
               | tjader wrote:
               | I believe 3b1b uses his extensive knowledge of the system
               | he developed to sometimes do hacky things that wouldn't
               | be easy to support long-term. His repo may be better for
               | someone who has a similar extensive knowledge, but won't
               | be ideal for someone who is mostly interested in it as a
               | tool and doesn't want to learn its innards.
        
               | a9h74j wrote:
               | IIRC older projects of 3b1b don't necessarily build with
               | later, evolving versions of 3b1b Manim. There might be
               | some mix of versioning questions mixed in with branding
               | questions.
        
         | sitkack wrote:
         | Someone please correct me if I am wrong (always, but am extra
         | asking for it), is that the main 3b1b/manim is really just for
         | Grant and folks in making his videos, and while he did open
         | source it, he isn't interested in running a big OSS project.
         | 
         | To me this really shows the power of OSS, and that one can
         | "take ownership" of their destiny through forking and that it
         | doesn't need to be adversarial.
         | 
         | In many ways, ideas are much more powerful than code. That code
         | itself can be a thought terminating thing, by making ideas
         | reified, it also instantly constructs an Overton Window or
         | maybe a Chesteron's Fence, or maybe a Winchester House. A
         | Knot's Berry Farm of technical debt built on soggy metaphors.
        
           | davidscolgan wrote:
           | Yes, I've heard him say in a few places in his videos that he
           | gives his blessing to this fork and encourages its use over
           | his own repo for that exact reason.
        
       | ngmc wrote:
       | Shameless plug: I'm mentoring a student who is building a
       | beginner-friendly version of manim on top of p5.js for his Google
       | Summer of Code Project - check it out!
       | 
       | https://two-ticks.github.io/p5.teach.js/
       | 
       | https://discourse.processing.org/t/animating-maths-in-p5-js
        
       | liorben-david wrote:
       | Love 3b1b, glad someone made a fork of his software
        
       | EMM_386 wrote:
       | 3blue1brown has fantastic videos, I always wondered how they were
       | created.
       | 
       | The official Quickstart documents have animations showing how the
       | transitions work:
       | 
       | https://docs.manim.community/en/stable/tutorials/quickstart....
        
       | nrjames wrote:
       | While not Manim generated, I came across this video explaining
       | Bezier curves yesterday and thought it was pretty awesome.
       | 
       | https://www.youtube.com/watch?v=aVwxzDHniEw
        
         | dmix wrote:
         | I've noticed a bunch of Youtube channels have really upped
         | their animation game and mastered how to structure/pace their
         | videos. Especially the science oriented ones like Kurzgesagt
         | [1] and Veritasium [2]. It's a really great movement, I'm happy
         | to see it. 3blue1brown definitely played a role in this in the
         | early days.
         | 
         | It reminds me of the way websites evolved around 2005-2010 to
         | start to take design seriously, not just on specialist web
         | design sites but on major news sites and search engines, etc.
         | Part of it was "Web 2.0" and then Bootstrap style CSS
         | frameworks and the maturity of browsers as IE6 died off.
         | 
         | 1. https://www.youtube.com/user/Kurzgesagt
         | 
         | 2. https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA
        
           | jameshart wrote:
           | Grant from 3b1b is actually explicitly encouraging people to
           | try to make more mathematical education videos this summer
           | [1] - and Freya Holmer cites that as being what encouraged
           | her to expand from little gif explanations into a full-length
           | exposition video for that piece on Bezier curves, so this is
           | all connected!
           | 
           | And in the spirit of sharing a bit of the 'how it's done' -
           | obviously while Grant uses Manim, Freya uses Unity3D and her
           | 'Shapes' library [2] to produce her visualizations - she also
           | streams a lot of her dev work so if you want to follow along
           | with how it's done, that's another avenue to look at.
           | 
           | 1: https://www.3blue1brown.com/blog/some1
           | 
           | 2: https://assetstore.unity.com/packages/tools/particles-
           | effect...
        
         | mdoms wrote:
         | Fantastic animation, thanks for sharing.
        
         | longas wrote:
         | I believe that video has been animated in Unity, she is the
         | creator of https://acegikmo.com/shapes/.
        
       | lifeisstillgood wrote:
       | I look at this (and most animated video) and think I _ought_ to
       | be able to use this in my boring grey corporate life - but maths
       | at management levels rarely peeks above a std dev. I wonder how
       | to raise the game?
        
         | bee_rider wrote:
         | Synergy is just the management way of saying covariance, right?
         | Surely you can introduce some more advanced statistics
         | concepts.
        
       ___________________________________________________________________
       (page generated 2021-08-20 23:00 UTC)