Code Monkey home page Code Monkey logo

animationswithmanim's Introduction

Contents (updating)

Freelance job

If you need an animation made in Manim I can do it for you. I also give private tutorials on Manim, Python and LaTeX.

This tutorial is based on the manim version of 3 february of 2019

  1. Installation on Windows, GNU/Linux and Mac.
  2. Text format/Part 1 - Youtube/Part 2 - YouTube/Part 3 - YouTube
  3. Tex formulas/YouTube
  4. Text like arrays/YouTube
  5. Transformations/Part 1 - YouTube/Part 2 - YouTube
  6. Visual tools/YouTube
  7. Introduction in 2D plot/YouTube
  8. Introduction in 3D plot/YouTube
  9. Add images, svgs and audio/YouTube
  10. Update functions/YouTube
  11. First project/YouTube

Challenges:

Settings:

Extras:

Support this work in:

What is Manim?

Manim is a free tool for Python created by Grant Sanderson (twitter), mathematician from Stanford and owner of the YouTube channel 3Blue1Brown. It is specialized in scientific subjects, mainly mathematical, so it is based on LaTeX commands (mainly in TeX).

What is LaTeX?

LaTeX is a processor of specialized texts in the scientific field, however, manim only uses TeX commands (with some exceptions), which refers to the writing of formulas. An example of the code in TeX is:

\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}.

If I built this command TeX return:

Who is tutorials for?

This course is mainly aimed at teachers who want to explain a didactic and graphic form a mathematical development or the resolution of especially complex problems. The course extends to anyone who wants to explain a scientific topic in a original way.

I need to know Python 3 and LaTeX to take this tutorials?

No, it is not necesary to know something of programming (although it is preferable for faster learning). In addition to learning Python3, teX knowledge is required to write the formulas. Likewise will mention tools such as Pencil chromestore, Codecogs, Rinconmatematico, latex4technics, sciweavers in other pages to learn and write formulas in TeX.

I need a modern PC to run Manim?

No, with 512 MB of RAM and an Intel Core Duo processor (or similar) is more than enough, the difference is the compile time (fewer the resources, the longer it will take to render).

What advantages does Manim offer with respect to other animation tools?

Advantages:

  • It is free and legal.
  • Works on Windows, GNU/Linux (any distribution) and Mac perfectly.
  • Can be used in old computers.
  • Being open source, it is completely customizable to the user's taste.
  • It is constantly improving.
  • The video files are very high quality and light.
  • The formulas are created using TeX commands, so they are of professional quality.
  • In the case of not having programming knowledge, it is a good tool to start learning Python and LaTeX.

Disadvantages:

  • If you do not have the LaTeX package (complete) installed, it will occupy more than 4 GB of space on your computer (Though you can opt for basic instead of complete installation of LaTex which is efficient in terms of download size, and then download other package as per the need).
  • A graphic interface is not used to perform the animations, everything is based on the Python 3 and TeX commands. The example of the classic Hello world! would be
from manimlib.imports import *

class HelloWorld(Scene):
    def construct(self):
        helloWorld = TextMobject("Hello world!")
        self.play(Write(helloWorld))
        self.wait()

Requirements

  • Python 3.7
  • pip (to install plug ins of python)
  • Cairo
  • FFmpeg
  • LaTeX (complete)
  • Sox
  • A few plug ins on the list requirements.txt

animationswithmanim's People

Contributors

abhinandshibu avatar alikarpuzoglu avatar elteoremadebeethoven avatar johk3 avatar laxmanchoudhary avatar loannaflip avatar zavden 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

animationswithmanim's Issues

Please help with that parametric surface

Please, I want to know or some guide to plot that parametric surface

First one I want to thank you for this content, it's amazing.
Returning with my problem I mean something like this:
cassini4b
I saw that post http://lemur.cmp.uea.ac.uk/Research/ivis/backup/PhD/Latest/Paul%20Bourke%20Screenshots/Eggs,%20melons,%20and%20peanuts%20-%20Cassini%20Oval.htm to guide me, but I can´t understand how can I use that info. to create the parametric surface using ParametricSurface(lambda u, v: np.array([ # The parameters of that surface]))

I'll be very greatful if you can help me.
I'm trying with this

lemnisBer = ParametricSurface(
                lambda u, v: np.array([
                   np.cos(u) / (np.sin(u)**2 + 1),
                   0
                   np.cos(u) * np.sin(u) / (np.sin(u)**2 + 1),
                ]), u_min=TAU, u_max=TAU, checkerboard_colors=[YELLOW_E,YELLOW_E],
                resolution=(15, 32)).scale(1.5)

But that don't graph a peanut or something similar.
Best and sincerely greetings,

type object 'Animation' has no attribute 'mobject'

windows 10 64bit python3.7.2 manimlib-0.1.10

