Patrefans
3blue1brown from patreon
3blue1brown patreon

Manim Demo (early view)

🕑 Added 2024-10-09 18:21:39 +0000 UTC
Manim Demo (early view)

Comments

Hitoshi Yamauchi

This is great. Thanks a lot!

Fran Abenza

I am so excited for the next Manim live code video. I enjoyed it so much!

Rishabh Saxena

Hey Grant I really liked this video! I've dreamed about creating and visualizing my favorite concepts for a while now and always wanted to get started, and I finally took my first step today. I ran into some issues because I wanted to replicate your hot/live reload workflow, but I have no idea how to get started with doing that. Seeing the output directly form the input is a big part of the satisfaction of programming, so if you get a chance would you mind explaining that? thanks. (I looked it up and I think it has something to do with the rendering engine you use but I'm not sure.)

Pedro Fonini

The draft PR is at https://github.com/3b1b/manim/pull/2180

Pedro Fonini

Just realised I can comment instead of making lots of edits. Anyway, I think I fixed it? My "EDIT 2" above was on the right track. IPython will call eval/exec passing globals=shell.user_global_ns and locals=shell.user_ns. In my setup here, these are the same dict for plain ipython shells and for shells instatiated directly, but (I don't know why) they are distinct dicts for shells acquired via InteractiveShellEmbed.instance(), which is what manim does [1]. In [2], I have a reproducer of the problem, and a suggested fix. I will make a draft PR, and try to see if this only helps in my toy tests, or if it actually helps manim itself. [1]: https://github.com/3b1b/manim/blob/d4080b8978e94477b590c5e8f82d223b1d2395f0/manimlib/scene/scene.py#L224 [2]: https://gist.github.com/fofoni/00079f82908b93af213f10ec3b757166

Ethan

It would be absolutely amazing if you did a series on group theory. Visual Group Theory by Matthew Macauley (https://youtube.com/playlist?list=PLwV-9DG53NDxU337smpTwm6sef4x-SCLv&si=rWEPIq1j-fqkx1MQ) is awesome, but something done with manim and your didactic style would be amazing.

Terence Broad

This is amazing, I had no idea that everything was done in python. Thanks for making a video about it and sharing all the code from your previous videos. I'm excited to get my hands dirty with it!

Pedro Fonini

Hey Grant, I'm absolutely loving the video. Thought I'd jump in here to comment about the Python variable scope stuff that's going on. First, I noticied you were running Python 3.12, so the fact that the globals().update() hack is not required anymore for list comprehensions is very much probably because of PEP 709. Look for it in the official "What's new in Python 3.12" document. Now, that functions can't normally access the variables from the outer scope is really very strange. [EDIT: see the reply comment below, there's a suggested fix and a PR.] Probably related to the way that your IPython shell is spawned inside that "manim" command? Maybe each cell/snippet is not actually run in IPython's global environment, but then the function's .__globals__ attribute is for some reason modified to actually point to IPython's global env? That would make the function "lose access" to the "variables in the outer scope". I would love to learn more about this IPython integration you managed to set up! EDIT: As jp42 commented below, if the IPython integration is setup in a strange way that makes each cell/pasted snipped run _inside a dedicated function_, then the nonlocal keyword might help. My guess was that each snippet was run inside a dedicated _module_, not function, and then somehow each defined function's __globals__ attribute was hacked to point to IPython's global environment. If this is the case, `nonlocal` won't work. EDIT 2: OK, watched the rest of the video, and cloned manim to take a look at the code, and... definetely some funky stuff going on in there! Got completely nerd-sniped here. I guess this is the probem: plain ipython drops you into the main module's module (i.e. global) scope: you can check that `globals() is locals()` is True, and `value=-1/12;print(globals()['value'])` works correctly. Now, your shell(...) call inside Scene.embed, which calls InteractiveShellEmbed.mainloop, drops us into what looks like it's the kind of scope you end up in when you run exec() passing distinct dicts as globals and locals. I guess the key to solving this is finding a way to make IPython call exec() passing the same dict as globals and locals.

jp42

About the locals into globals cursed technique: if I'm not wrong this particular case can be solved using the "nonlocal" keyword.

3blue1brown

Doing a quick search, it seems like Javis and Makie might be options: https://github.com/JuliaAnimators/Javis.jl https://juliahub.com/ui/Packages/General/Makie

3blue1brown

Ah, thanks for the heads up. I hadn't thought about that, but I think I'm fine being open there.

Nicolas Bolle

I really like that you're explaining it to Ben, makes for an approachable coding demo. Wanted to mention at 12:50 you can see your chat GPT prompt history, in case you didn't want to show that in the final cut. There's nothing embarrassing in there (like "who is jason file?") and maybe you already thought about this, but mentioning it just in case you want to keep it private.

Marco Menarini

Did anyone port manim for Julia? I remember you were working on a class in computational thinking with Julia and Pluto

3blue1brown

Ooh, good question, I'll throw that on the top of the list. Quick thoughts now are that I don't regret it, but I do generally encourage people to adopt their own style. When judging Summer of Math Exposition entries, I would definitely get a feeling of weariness, "Oh look, one more black-background manim video..."

Lionel Pöffel

I really like this. I hope most of the features shown here are actually available in community manim. The explanation of the * operator could perhaps use some jump-in from "future Grant" to provide more details. Other than that: lovely.

Max Goldstein

Question for the vlog: you’ve written that sharing manim means that your videos become less distinctive, since it’s part of your style that’s easily copyable. Do you have any regrets about sharing it? Do you have other tricks that keep your videos unique?

Rick Rubenstein

This is lovely, and I think a Manim livestream would be great. In the “official” video, I think at least a brief explanation of the nature of the glitch you ran into near the end with Ben would be nice.

Rick Rubenstein

I liked Ben’s observation about watching someone code and seeing when discomfort kicks in. If the coder is Matt Parker: never. 🙂

W T

Man, somehow your coding session scratch that learning-by-watching itch even more than already is the case with your channel. I would definitely watch heaps of videos of some "3B1B-Evangelist" presenting the newest manim-functionality on stage or something along those lines. I also find it hilarious that every single person, even arguably those standing well above criticism in their respective setting, always prefaces their using LLMs by saying things like "I'll be honest here" or being downright apologetic, like you're expected to feel ashamed for not solving some "bureaucratic" shortcoming by hand or something. Very nice stuff.

Stuart Radforth

Really impressive, the hologram animations blew me away, had no idea this was rendered realtime when you were editing. Would love to try to visualise how spacetime warping causes a straight line to become curved 3D line with this… it still makes my head hurt

Marc Cohen

Wow, thank you Grant - I've been waiting for something like this since I started watching your channel! Love it.

Bartosz Błaszkiewicz

Nobody else asks about pseudoinversion?


More Creators