Giter VIP home page Giter VIP logo

videos's Introduction

This project contains the code used to generate the explanatory math videos found on 3Blue1Brown.

This almost entirely consists of scenes generated using the library Manim. See also the community maintained version at ManimCommunity.

Note, while the library Manim itself is open source and under the MIT license, the contents of this project are intended only to be used for 3Blue1Brown videos themselves.

Copyright © 2022 3Blue1Brown

videos's People

Contributors

3b1b avatar akdukaan avatar harry-hopkinson avatar mstechly avatar nihaals avatar schuelermine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videos's Issues

`manimgl wordle.py InitialDemo` get an error

AttributeError: 'numpy.ndarray' object has no attribute 'get_coord'

image
image

Package Version
manimgl v1.2.0 or latest
MiKTeX v22.1

System information

name Version
windows 10
Python 3.10.2
  1. I have already installed manimgl
  2. I got pattern_matrix.npy by running python wordle.py
  3. When I ran manimgl wordle.py InitialDemo, I got the error, but I don't know where I was wrong

Mode "skeptical" does not exist

When I was creating pi creature scenes, I found a special mode called "skeptical", but I didn't find its source file. About 50 other modes are stored in one of my repository, but this mode never exists.

At _2022/borwein/supplements.py, line 307

In 3b1b's video, "skeptical" was performed as "plain".

More details on how to run the wordle code

I tired everything fixed import errors and finally got the program working but getting this now and I have no idea how to fix this

`manim _2022/wordle/scenes.py InitialDemo
Manim Community v0.14.0

[02/09/22 23:04:07] ERROR module_ops.py:75
There are no scenes inside that module

[23:04:07] ERROR module_ops.py:75
There are no scenes inside that module`

Problem with scenes.py

I got simulations.py to work but when I run scenes.py nothing happens. There are no errors it just creates a new line and does nothing. I have all the manimgl requirements and have it installed.

Remove pyc blobs and DS_Store from history

Blocked by #3

Currently, cloning the repo can be quite slow. This is probably because of the Python bytecode blobs that were originally added (but later removed). As these are still in the commit history, the repo is still bloated. Using something like BFG you could remove all the remnants of both the *.pyc and the .DS_Store files. As this repo is unlikely to get large code-based external PRs, rewriting history shouldn't have an effect on others. Note that BFG doesn't clean the HEAD commit but all commits before it so there would need to be a non-ignored-removing commit before using it.

Example:

git clone --mirror https://github.com/3b1b/videos.git
bfg --delete-files '{.DS_Store,*.pyc}' videos.git
cd videos.git
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force

After doing this it is recommended to delete your other (previous) clones and run git clone again.

I am too stupid to start the project.

Hello people,
I think it's wonderful that 3b1b makes its videos available to us in this form as well.
I have a basic problem. I can't render any of the shown videos projects myself. But that is up to me. Now to my problem.
I have cloned the git and installed manim. FMPEG and Latex are also installed and all working. Manim should also work according to my current knowledge, yet I'm doing something wrong.

Example

As an example I would like to use now simply times the video. Here is the YouTube link to it.
https://youtu.be/wTJI_WuZSwE

What I have done so far

image

I have the git in its original state and have not made any changes to it. After that I change with cd to the corresponding folder. For the example this would be the folder "_2020".

image

now i try to compile it with manimgl. As I learned in #10, I should not take the community version but the one from @3b1b itself. Ok. Then I do this

image

My proposed solutions

In the issue #10 it was recommended to put the python sktipt in the same folder where the import_py is located. i did that and tried to compile it again.
But there the same error occurs as above. What am I doing fundamentally wrong?

My Setup

Enclosed still my version data.
image
And also the Python version.
image

Even if I don't know if it helps, I still give technical data about my system
image

I use Windows 11 with 64 bit and have a WSL2 running Ubuntu 20.04 LTS.

Well. In any case, I hope I have indicated everything correctly and have not embarrassed myself too much. Hopefully you can help me.

With kind regards
Riffecx

Float divison by zero error