when I tpye the code in update_successions/update_successions.py
class SuccessionExample1(Scene):
there is an error when run this class in Succession(Animation, Mobject(), {"run_time": 2.1},
AttributeError: type object 'Animation' has no attribute 'mobject'
I dont know why

class SuccessionExample1Fail(Scene):
...
self.play(
ShowCreationThenDestruction(dashed_line, submobject_mode="lagged_start", run_time=5),
Succession(Animation, Mobject(), {"run_time": 2.1},
Write, text)
)

thank you for your time

Problems with "Cairo"

Hi, I could run Manim on python 3.7.4. But after installing python3.7.5, Manim just doesn't work. When I tried to run it, it says' ModuleNotFoundError: No module named 'cairo'
And when I changed"import Cairo"into"import cairocffi as cairo". Another problem came up:"ValueError: Got a 480 bytes buffer, needs at least 1639680."
Could you tell me how to solve this?

AttributeError: type object 'ShowCreation' has no attribute 'mobject'

hi, when i run the last code in English/6b_plots_3D/scenes.md/Text3D3

class Text3D3(ThreeDScene):
    def construct(self):
        axes = ThreeDAxes()
        self.set_camera_orientation(phi=75 * DEGREES,theta=-45*DEGREES)
        text3d=TextMobject("This is a 3D text")

        self.add_fixed_in_frame_mobjects(text3d) #<----- Add this
        text3d.to_corner(UL)

        self.add(axes)
        self.begin_ambient_camera_rotation()
        self.play(Write(text3d))

        sphere = ParametricSurface(
            lambda u, v: np.array([
                1.5*np.cos(u)*np.cos(v),
                1.5*np.cos(u)*np.sin(v),
                1.5*np.sin(u)
            ]),v_min=0,v_max=TAU,u_min=-PI/2,u_max=PI/2,checkerboard_colors=[RED_D, RED_E],
            resolution=(15, 32)).scale(2)

        self.play(LaggedStart(ShowCreation,sphere))
        self.wait(2)

my ubuntu_18.04 attention program like the title about : AttributeError: type object 'ShowCreation' has no attribute 'mobject'

how can i solver this problem?

MoveAlongPathWithAngle

Hi there :-)

I was looking for the code which produces the "arrow" to follow the curve.
Thank you for providing this useful part of the code.

Best and sincerely greetings,
Thomas

MAPWA

Manim Installation Unsuccesfull "IndexError: list index out of range"

after the installation of manim I tried to use the command line in the command promt

python -m manim example_scenes.py SquareToCircle -pl

this works just fine, the problem araise when i try to use the command

python -m manim example_scenes.py WriteStuff -pl

manim-idex-error

and then I got that, looking through different forums I found this

manim-idex-error2

I can tell that if I do as it is said it works for the WriteStuff, but then after even the most basic exercise related to text generation fails which remaind me of this

manim-idex-error3

How to realize this animation?

image

I had try these three orders:
1.dot_2.rotate(110DEGREES,about_point=dot_1,)
2.dot_2.rotate(110
DEGREES,about_point=np.array([0,1,0]))
3.self.play(ApplyMethod(dot_2.rotate(110*DEGREES,about_point=(0,1,0))))

but all these didn't work...

Manim is working in terminal but not in python shell

I have succesfully installed everything as you instructed in your manim tutorial. Code is perfectly working in terminal but the same in code is not working in python shell. I am sharing the code and the error.

from big_ol_pile_of_manim_imports import *

class WriteStuff(Scene):
def construct(self):
example_text = TextMobject(
"This is a some text",
tex_to_color_map={"text": YELLOW}
)
example_tex = TexMobject(
"\sum_{k=1}^\infty {1 \over k^2} = {\pi^2 \over 6}",
)
group = VGroup(example_text, example_tex)
group.arrange_submobjects(DOWN)
group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)

    self.play(Write(example_text))
    self.play(Write(example_tex))
    self.wait()

Error is

Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.

RESTART: /Users/richie/Desktop/Work/maniminstall/manim-master/manim_practice.py

Warning (from warnings module):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pydub/utils.py", line 165
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work

Install requirements for Cairo / Ubuntu 18.04

Hello! I just wanted to report a minor issue that I encountered, to help people in the future. I am running on Ubuntu 18.04, and had both python 3.6 and python 3.7 already installed. When installing the dependencies for Cairo, I encountered no problem. However, when installing Cairo itself, I get an error about a missing header "Python.h". The reason is simply that when executing

sudo apt install python3-dev

the package manager installed the headers for python 3.6. Installing explicitly the correct version, i.e., python3.7-dev, solved the issue.

Hope it helps! :)

Latex error converting to dvi

Please Help

I met this problem when I was trying to enable Tikz like in your tutorial. I followed every step, but I am using the latest manim not 3 Feb one. And when I compiled ExampleTikz scene, I got
image
I put Tikz packages in both tex_template.tex and ctex_template.tex.
I have checked all the issues, but my problem exists.
I also see ur responses in other places, so I will follow your step. the latex commander can be recognized, but I am not sure if I am missing packages or it might be other problems.

Run latex tex_template.tex

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./tex_template.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-02-25>
(/usr/local/texlive/2019/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan
dalone
(/usr/local/texlive/2019/texmf-dist/tex/latex/tools/shellesc.sty)
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/ifluatex.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/iftex/iftex.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2019/texmf-dist/tex/latex/standalone/standalone.cfg)
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2019/texmf-dist/tex/latex/preview/preview.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/luatex85/luatex85.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/preview/prtightpage.def)))
(/usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/babel/switch.def)
(/usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.def
(/usr/local/texlive/2019/texmf-dist/tex/generic/babel/txtbabel.def))))
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/doublestroke/dsfont.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/setspace/setspace.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/tipa/tipa.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/tipa/t3enc.def)))
(/usr/local/texlive/2019/texmf-dist/tex/latex/relsize/relsize.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/jknapltx/mathrsfs.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/fundus-calligra/calligra.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/wasysym/wasysym.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/ragged2e/ragged2e.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/ms/everysel.sty))
(/usr/local/texlive/2019/texmf-dist/tex/latex/physics/physics.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)))

LaTeX3 Warning: Argument delimiter '\big ' for the command '\@quantity' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\Big ' for the command '\@quantity' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\bigg ' for the command '\@quantity'
(LaTeX3)        should be a single character.


LaTeX3 Warning: Argument delimiter '\Bigg ' for the command '\@quantity'
(LaTeX3)        should be a single character.


LaTeX3 Warning: Argument delimiter '\big ' for the command '\@braces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\Big ' for the command '\@braces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\bigg ' for the command '\@braces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\Bigg ' for the command '\@braces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\big ' for the command '\fbraces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\Big ' for the command '\fbraces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\bigg ' for the command '\fbraces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\Bigg ' for the command '\fbraces' should
(LaTeX3)        be a single character.


LaTeX3 Warning: Argument delimiter '\ket ' for the command '\bra' should be a
(LaTeX3)        single character.

) (/usr/local/texlive/2019/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/dvips.def))
(/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/microtype-pdftex.def)
(/usr/local/texlive/2019/texmf-dist/tex/latex/microtype/microtype.cfg))
(/usr/local/texlive/2019/texmf-dist/tex/latex/pgfplots/pgfplots.sty
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex)
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)))
(/usr/local/texlive/texmf-local/tex/latex/pgf/frontendlayer/tikz.sty
(/usr/local/texlive/texmf-local/tex/latex/pgf/basiclayer/pgf.sty
(/usr/local/texlive/texmf-local/tex/latex/pgf/utilities/pgfrcs.sty
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfutil-common.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfutil-latex.def
(/usr/local/texlive/2019/texmf-dist/tex/latex/ms/everyshi.sty))
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/local/texlive/texmf-local/tex/latex/pgf/basiclayer/pgfcore.sty
(/usr/local/texlive/texmf-local/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfkeysfiltered.code.
tex)) (/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgfsys-dvips.def
(/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgfsys-common-posts
cript.def)))
(/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgfsyssoftpath.code
.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/systemlayer/pgfsysprotocol.code
.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmath.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathparser.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.basic.cod
e.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.trigonome
tric.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.random.co
de.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.compariso
n.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.base.code
.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.round.cod
e.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfunctions.misc.code
.tex)))
(/usr/local/texlive/texmf-local/tex/generic/pgf/math/pgfmathfloat.code.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorepoints.code.t
ex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorepathconstruct
.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorepathusage.cod
e.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorescopes.code.t
ex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoregraphicstate.
code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoretransformatio
ns.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorequick.code.te
x)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoreobjects.code.
tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorepathprocessin
g.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorearrows.code.t
ex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoreshade.code.te
x)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoreimage.code.te
x
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoreexternal.code
.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorelayers.code.t
ex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcoretransparency.
code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/basiclayer/pgfcorepatterns.code
.tex)))
(/usr/local/texlive/texmf-local/tex/generic/pgf/modules/pgfmoduleshapes.code.te
x)
(/usr/local/texlive/texmf-local/tex/generic/pgf/modules/pgfmoduleplot.code.tex)

(/usr/local/texlive/texmf-local/tex/latex/pgf/compatibility/pgfcomp-version-0-6
5.sty)
(/usr/local/texlive/texmf-local/tex/latex/pgf/compatibility/pgfcomp-version-1-1
8.sty)) (/usr/local/texlive/texmf-local/tex/latex/pgf/utilities/pgffor.sty
(/usr/local/texlive/texmf-local/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgfkeys.code.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/utilities/pgffor.code.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/tikz.code.te
x
(/usr/local/texlive/texmf-local/tex/generic/pgf/libraries/pgflibraryplothandler
s.code.tex)
(/usr/local/texlive/texmf-local/tex/generic/pgf/modules/pgfmodulematrix.code.te
x)
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibrarytopaths.code.tex)))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric
.code.tex))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.c
ode.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_loader.code.tex
Package pgfplots: loading complementary code for your PGF version...

(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_misc.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfkeys.code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfkeysfiltered.code.tex))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfmathfloat.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgflibraryplothandlers.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgflibraryfpu.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfcorescopes.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfcorelayers.code.tex)
Package pgfplots: loading complementary utilities for your pgf version...