Whenever I run certain scenes on scenes.py for wordle I get a float division by zero error. This is what happens when I try to run scene 78:
Screenshot 2_13_2022 5_54_50 PM
`

scenes.py InitialDemo won't work - Errno 13

Hi there,

Per the title, I can't get scenes.py InitialDemo to work. Here is my the terminal output:

(base) jake@Jake-PC-UBU20:~/Documents/videos-master/_2022/wordle$ manimgl scenes.py InitialDemo
ManimGL v1.5.0
Traceback (most recent call last):
  File "/home/jake/anaconda3/bin/manimgl", line 8, in <module>
    sys.exit(main())
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/__main__.py", line 25, in main
    scene.run()
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/scene/scene.py", line 78, in run
    self.setup()
  File "scenes.py", line 964, in setup
    super().setup()
  File "scenes.py", line 334, in setup
    self.show_possible_words()
  File "scenes.py", line 521, in show_possible_words
    shown_words = self.get_shown_words()
  File "scenes.py", line 489, in get_shown_words
    return self.get_grid_of_words(
  File "scenes.py", line 266, in get_grid_of_words
    full_text_mob = Text(full_string, font="Consolas", font_size=font_size)
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/mobject/svg/text_mobject.py", line 70, in __init__
    file_name = self.text2svg()
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/mobject/svg/text_mobject.py", line 236, in text2svg
    dir_name = get_text_dir()
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/utils/directories.py", line 20, in get_text_dir
    return guarantee_existence(os.path.join(get_temp_dir(), "Text"))
  File "/home/jake/anaconda3/lib/python3.9/site-packages/manimlib/utils/file_ops.py", line 16, in guarantee_existence
    os.makedirs(path)
  File "/home/jake/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/home/jake/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/home/jake/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 2 more times]
  File "/home/jake/anaconda3/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/Users'

I'm running Ubuntu 20.04, Python 3.9, all dependencies installed. simulations.py runs fine. I downloaded the repository and am running the code from documents/videos-master/_2022/wordle - in this directory is custom, data,__pycache__, custom_config.yml,footnote.py,manim_imports_ext.yml,scenes.py and simulations.py. Both .py files have the import sys sys.path.append... fix. Any insight into what I need to do to fix this would be mighty appreciated!

Array size in wordle solver.

When attempting to run the wordle code, I get the following error:

ValueError: array is too big; arr.size * arr.dtype.itemsize is larger than the maximum possible size.

I think this may be an internal setting, but it crashes at the line:

equality_grid = np.zeros((len(w1), len(w2), n, n), dtype=bool)

when trying to make a 12972 x 12972 array of zeros. Is there a way to overwrite this max size?

How to compile _2016/eola?

I'd like to run scenes from EoLA. I understood that EoLA was a bit too old to run with manimgl 1.2.0. So I checked out this particular commit:

commit 73ff0af63de1cd382e1c8552aa1c97d07e4e8744
Author: Grant Sanderson [email protected]
Date: Sat Sep 24 22:46:17 2016 -0700
End of EoLA

to get to the state when EoLA was completed.

But it seems to me that codes under _2016/eola have been updated for newer versions of manim even though they are not fully updated yet so that they can be run without changing anything. Therefore they can not be run with the above commit of manim either.

Would it be possible to get the version of EoLA source code as it exactly was when the above particular commit was made?

[HELP] Errors when running

I'm running into 2 errors while attempting to explore the wordle scenes.

First is the self.presenter_mode, everything runs fine if I replace each instance with False but I assume theres a better way to do this.

Second, self.wait(note=f"different things") gives TypeError: Scene.wait() got an unexpected keyword argument 'note'

Anybody have any insight on these?

Probability distribution of patterns and entropy calculation

As per the source code below, to calculate the pattern distribution, it uses possible_words to generate the distribution. Instead, shouldn't we use allowed_words for this, since any of the allowed words can be generating a given pattern.
ie: the function call should be get_pattern_matrix(allowed_words, allowed_words) ??

def get_pattern_distributions(allowed_words, possible_words, weights):
    """
    For each possible guess in allowed_words, this finds the probability
    distribution across all of the 3^5 wordle patterns you could see, assuming
    the possible answers are in possible_words with associated probabilities
    in weights.
    It considers the pattern hash grid between the two lists of words, and uses
    that to bucket together words from possible_words which would produce
    the same pattern, adding together their corresponding probabilities.
    """
    pattern_matrix = get_pattern_matrix(allowed_words, possible_words)

Wordle no output

When running the scenes.py using:
python scenes.py
I get an error saying no module manimlib
and when i use:
manimgl scenes.py
I get no output then it says manimgl v1.4.1 and it tells me some info about the configuration.
any ideas?
image

Wordle application is "Killed"

When I try to execute the program via python3 wordle.py, I get the following error.

Screenshot_20220208_094528

I believe I correctly created the directories necessary for custom_config.yml.

Error when trying to run InitialDemo scene

I tried to run the following command similar to what I saw in the video and got the following error. Any idea what I need to do to fix it?
The manimgl was installed from the latest community distribution manually but I tried pip install manimgl with the same issue. Just running "python _2022/wordle.py" is fine though.

manim) markyoung@macbook-pro-3 videos % manimgl _2022/wordle.py InitialDemo
ManimGL v1.4.1
Traceback (most recent call last):
File "/Users/markyoung/opt/anaconda3/envs/manim/bin/manimgl", line 33, in
sys.exit(load_entry_point('manimgl', 'console_scripts', 'manimgl')())
File "/Users/markyoung/Projects/manim/manimlib/main.py", line 25, in main
scene.run()
File "/Users/markyoung/Projects/manim/manimlib/scene/scene.py", line 76, in run
self.setup()
File "_2022/wordle.py", line 1406, in setup
super().setup()
File "_2022/wordle.py", line 778, in setup
self.add_guess_value_grid_title()
File "_2022/wordle.py", line 805, in add_guess_value_grid_title
underline.match_y(first.get_bottom() + 0.025 * DOWN)
File "/Users/markyoung/Projects/manim/manimlib/mobject/mobject.py", line 1195, in match_y
return self.match_coord(mobject, 1, direction)
File "/Users/markyoung/Projects/manim/manimlib/mobject/mobject.py", line 1186, in match_coord
mobject.get_coord(dim, direction),
AttributeError: 'numpy.ndarray' object has no attribute 'get_coord'

keyError : 'data' from wordle.py

DATA_DIR = os.path.join(get_directories()["data"], "wordle")
KeyError: 'data'

after checking what get_directories() returns, I can't seem to find any key named data

so what is inside this 'data' ?

[QUESTION/HELP] - Wordle Solver

I can't for the life of me figure out how to run and use/play with the wordle solver..Nothing here is understandable nor do I know what to do, what goes where, what to install, what to edit, what file to run, what commands to execute, etc...

The "wordle.py" file and it's related stuff is non existent now. Like it got deleted overnight. For idk what reason.. (Idk what file to run.)

A very simple step by step guide would be greatly appreciated for this difficult, confusing and mountainous mess of a repository.

Any help on how to get the wordle solver to run, such as commands and where to run said commands is what I'm looking for.
(I'd ask this in a discussions area but that isn't enabled in this repo.)

God, the more I look at this repo, the code, and trying to figure out how anything works..the more confused and I get xD

Starting the different files

Hi guys.
I have a completely basic question. How can I start the different Python scripts. Manim is properly installed and ready to run. However, I don't know how to proceed here. Can you help me?
With kind regards
@Zeyecx

PS C:\...\videos> python .\_2020\chess.py
Traceback (most recent call last):
  File "C:\Users\Zeyecx\Desktop\tmp\videos\_2020\chess.py", line 1, in <module>
    from manim_imports_ext import *
ModuleNotFoundError: No module named 'manim_imports_ext'

Even in manim itself, I cannot start the project.

PS C:\...\videos> manim .\_2020\chess.py
Traceback (most recent call last):
  File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\Scripts\manim.exe\__main__.py", line 7, in <module>
  File "c:\programdata\anaconda3\lib\site-packages\manimlib\__init__.py", line 9, in main
    config = manimlib.config.get_configuration(args)
  File "c:\programdata\anaconda3\lib\site-packages\manimlib\config.py", line 155, in get_configuration
    module = get_module(args.file)
  File "c:\programdata\anaconda3\lib\site-packages\manimlib\config.py", line 150, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File ".\_2020\chess.py", line 1, in <module>
    from manim_imports_ext import *
ModuleNotFoundError: No module named 'manim_imports_ext'

Missing animation / simulation for Betrand's paradox

I would like to play with the simulation(s) for Betrand's paradox in order to find the flaw in my reasoning. :)

I am a software engineer and a very casual armchair mathematician, but the following thought experiment leads me to the conclusion that one of the three selection methods is invalid. However it also stands to reason that there must be a flaw in the following since this problem has stood for over 100 years and no one has declared the following observation a fault.
Consider the "random radial point" method. Described on Wikipedia as “Choose a radius of the circle, choose a point on the radius and construct the chord through this point and perpendicular to the radius” If we assume for a moment that the circle has its center at the origin, these directions could be rendered simply as choose an angle theta and a distance r’ < r. Or more simply choose a point in the interior of the circle using polar notation. If we imagine that r’ is the radius of an inscribed circle we can observe that all chords drawn tangent to the inscribed circle have equal length. This again tells us that the angle theta at which the chosen radius is drawn has no bearing on the length of the resulting chord, or the probability of its length being longer or shorter than s. Since the angle is not important, it may be instructive to choose a convenient angle like 0 (or the positive X axis in the Cartesian plane). Doing this we observe that the probability of our chord being longer than s is 0.5. But we can also make a couple of other observations. First we note that the numerical representation of our chosen point is the same for the polar coordinate (r,theta) and the Cartesian coordinate (X,Y). Somehow it seems we doing something equivalent to choosing a random interior point with its Y coordinate fixed to 0. Second we should observe that the midpoint of each chord lies on the X axis. So this method is simply the “random midpoint” method in disguise. This method appears to be a fraud and a cheat, as it makes a show of choosing two random numbers to select a chord even though only one of them has any bearing on the length of the chord. 
On the one hand the method seems valid in that it can select any chord of the circle. But on the other hand seems invalid since it discards half the randomness (entropy?) generated in the selection of the chord’s midpoint. 

Problem with handling duplicates with the current New York Times implementation

With Wordle moved to https://www.nytimes.com/games/wordle/index.html, it seems to have changed how duplicates are handled.

For example for puzzle 237, after
crane (yybby)
recur (bygyg). (Before the migration, the color pattern was "yygyg" so it now count the second "R" as not existing instead of misplaced for the answer word "ulcer".

I tried both fixes for handling duplicates but neither seems to have fixed it.

The current wordle.py generates the following error:

Traceback (most recent call last):
File "/Users/markyoung/opt/anaconda3/envs/manim/lib/python3.8/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1141, in objc_method
result = f(py_self, *args)
File "/Users/markyoung/opt/anaconda3/envs/manim/lib/python3.8/site-packages/pyglet/window/cocoa/pyglet_view.py", line 199, in pygletKeyDown_
self._window.dispatch_event('on_key_press', symbol, modifiers)
File "/Users/markyoung/opt/anaconda3/envs/manim/lib/python3.8/site-packages/pyglet/window/init.py", line 1352, in dispatch_event
if EventDispatcher.dispatch_event(self, *args) != False:
File "/Users/markyoung/opt/anaconda3/envs/manim/lib/python3.8/site-packages/pyglet/event.py", line 408, in dispatch_event
if handler(*args):
File "/Users/markyoung/Projects/manim/manimlib/window.py", line 106, in on_key_press
self.scene.on_key_press(symbol, modifiers)
File "_2022/wordle.py", line 1449, in on_key_press
super().on_key_press(symbol, modifiers)
File "_2022/wordle.py", line 1190, in on_key_press
super().on_key_press(symbol, modifiers)
File "_2022/wordle.py", line 772, in on_key_press
self.reveal_pattern()
File "_2022/wordle.py", line 1439, in reveal_pattern
super().reveal_pattern(*args, **kwargs)
File "_2022/wordle.py", line 887, in reveal_pattern
did_fill = super().reveal_pattern(pattern, animate)
File "_2022/wordle.py", line 604, in reveal_pattern
self.show_pattern(pattern, animate=animate)
File "_2022/wordle.py", line 915, in show_pattern
self.show_pattern_information(guess, pattern, new_possibilities)
File "_2022/wordle.py", line 925, in show_pattern_information
info = -math.log2(prob)
ValueError: math domain error

Where do you run the Wordle code?

I was wondering where you write the wordle code? is it in python? if so, how do you do it? I've never run manim before or any github code at that, can someone give me a full walkthrough on how to do it

thanks in advance

Config File Directories Content

When I try to run scenes using

manimgl _2022/wordle.py

I'm getting an error ending in

  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/manimlib/utils/file_ops.py", line 47, in find_file
    raise IOError(f"{file_name} not Found")
OSError: /Users/grant/Dropbox/3Blue1Brown/images/pi_creature/svg/plain.svg not Found

I understand that I need to change these lines in custom_config.yml to point to local content:

directories:
  mirror_module_path: True
  output: "/Users/grant/Dropbox/3Blue1Brown/videos"
  raster_images: "/Users/grant/Dropbox/3Blue1Brown/images/raster"
  vector_images: "/Users/grant/Dropbox/3Blue1Brown/images/vector"
  pi_creature_images: "/Users/grant/Dropbox/3Blue1Brown/images/pi_creature/svg"
  sounds: "/Users/grant/Dropbox/3Blue1Brown/sounds"
  data: "/Users/grant/Dropbox/3Blue1Brown/data"
  temporary_storage: "/Users/grant/Dropbox/3Blue1Brown/manim_cache"

But my question is, point them to what exactly? I can see that other people are able to run wordle.py but I have no idea where they got functional content to put in local versions of these directories.

MovingCameraScene

Hello,
some older cases don't work anymore, since MovingCameraScene was removed:

Example:

$ python _2019/diffyq/all_part1_scenes.py 
Traceback (most recent call last):
  File "/home/volker/cloned/videos/_2019/diffyq/all_part1_scenes.py", line 1, in <module>
    from _2019.diffyq.part1.pendulum import *
  File "/home/volker/cloned/videos/_2019/diffyq/part1/pendulum.py", line 357, in <module>
    class IntroducePendulum(PiCreatureScene, MovingCameraScene):
NameError: name 'MovingCameraScene' is not defined
[volker@battle 3b1b]$ rg MovingCamera
docs/source/getting_started/whatsnew.rst:29:  - Removed all camera classes except ``Camera`` (``MappingCamera``, ``MovingCamera``, ``MultiCamera``) and all functions in ``ThreeDCamera``
docs/source/getting_started/whatsnew.rst:123:  - Removed all functions of ``GraphScene`` (moved to ``once_useful_constructs``), ``MovingCameraScene``, ``ReconfigurableScene``, ``SceneFromVideo``, ``ZoomedScene``, and ``ThreeDScene``. Because these can basically be achieved by adjusting ``CameraFrame`` (``self.camera.frame``)  

ModuleNotFoundError: No module named 'manimlib.scene.interactive_scene'

I'm on mac os Monterey, and i'm trying to run this code, I've looked through the other issues and tried all the solutions that apply to my OS. However, none of them have worked for me. I have manimgl, I've imported sys and added sys.path.append(".")/("..").
Whenever I run "python3 scenes.py InitialDemo" it gives me the ModuleNotFoundError: No module named 'manimlib.scene.interactive_scene' error. I would really like to run this code, and any help would be greatly appreciated. Thank you!

Running `scenes.py InitialDemo` can't find manimlib

I'm trying to run the Wordle solver, and when I run scenes.py InitialDemo I always get an error about not being able to find manimlib. From what I know I have everything I need, so I have no idea why it isn't finding it.

Traceback (most recent call last):
  File "C:\Users\Noelle\Desktop\Wordle solver\scenes.py", line 1, in <module>
    from manim_imports_ext import *
  File "C:\Users\Noelle\Desktop\Wordle solver\manim_imports_ext.py", line 1, in <module>
    from manimlib import *
ModuleNotFoundError: No module named 'manimlib'

Wordle Solver Errors (ffmpeg & manim_imports_ext)

So, I tried running the script (OS: Kali Linux) and ran into some errors, I fixed those by moving the packages to the correct files, but now I get this:

┌──(alastor㉿localhost)-[~/videos/_2022]
└─$ python3.9 ./wordle.py
/home/alastor/.local/lib/python3.9/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
  File "/home/alastor/videos/_2022/./wordle.py", line 1, in <module>
    from manim_imports_ext import *
  File "/usr/lib/python3.9/dist-packages/manim_imports_ext.py", line 3, in <module>
    from custom.backdrops import *
  File "/usr/lib/python3.9/dist-packages/custom/backdrops.py", line 10, in <module>
    from manimlib.mobject.svg.tex_mobject import TexText
ImportError: cannot import name 'TexText' from 'manimlib.mobject.svg.tex_mobject' (/home/alastor/.local/lib/python3.9/site-packages/manimlib/mobject/svg/tex_mobject.py)

The reason for this (to me) is unknown, I have tried some basic research on it but to no avail

I even ran

pip3 install ffmpeg

in which ffmpeg 1.4 was installed but it still did not help

Can't init submobjects of Pi Creature

when i run the command: manimgl _2022\wordle\footnote.py WeCanDoBetter i got the following results,
i find out that the submobjects array is empty but i am sure i config the pi_creature_images directory correctly.

PS F:\manim_videos\videos> manimgl _2022\wordle\footnote.py WeCanDoBetter
ManimGL v1.5.0
Traceback (most recent call last):
  File "f:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "f:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "F:\Python38\Scripts\manimgl.exe\__main__.py", line 7, in <module>
  File "f:\python38\lib\site-packages\manimlib\__main__.py", line 25, in main
    scene.run()
  File "f:\python38\lib\site-packages\manimlib\scene\scene.py", line 80, in run
    self.construct()
  File "F:\manim_videos\videos\_2022\wordle\footnote.py", line 791, in construct
    morty = Mortimer()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 70, in __init__
    SVGMobject.__init__(self, file_name=svg_file, **kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\svg\svg_mobject.py", line 60, in __init__
    super().__init__(**kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\types\vectorized_mobject.py", line 77, in __init__
    super().__init__(**kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\mobject.py", line 80, in __init__
    self.init_colors()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 110, in init_colors
    self.name_parts()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 94, in name_parts
    self.mouth = self.submobjects[MOUTH_INDEX]
IndexError: list index out of range
PS F:\manim_videos\videos>

Creating one folder per video to avoid broken links ?

Taking as an example the last video about Worlde : originally, the link in the youtube video's description was this one. It has since been updated to that one in the description, but someone who would have saved the link somewhere else would face a 404 by trying to access it. For instance, on Grant's website the github link to the source code is still the old one (broken).

To avoid such situations where a video's code switches from a standalone file to a folder of files (refactor, more details, adding data, ...), maybe it could be a good idea to create a dedicated folder for each video, whatever how many files it contains.
I don't know how often it happens, maybe this is too occasional to be a matter. Plus it is not too hard to fix the link when you have the wrong one (unless there are hundreds of videos in the _YYYY/ folder)

Have a good day =-)

generate_pattern_grid overcounts multiples of a correct letter

If a "guess" contains a letter more than once, and that letter appears in the "answer", then it counts that letter however many times it exists in the guess, regardless of how many times it appears in the answer.

Assume the guess is ayyyy and the answer is zazzz. We should expect to get 🟨⬛⬛⬛⬛. If we run that through generate_pattern_grid, we get:

>>> generate_pattern_grid(('ayyyy','zazzz'),('ayyyy','zazzz'))
array([[242,   1],
       [  3, 242]], dtype=uint8)

Our expected result must be one of those values.

24210 == 111113
110 == 000013
310 == 000103

It appears that the digit-endianness here is opposite "normal" usage. If the assumed guess and answer were swapped, then the result would be ⬛🟨⬛⬛⬛, and that seems to match with 00010, but let's verify quickly that we've got it the right way around:

>>> generate_pattern_grid(('ayyyy',),('zazzz',))
array([[1]], dtype=uint8)
>>> generate_pattern_grid(('ayyyy',),('zzazz',))
array([[1]], dtype=uint8)
>>> generate_pattern_grid(('ayyyy',),('zzzaz',))
array([[1]], dtype=uint8)
>>> generate_pattern_grid(('ayyyy',),('zzzza',))
array([[1]], dtype=uint8)
>>> generate_pattern_grid(('ayyyy',),('azzzz',))
array([[2]], dtype=uint8)

That looks right. The first list is the guesses, and the second list is the answers.

Okay, now let's guess aaaaa with the answer being zazzz. We should expect that answer to be ⬛🟩⬛⬛⬛, or 000203, or 610. Let's see what the function says:

>>> generate_pattern_grid(('aaaaa',),('zazzz',))
array([[124]], dtype=uint8)

12410, huh? That's 111213, or 🟨🟩🟨🟨🟨.

It appears that if a letter in the guess matches a letter in the answer, it gets to be yellow, no matter if it's been used before or not. Let's try something a little more subtle:

>>> generate_pattern_grid(('aayyy',),('zzzza',))
array([[4]], dtype=uint8)

410 == 000113 == 🟨🟨⬛⬛⬛, but it should be either 🟨⬛⬛⬛⬛ or ⬛🟨⬛⬛⬛.

Now lets try it with real words:

>>> generate_pattern_grid(('geese',),('camel',))
array([[93]], dtype=uint8)

9310 == 101103 = ⬛🟨🟨⬛🟨, and it should only have one 🟨.

The problem seems to be here:

videos/_2022/wordle.py

Lines 183 to 185 in ad8427a

for i, tp in enumerate(three_pows):
# This accounts for yellow squares
patterns[:, :] += tp * equality_grid[:, :, i, :].any(2)

I'm not sure how to fix this efficiently.

Editing one graph edits all

Not sure if this is the best place to mention this. The interactive Fourier transform page has an oddity: if you edit the frequency selection in one interactive graph, all of them change the red lines. The white dot that tracks the mouse still uses the specific graph's frequency set, but it's running across an incorrect red line that belongs on a different graph.

An example of manim pi creature scene with different emotions of them

Here we found some pi creatures: https://www.3blue1brown.com/images/pi-creatures/happy.svg and so on, the "happy.svg" can be replaced by other "modes" that appear in 3b1b's video source code (like "hooray" and "sad"). These pi creatures are shown here. Do not use for commercial purposes.

Here is an example video. A video tutorial for how to make a 3b1b-like pi creature video is available. (8 Jan 2023)

GoThroughAllEmotions.mp4

Up to now we found these pi creatures:

  1. alien
  2. angry
  3. awe
  4. concentrating
  5. concerned_musician
  6. confused
  7. conniving
  8. dance_1
  9. dance_2
  10. dance_3
  11. dance_kick
  12. dejected
  13. erm
  14. frustrated
  15. gracious
  16. guilty
  17. happy
  18. hesitant
  19. hooray
  20. horrified
  21. maybe
  22. miner
  23. monster
  24. plain
  25. pleading
  26. pondering
  27. raise_left_hand
  28. raise_right_hand
  29. sad
  30. sassy
  31. shruggie
  32. sick
  33. speaking
  34. surprised
  35. tease
  36. thinking
  37. tired
  38. wave_1
  39. wave_2
  40. wave_3
  41. well

These designs are not from 3b1b's videos, collected from some manim users:

  1. hello
  2. running
  3. salute
  4. thumb_up

Wordle solver gives invalid 'hard mode' results

The hard mode solver gives this as a possible hard mode sequence:
CRANE
CACTI
CAPUT
CATCH

The third guess, CAPUT, is invalid in hard mode, because it doesn't take into account the fact that the second C in CACTI was marked as yellow.

I believe that the bug is in the generate_pattern_grid function, which checks if yellow squares contribute to the result with
patterns[:, :] += tp * equality_grid[:, :, i, :].any(2)
I can't see a way to fix it while keeping the code vectorized.

I suspect this bug also distorts the non-hard mode results, but in a way that can't be detected just by looking at the results.

No module named 'manim_imports_ext'

Thank you for sharing this great work!

Traceback (most recent call last):
  File "D:\test.py", line 4, in <module>
    from manim_imports_ext import *
ModuleNotFoundError: No module named 'manim_imports_ext'
[Finished in 0.6s with exit code 1]
[shell_cmd: python -u "D:\test.py"]

$ manimgl -v
[12:10:37] INFO     No OpenGL_accelerate module loaded: acceleratesupport.py:17
                    No module named 'OpenGL_accelerate'
ManimGL v1.2.0

$ manim --version
Manim Community v0.11.0

how to solve these?

(Wordle) Does current version of simulations.py account for the double-lettering problem discussed in the 2nd video?

commit 63861f8eeae702ac80a156cf9c75e090337daaa2 "Fix double-letter coloring" claims to have handled the issue with edits in the wordle.py file. Assuming that simulations.py is the new name for the file, I no longer see those changes from that commit in the current version of the file.

I just want to make sure that simulations.py plays the game the "wordle" way of playing it. Can I use the code without worrying about this error?

Problem running code

I use Kali Linux as my OS and whenever I try and run simulations.py I get:
┌──(root💀lookaway)-[/home/***/wordle/_2022/wordle]
└─# python3 simulations.py
zsh: segmentation fault python3 simulations.py

I dont even understand what to run? should I run simulations? or scenes? or quinitic?

In my folder I have:
/home//wordle/_2022/wordle/custom
/home/
/wordle/_2022/wordle/data
/home//wordle/_2022/wordle/pycache
/home/
/wordle/_2022/wordle/footnote.py
/home//wordle/_2022/wordle/manim_imports_ext.py
/home/
/wordle/_2022/wordle/scenes.py
/home/***/wordle/_2022/wordle/simulations.py

cannot run examples for lake of image resources

cannot run examples for lake of image resources

folder = get_directories()["pi_creature_images"]

KeyError: 'pi_creature_images'

where can i get the resources under this paths:

raster_images: "/Users/grant/Dropbox/3Blue1Brown/images/raster"
vector_images: "/Users/grant/Dropbox/3Blue1Brown/images/vector"
pi_creature_images: "/Users/grant/Dropbox/3Blue1Brown/images/pi_creature/svg"
sounds: "/Users/grant/Dropbox/3Blue1Brown/sounds"
data: "/Users/grant/Dropbox/3Blue1Brown/data"

thx~

Manimgl does not find the imports.

Hi guys
I need your help. I have cloned the repo to rebuild the videos. Unfortunately I have several problems.
In various instructions I was told to copy the file to be executed to the root directory of the git. I have done that. After that I started the Python file with Manim. It came to an error message, this can be seen in the picture. It means that it cannot find the file manim_imports_ext. This is demonstrably there.
Can you help me to solve the problem?

Thanks in advance.

image

No module named 'manimlib.mobject.svg.old_tex_mobject'

Hello! Thank you for your videos. I am trying for the first time to rune one of the examples in videos repo, but this error keeps appearing and literally no one has asked about it yet I think.

from manimlib.mobject.svg.old_tex_mobject import *
ModuleNotFoundError: No module named 'manimlib.mobject.svg.old_tex_mobject'

Does anyone know how to solve it? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.