(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_pgfutil-common-lists.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_trig_format.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_leq.code.tex))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code
.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/liststructure/pgfplots
liststructure.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/liststructure/pgfplots
liststructureext.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/liststructure/pgfplots
array.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/liststructure/pgfplots
matrix.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable
shared.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/liststructure/pgfplots
deque.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.co
de.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.da
ta.code.tex))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.verb
.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplot
s.surfshading.code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots
.surfshading.pgfsys-dvips.def)))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.
code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/util/pgfplotscolor.cod
e.tex))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.c
ode.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.c
ode.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandle
r.code.tex
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplotimage.
code.tex)))
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.
tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessin
g.code.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.cod
e.tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.markers.code.
tex)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex
)
(/usr/local/texlive/2019/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.te
x)
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibrarydecorations.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/modules/pgfmoduledecorations.co
de.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibrarydecorations.pathmorphing.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/libraries/decorations/pgflibrar
ydecorations.pathmorphing.code.tex))
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibrarydecorations.pathreplacing.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/libraries/decorations/pgflibrar
ydecorations.pathreplacing.code.tex)))
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibraryplotmarks.code.tex
(/usr/local/texlive/texmf-local/tex/generic/pgf/libraries/pgflibraryplotmarks.c
ode.tex)))
(/usr/local/texlive/2019/texmf-dist/tex/latex/circuitikz/circuitikz.sty
(/usr/local/texlive/texmf-local/tex/generic/pgf/frontendlayer/tikz/libraries/ti
kzlibrarycalc.code.tex)
! I can't find file `tikzlibraryarrows.meta.code.tex'.
<argument> ...nput tikzlibrary\pgf@temp .code.tex
                                                  \catcode `\@ =\csname tikz...
l.30 \usetikzlibrary{arrows.meta, bending}

(Press Enter to retry, or Control-D to exit)
Please type another input file name: ^D
! Emergency stop.
<argument> ...nput tikzlibrary\pgf@temp .code.tex
                                                  \catcode `\@ =\csname tikz...
l.30 \usetikzlibrary{arrows.meta, bending}

No pages of output.
Transcript written on tex_template.log.

How can I draw curves in polar form. ex: r = 1 + 2cos(alpha).

WARNING

Before writing an issue, please check the following links if someone has already resolved your question. If you are asking things that have already been resolved I will have no choice but to close your issue.

You can joined to the Discord community here

Points to consider before writing your issue

  • This repository works with the Manim version of February 3, unless otherwise indicated. If your code does not work, check that you are using the correct version.
  • At the moment Manim works with Python 3.7, not with 3.8. This is because several of the dependencies have not yet been updated.
  • If the terminal throws an error, please write it completely with the markdown format.
  • Be clear and specific with your problem, share the code (and files, if applicable) and the command you use when rendering the video.

Fast markdown tutorial.

Inline code:

INPUT

The code is `TexMobject` write `TeX`.

OUTPUT

The code is TexMobject write TeX.

Multiline code

INPUT

My code is:

```python

Here is

a multiline

code

```

OUTPUT

My code is:

Here is

a multiline

code

LEARN MORE HERE

Function graphs to updaters

Hi everyone i don't know how to create this animation: add a decimal number "a", With the change of a, y also changes, y=a, and create a rectangular coordinate system with time as the horizontal axis and y as the vertical axis. Updater and ValueTracker seems to have no effect. Elteoremadebeethoven made a tutorial about updaters. (without graphs) But it's still hard to make this animation with graph. Here is my code:

class UpdaterTest9(GraphScene):
    def construct(self):
        # global number_value
        numberplane = NumberPlane()
        self.add(numberplane)
        self.setup_axes()
        line = Square()
        line2 = Circle()
        number = DecimalNumber(0, num_decimal_places=5)

        # number.add_updater(lambda m: m.set_value(get_area(line)))
        def number_updater(obj):
            obj.add_updater(lambda m: m.set_value(get_area(line)))

        # self.get_graph(lambda x: x.set_value(get_area(line)))
        number.add_updater(number_updater)
        # if number.get_value() != 0:
        number_value = number.get_value()
        graph = self.get_graph(
            x_values=[0, number_value],
            y_values=[0, number_value],
            # func=lambda x: 0
            func=number_value
        )
        graph.add_updater(number_updater)
        self.add(number, graph)
        self.play(Transform(line, line2), rate_func=linear, run_time=8)
        self.wait(2)
class UpdaterTest10(GraphScene):
    def construct(self):
        # global number_value
        numberplane = NumberPlane()
        self.add(numberplane)
        self.setup_axes()
        line = Square()
        line2 = Circle()
        vt = ValueTracker(0)
        number = DecimalNumber(0, num_decimal_places=5)

        # numberv = ChangeDecimalToValue(decimal_mob=number)
        # numberv = CountInDecimal()

        # number.add_updater(lambda m: m.set_value(get_area(line)))
        def number_updater(obj):
            obj.add_updater(lambda m: m.set_value(vt.get_value(get_area(line))))

        # self.get_graph(lambda x: x.set_value(get_area(line)))
        number.add_updater(number_updater)
        # if number.get_value() != 0:
        number_value = number

        # number_value.add_updater(lambda m: m.set_value(number))
        def number_value_updater(obj):
            obj.add_updater(lambda m: m.set_value(number))

        # graph = self.get_graph(
        #     x_values=[],
        #     y_values=[],
        #     # func=lambda x: 0
        #     func=number_value_updater(obj)
        #
        # ).add_updater(number_value_updater)
        graph = FunctionGraph(function=number_updater)

        graph.add_updater(number_updater)
        self.add(number, graph)
        self.play(Transform(line, line2), rate_func=linear, run_time=8)
        self.wait(2)

Hoping for a reply

I had a problem rendering the WriteStuff command as i got an error of latex not recognized as a batch file. But then after going through your thread on the issue i reinstalled latex and i was able to play the command.

However now when i am trying to run render the WhatIsCONFIG command i get the same error of latex not recognized as a batch file. I tried running the WriteStuff command and it works just fine. But the Whatisconfig gives the error. 

I think the problem is with the .py files and the code regarding dvi. however as i am not from the background of computer science i do not know how to proceed

ModuleNotFoundError: No module named 'cairo'

I did as per your instructions but at the final command

python3 -m manim example_scenes.py WriteStuff -pl

I am getting an error

ModuleNotFoundError: No module named 'cairo

Since I have already Latex so I did not download it. I am attaching a pic of it logo.

Screen Shot 2019-08-12 at 4 32 26 PM

Kindly help.

¿Error de renderizado?

Hola, he estado checando las guías propuestas en el canal y el git y tengo un problema.
Al renderizar el código siguiente como vídeo, no me salen las etiquetas del lado derecho de la gráfica. Lo curioso de esto es que cuando lo renderizo como imagen, aparece todo.
¿Podrías ayudarme?

Multiline code

Mi código es:

from manimlib.imports import *

def Range(in_val,end_val,step=1):
    return list(np.arange(in_val,end_val+step,step))

class GrafInt2(GraphScene):
	CONFIG = {
		"y_max": 1.5,
		"y_min": -1.5,
		"x_max": 2*PI,
		"x_min": -2*PI,
		"x_tick_frequency": PI/2,
		"y_tick_frequency": 0.5,
		"x_axis_width": 9,
		"x_axis_label": None, #No escribe la etiqueta del eje y, para eso, ir a línea 148
		"y_axis_label": None, #No escribe la etiqueta del eje x, para eso, ir a línea 149
		#"axes_color": BLUE, Podemos determinarlo desde aquí o como se ve en la línea 141-143
		"graph_origin": ORIGIN
	}
	def construct(self):
		self.setup_axes()

		#Creación de objetos
		titulo = TextMobject("Gráfica coseno")

		graf_cos = self.get_graph(
			lambda x : np.cos(x),
			color = RED,
			x_min = -2*PI,
			x_max = 2*PI,
		)

		#Posición de los objetos
		titulo.to_corner(UL)

		#Propiedades de los objetos
		graf_cos.set_stroke(width = 4)

		#Inicio de animación
		self.play(
			Write(titulo), run_time = 4
		)

		self.play(
			ShowCreation(graf_cos), run_time = 7
		)

		self.wait()

	def setup_axes(self):
		GraphScene.setup_axes(self)

		#Grosor de los ejes XY
		self.x_axis.set_stroke(width = 3)
		self.y_axis.set_stroke(width = 3)

		#Color de los ejes XY
		self.x_axis.set_color(BLUE)
		self.y_axis.set_color(BLUE)

		#Modificación de etiquetas de los ejes
		et_x = TexMobject("\\theta")
		et_y = TexMobject("f(\\theta)")

		et_x.next_to(self.x_axis,RIGHT)   #Posiciona la etiqueta del lado derecho del eje de las x
		et_y.next_to(self.y_axis,UP)	  #Posiciona la etiqueta arriba del eje y

		#Para las etiquetas del eje Y
		self.y_axis.label_direction = LEFT #Posición de valores de y respecto al eje y
		self.y_axis.add_numbers(*[-1,1]) #Valores de y donde poner etiquetas

		#Para las etiquetas del eje X
		x_min = -2*PI
		x_max = 2*PI
		saltos_x = PI

		valor_decimal_x = Range(x_min,x_max,saltos_x)

		#Texto que llevará según el valor de X
		lista_x = TexMobject(
			"-2\\pi",  #Para -2*PI
			"-\\pi",   #Para -PI
			"\\",      #Para cero
			"\\pi",    #Para PI
			"2\\pi."   #Para 2*PI
		)

		#Asignación de texto a valores
		valores_x = [(i,j)
			for i,j in zip(valor_decimal_x, lista_x)
		]

		self.x_axis_label = VGroup()

		for x_val,x_tex in valores_x:
			x_tex.scale(0.7)                                          #Escala de texto de las etiquetas eje X
			x_tex.next_to(self.coords_to_point(x_val,0), DOWN)	  #Posición de las etiquetas eje X
			self.x_axis_label.add(x_tex)						  

		#Animación de objetos creados para el plano
		self.play(
			*[ShowCreation(objeto)
			for objeto in [
				self.x_axis,
				self.y_axis,
				et_x,
				et_y,
				self.x_axis_label
				]
			],
			run_time=3
		)

tengo el siguiente error ""See log output above or the log file: %s" % log_file) Exception: Latex error converting to dvi."

Después de buscar entre los archivos de donde venía el error encontre que no se esta conviertiendo el archivo .tex a .dvi con los textos a animar, también no puedo instalar desde el pip pydvi, que parece ser el modulo que convierte los archivos .tex a .dvi, marcando el error siguente:

ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Gilberto\AppData\Local\Temp\pip-install-tga6ff5_\pydvi\setup.py", line 30, in
execfile('setup_data.py')
NameError: name 'execfile' is not defined
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Gilberto\AppData\Local\Temp\pip-install-tga6ff5_\pydvi\

parece haber un error con el instalador especificamente con "execfile"

sin embargo manim funciona mientras no escriba texto, tambien ya reinstale el miktex para estar seguro que no es latex el que esta fallando

How to animate python code using manim?

WARNING

Before writing an issue, please check the following links if someone has already resolved your question. If you are asking things that have already been resolved I will have no choice but to close your issue.

You can joined to the Discord community here

Points to consider before writing your issue

  • This repository works with the Manim version of February 3, unless otherwise indicated. If your code does not work, check that you are using the correct version.
  • At the moment Manim works with Python 3.7, not with 3.8. This is because several of the dependencies have not yet been updated.
  • If the terminal throws an error, please write it completely with the markdown format.
  • Be clear and specific with your problem, share the code (and files, if applicable) and the command you use when rendering the video.

Fast markdown tutorial.

Inline code:

INPUT

The code is `TexMobject` write `TeX`.

OUTPUT

The code is TexMobject write TeX.

Multiline code

INPUT

My code is:

```python

Here is

a multiline

code

```

OUTPUT

My code is:

Here is

a multiline

code

LEARN MORE HERE

Error when trying to use text like arrays

I write this in my code, and it works fine:
title = TexMobject("\\frac{tanx - \\sqrt{3}}{2cosx + 1} = 0")
But when I write like this:
title = TexMobject("\\frac{","tanx","-\\sqrt{3}}{","2cosx","+1} = 0")
I got Xelatex error converting to dvi
What's the problem here?

Positional arguments are missing (kwargs)

I'm learning Manim through your video tutorial. Thank you for giving us such a great opportunity to learn how to use it.

Currently I'm investigating the making use of arrays (Manim tutorial | 3). Almost every one of 26 classes (FormulaColor1, CrossText, etc) from 3_text_like_arrays.py give an error:

__init__() missing 1 required positional argument: 'kwargs'

I suppose some configuration parameters are missing, but I don't know how to set them. I use Win10 x64.

For example, when calling FormulaColor1, which is:

class FormulaColor1(Scene): 
    def construct(self):
        text = TexMobject("x","=","{a","\\over","b}")
        text[0].set_color(RED)
        text[1].set_color(BLUE)
        text[2].set_color(GREEN)
        text[3].set_color(ORANGE)
        text[4].set_color("#DC28E2")
        self.play(Write(text))
        self.wait(2)

I receive this error:

Traceback (most recent call last):
  File "C:\Program Files\Manim\manimlib\extract_scene.py", line 155, in main
    scene = SceneClass()
  File "C:\Program Files\Manim\manimlib\scene\scene.py", line 75, in __init__
    self.construct(**kwargs)
  File "3_text_like_arrays.py", line 26, in construct
    self.play(Write(text))
TypeError: __init__() missing 1 required positional argument: 'kwargs'

What is the problem?

Analytic Geometry Series don't work in Manim_3feb

When I copied the code in Analytic Geometry Series and tried to run it, it says"TypeError: get_graph() got an unexpected keyword argument 'stroke_width'". Is it that Analytic Geometry Series can't run in Manim_3feb?

"latex" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.

Hola! tengo un problema al ejecutar "WriteStuff" cuando instalo manim. Inserto lo que me aparece en la pantalla de cmd
C:\Manim\manim_3_feb>python -m manim example_scenes.py WriteStuff -pl
Writing "\centering This is a some text" to C:\Manim\manim_3_feb\manimlib\files\Tex\fc014450ce29cae4.tex
"latex" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

Traceback (most recent call last):
File "C:\Manim\manim_3_feb\manimlib\extract_scene.py", line 153, in main
scene = SceneClass(**scene_kwargs)
File "C:\Manim\manim_3_feb\manimlib\scene\scene.py", line 54, in init
self.construct()
File "example_scenes.py", line 100, in construct
tex_to_color_map={"text": YELLOW}
File "C:\Manim\manim_3_feb\manimlib\mobject\svg\tex_mobject.py", line 144, in init
self, self.arg_separator.join(tex_strings), **kwargs
File "C:\Manim\manim_3_feb\manimlib\mobject\svg\tex_mobject.py", line 45, in init
self.template_tex_file_body
File "C:\Manim\manim_3_feb\manimlib\utils\tex_file_writing.py", line 19, in tex_to_svg_file
dvi_file = tex_to_dvi(tex_file)
File "C:\Manim\manim_3_feb\manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
"See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: C:\Manim\manim_3_feb\manimlib\files\Tex\fc014450ce29cae4.log
Saludos

FileNotFoundError: [Errno 2] No such file or directory 'example.py'

I've been trying to run a python example by copying and pasting your code. I have copied and pasted the code into a file 'example.py'

I have verified that the file does indeed exist now in the same directory I used to successfully run example_scenes.py SquareToCircle

I have typed:
python3 -m manim example.py TangentVector -pl

It says that example.py is not there

It is there

Therefore wtf please help

WARNING

Before writing an issue, please check the following links if someone has already resolved your question. If you are asking things that have already been resolved I will have no choice but to close your issue.

You can joined to the Discord community here

Points to consider before writing your issue

  • This repository works with the Manim version of February 3, unless otherwise indicated. If your code does not work, check that you are using the correct version.
  • At the moment Manim works with Python 3.7, not with 3.8. This is because several of the dependencies have not yet been updated.
  • If the terminal throws an error, please write it completely with the markdown format.
  • Be clear and specific with your problem, share the code (and files, if applicable) and the command you use when rendering the video.

Fast markdown tutorial.

Inline code:

INPUT

The code is `TexMobject` write `TeX`.

OUTPUT

The code is TexMobject write TeX.

Multiline code

INPUT

My code is:

```python

Here is

a multiline

code

```

OUTPUT

My code is:

Here is

a multiline

code

LEARN MORE HERE

Trying to randomize students creatures in TeacherStudentsScene but it shows same students every time when i render

I created new creatures named

  • PlusCreature
  • MinusCreature
  • MultiCreature
  • DivCreature
  • RemCreature
  • AndCreature
  • EqualCreature
  • RoundBracketsCreature
  • CurlyBracketsCreature
  • SquareBracketsCreature
  • AngleBracketsCreature
  • HashCreature
  • QuestionCreature
    Creatures are looks like
    Ceatures

and added this creatures to the file c_creature (renamed pi_creature) for example this one

class PlusCreature(CCreature):
    CONFIG = {
        "file_name_prefix": "PlusCreatures"
    }

and i changed method 'create_c_creatures()' in class TeacherStudentsScene in file c_creature_scene.py (renamed pi_creature_scene.py)

    def create_c_creatures(self):
        self.teacher = CCreature(color=self.teacher_color)
        self.teacher.to_corner(DOWN + RIGHT)
        self.teacher.look(DOWN + LEFT)
        '''From that
        self.students = VGroup(*[
            Randolph(color=c)
            for c in self.student_colors
        ])
        '''
        # To this
        print("yessssss its runing, we are creating students.")
        self.students = VGroup(*[
            random.choice([PlusCreature,
                          MinusCreature,
                          MultiCreature,
                          DivCreature,
                          RemCreature,
                          AndCreature,
                          EqualCreature,
                          RoundBracketsCreature,
                          CurlyBracketsCreature,
                          SquareBracketsCreature,
                          AngleBracketsCreature,
                          HashCreature,
                          QuestionCreature])(color=c)
            for c in self.student_colors
        ])
        self.students.arrange(RIGHT)
        self.students.scale(self.student_scale_factor)
        self.students.to_corner(DOWN + LEFT)
        self.teacher.look_at(self.students[-1].eyes)
        for student in self.students:
            student.look_at(self.teacher.eyes)
        return [self.teacher] + list(self.students)

i created file manimlib.imports_with_c that imports c_creatures instead of pi_creatures
when i run following code ( i tried self.setup() and self.c_creatures = VGroup(*self.create_c_creatures()) but this lines just create another creatures onto previouse ones)

from manimlib.imports_with_c import *
class ts(TeacherStudentsScene):
    def construct(self):
        #self.setup()
        #self.c_creatures = VGroup(*self.create_c_creatures())
        self.teacher_says( 
            "Something different today!",
            run_time = 2
        )

Output always shows same students with two EqualCreatures and one QuestionCreature even when rendering code again and again but according to changes in method 'create_c_creatures()' in class TeacherStudentsScene in file c_creature_scene.py it should be create random creatures everytimes i run the code

same output is following
output

it always print the output from line print("yessssss its runing, we are creating students.") in create_c_creatures() method that means it runs every time between multiple renders. this mean may be there is something wrong with random.choice() method
but i tried following code.

import random
def a1():
    return "1"
def a2():
    return "2"
def a3():
    return "3"
def a4():
    return "4"
def a5():
    return "5"
numbers = [*[random.choice([a1,a2,a3,a4,a5])() for i in range(0,20)]]
print(numbers)

it allways print random numbers.

but when i put this code inside create_c_creatures() like follow

 print("yessssss its runing, we are creating students.")
        self.students = VGroup(*[
            random.choice([PlusCreature,
                          MinusCreature,
                          MultiCreature,
                          DivCreature,
                          RemCreature,
                          AndCreature,
                          EqualCreature,
                          RoundBracketsCreature,
                          CurlyBracketsCreature,
                          SquareBracketsCreature,
                          AngleBracketsCreature,
                          HashCreature,
                          QuestionCreature])(color=c)
            for c in self.student_colors
        ])
        def a1():
            return "1"
        def a2():
            return "2"
        def a3():
            return "3"
        def a4():
            return "4"
        def a5():
            return "5"
        numbers = [*[random.choice([a1, a2, a3, a4, a5])() for i in range(0, 20)]]
        print(numbers)

now it always shows same numbers.

then whats wrong with my code ? why always same students ?

ColoringText(Scene) does not work

If I try rendering the scene I get the following error from the console:

Traceback (most recent call last): File "C:\Manim\manim_28aug\manimlib\extract_scene.py", line 155, in main scene = SceneClass(**scene_kwargs) File "C:\Manim\manim_28aug\manimlib\scene\scene.py", line 53, in __init__ self.construct() File "solow.py", line 49, in construct run_time = 0.12 File "C:\Manim\manim_28aug\manimlib\animation\composition.py", line 34, in __init__ [anim.mobject for anim in animations] File "C:\Manim\manim_28aug\manimlib\animation\composition.py", line 34, in <listcomp> [anim.mobject for anim in animations] AttributeError: type object 'ApplyMethod' has no attribute 'mobject'

Note: I am using the 28 Aug version.

Creature Malformation

So, I am with manim version 3 feb 2019
I followed this tutorial: https://youtu.be/KGdA8IB6JL0
I changed ALL the "NumberCreature" with "criatura_phi"
I have this code:

class phiCena(Scene):
def construct(self):
Ale=Alex().to_edge(DOWN)
palabras_ale = TextMobject("Learn to do \animations with me!!")
self.add(Ale)

self.play(criatura_phiSays(
Ale, palabras_ale,
bubble_kwargs = {"height" : 4, "width" : 6},
target_mode="speaking"
))

for k in range(0, 4):
self.wait()
self.play(Blink(Ale))

When I render WITHOUT the middle-part (the part surrounded by the ###), it all goes right (the phi_Cena_ok gif).
phiCena_ok
But when I try to render WITH the middle-part, something weird happens (the phi_Cena_not_ok gif).
phiCena_not_ok
(I render it like mp4 video, but I had to convert them to gifs to pu them here :P)

Error: Import Error : While running the manim.py.

~/manim# python3.7 -m manim example_scenes.py SquareToCircle -pl Traceback (most recent call last): File "/root/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/root/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/manim/manim.py", line 2, in <module> import manimlib File "/root/manim/manimlib/__init__.py", line 4, in <module> import manimlib.extract_scene File "/root/manim/manimlib/extract_scene.py", line 9, in <module> from manimlib.scene.scene import Scene File "/root/manim/manimlib/scene/scene.py", line 12, in <module> from manimlib.camera.camera import Camera File "/root/manim/manimlib/camera/camera.py", line 9, in <module> import cairo File "/root/anaconda3/lib/python3.7/site-packages/cairo/__init__.py", line 1, in <module> from ._cairo import * # noqa: F401,F403 ImportError: /root/anaconda3/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index

I watched your video I followed everystep shown in your video, the last step while running example_scenes.py, it gives import error.

Please Help, I am trying to install Manim since last 3 days :(

Hola! Tengo una duda respecto a los gráficos en manim

Hola! sin antes disculparme con esta básica pregunta, quería plantearte una duda que me surgió al realizar gráficos de funciones, pues no encontré información en internet respecto esta.

Bien, mi duda es que, ¿Cómo hago para disminuir el tamaño de los ejes y de la función ?, pues si escalo la variable "graph" sólo se escala el gráfico de mi función, mas no los ejes "x" e "y". Además, ¿Cómo hago para animar un movimiento de esta? Había pensado en definir un mismo gráfico dos veces, con distintas posiciones, pero esto resulta imposible pues los "ejes" se definen una sóla vez

Espero se entiendan mis preguntas
Saludos y de ante mano muchas gracias !

How to convert simple string to LaTeX string programmatically ?

if we try TextMobject(" \# \{ \} ")
it works fine.
but if we try following code TextMobject(" # { } ")
it will result into following error

File "manimlib\utils\tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: ./media\Tex\c2fe0a3b9407ff29.log

is there any way to convert simple string " # { } " to LaTex string " \# \{ \} " ?
something like print(StringToLaTexString(" # { } "))
Output should be \# \{ \}
So that we can use something like TextMobject(StringToLaTexString(" # { } ")) to avoid error.

No me reconoce el comando "ffmpeg"

Pasa que al instalar FFmpeg no es reconocido como comando interno o externo.

image

Tengo la carpeta de FFmpeg en la raíz C: así como en las variables de entorno, así que no sé cuál sea el problema:(

Nota: tengo la version 3.9 de Python pero no sé si ese sea el problema.

SVGMobject makes svg images without colors and proper geometry.

How to make svg images with colors and proper geometry ?

class SVGTest(Scene):
    def construct(self):
        svg1 = SVGMobject("Partial")
        self.play(FadeIn(svg1))
        self.wait()

Partial.svg is looks like

Partial.svg

Output

Output
even i tried other svg images, same problem with all svg images.
i want to do that so that i can create some similar charaters to 'PiCreatures' and use Transform( ) to perform animations among different poses's svg images.

Shift animation returns a black screen video

Is it a bug? Or there is another way to shift an animation?

text = Text("Manim Animation", font="Arial", stroke_width=0)

self.play(
    LaggedStartMap(FadeIn, text),
    ApplyMethod(text.shift, UP)
)

Thanks for these awesome examples!

Can't use TextMobject in CONFIG in latest version

Can't use TextMobject in CONFIG
image
gives error

Traceback (most recent call last):
  File "./manim.py", line 5, in <module>
    manimlib.main()
  File "/Users/qianyiqian/Development/manim_practice/manimlib/__init__.py", line 11, in main
    config = manimlib.config.get_configuration(args)
  File "/Users/qianyiqian/Development/manim_practice/manimlib/config.py", line 185, in get_configuration
    module = get_module(args.file)
  File "/Users/qianyiqian/Development/manim_practice/manimlib/config.py", line 180, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "myPractice.py", line 425, in <module>
    class WhatIsCONFIG(Scene):
  File "myPractice.py", line 427, in WhatIsCONFIG
    "object_1": TextMobject("Object 1"),
  File "/Users/qianyiqian/Development/manim_practice/manimlib/mobject/svg/tex_mobject.py", line 144, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "/Users/qianyiqian/Development/manim_practice/manimlib/mobject/svg/tex_mobject.py", line 44, in __init__
    self.template_tex_file_body
  File "/Users/qianyiqian/Development/manim_practice/manimlib/utils/tex_file_writing.py", line 19, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "/Users/qianyiqian/Development/manim_practice/manimlib/utils/tex_file_writing.py", line 67, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: 7ba99e26556cd349.log

When I remove the TextMobjec() in CONFIG, it can be compiled.

RemoveBackgroundStrokeWidth----it doesn't work

source code:

class RemoveBackgroundStrokeWidth(ChangeBackgroundColor):
CONFIG={
"text":TexMobject(
r"\frac{d}{dx}\Bigr|_{y=2}",
background_stroke_width=0, #<- Add this line
).scale(5)
}

$ python3 -m manim .py RemoveBackgroundStrokeWidth -pl
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/
/Desktop/manim-master/manim.py", line 5, in
manimlib.main()
File "/Users//Desktop/manim-master/manimlib/init.py", line 11, in main
config = manimlib.config.get_configuration(args)
File "/Users/
/Desktop/manim-master/manimlib/config.py", line 185, in get_configuration
module = get_module(args.file)
File "/Users//Desktop/manim-master/manimlib/config.py", line 180, in get_module
spec.loader.exec_module(module)
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "
**.py", line 19, in
class RemoveBackgroundStrokeWidth(ChangeBackgroundColor):
NameError: name 'ChangeBackgroundColor' is not defined

and btw....
if i don't wanna put the order"background_stroke_width=0," in the config...
what should i do?

like this?

square.set_stroke(WHITE, 10)
square.set_background_stroke_width = 0 ...?

or

label1=TexMobject("a")
label1.set_stroke_width=0

....i try all of these orders ... but it seems that it doesn't work...

Necesito ayuda para poder instalar manim. Mi problema básicamente es con la instalación de Pycairo. De igual forma instalé ffmpeg de una diferente, pero si se instaló, solo que no me instala el pycairo.

WARNING

Before writing an issue, please check the following links if someone has already resolved your question. If you are asking things that have already been resolved I will have no choice but to close your issue.

You can joined to the Discord community here

Points to consider before writing your issue

  • This repository works with the Manim version of February 3, unless otherwise indicated. If your code does not work, check that you are using the correct version.
  • At the moment Manim works with Python 3.7, not with 3.8. This is because several of the dependencies have not yet been updated.
  • If the terminal throws an error, please write it completely with the markdown format.
  • Be clear and specific with your problem, share the code (and files, if applicable) and the command you use when rendering the video.

Fast markdown tutorial.

Inline code:

INPUT

The code is `TexMobject` write `TeX`.

OUTPUT

The code is TexMobject write TeX.

Multiline code

INPUT

My code is:

```python

Here is

a multiline

code

```

OUTPUT

My code is:

Here is

a multiline

code

LEARN MORE HERE

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.