Closed markromanmiller closed 2 years ago
At least one of my issues is not understanding the semantics. In a simpler version, where the move and rotations happen separately, the frame_center position does stay the same while other items rotate around it.
Is there something like "move_to" that applies to cameras?
Have you tried camera.frame.move_to
?
If I understand correctly, that only works for MovingCameras, which don't do 3D stuff, right? I'm using a ThreeDCamera.
In that case, I have no more suggestions :disappointed:
TBH, next time I have some time I want to work on a complete rewrite of the Camera class...
My eventual workaround was to shift
everything in the scene by a specified amount. It's hacky, but this is for code I'll likely never touch again after making a video.
Unless you want to keep this issue open as a feature request, I think it should be closed.
Fixed in PR #1821
Description of bug / unexpected behavior
At the end of the motion animation, the dot, which represents the target of the move_camera operation, is not in the center of the image.
Expected behavior
I expected the dot to be in the center when the animation finishes.
How to reproduce the issue
Code for reproducing the problem
```py class CameraMotionTest(ThreeDScene): def construct(self): axes = ThreeDAxes(width=1) self.play(FadeIn(axes)) self.wait() should_be_center = np.array([PI ** 2 / 8, PI / 4, 0.5]) self.add(Dot(point=should_be_center)) self.move_camera(phi=55 * DEGREES, theta=-55 * DEGREES, distance=3, frame_center=should_be_center) self.wait() ```Additional media files
Images/GIFs
![CameraMotionTest](https://user-images.githubusercontent.com/1994318/102914350-fd160900-4434-11eb-8371-e4cbf73750f6.gif)Logs
Terminal output
``` happy to provide if necessary... ```System specifications
System Details
- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 18.04 - RAM: - Python version (`python/py/python3 --version`): Python 3.6.9 - Installed modules (provide output from `pip list`): ``` cairocffi (file-.cairocffi-VERSION) cffi (1.14.4) colorama (0.4.4) colour (0.1.5) commonmark (0.9.1) dataclasses (0.7) manimce (0.1.1) numpy (1.19.4) pangocairocffi (file-.pangocairocffi-VERSION) pangocffi (file-.pangocffi-VERSION) Pillow (8.0.1) pip (9.0.1) pkg-resources (0.0.0) progressbar (2.5) pycairo (1.20.0) pycparser (2.20) pydub (0.24.1) Pygments (2.7.3) rich (6.2.0) scipy (1.5.4) setuptools (39.0.1) tqdm (4.54.1) typing-extensions (3.7.4.3) wheel (0.36.2) ```LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020): + Installed LaTeX packages: ``` i ae: Virtual fonts for T1 encoded CMR-fonts i amscls: AMS document classes for LaTeX i amsfonts: TeX fonts from the American Mathematical Society i amsmath: AMS mathematical facilities for LaTeX i anysize: A simple package to set up document margins i apa6: Format documents in APA style (6th edition) i atbegshi: Execute stuff at \shipout time i attachfile2: Attach files into PDF i attachfile2.x86_64-linux: x86_64-linux files of attachfile2 i atveryend: Hooks at the very end of a document i auxhook: Hooks for auxiliary files i babel: Multilingual support for Plain TeX or LaTeX i babel-english: Babel support for English i babelbib: Multilingual bibliographies i beamer: A LaTeX class for producing presentations and slides i bibtex: Process bibliographies for LaTeX, etc i bibtex.x86_64-linux: x86_64-linux files of bibtex i bigintcalc: Integer calculations on very large numbers i bitset: Handle bit-vector datatype i bookmark: A new bookmark (outline) organization for hyperref i booktabs: Publication quality tables in LaTeX i breqn: Automatic line breaking of displayed equations i calligra: Calligraphic font i caption: Customising captions in floating environments i carlisle: David Carlisle's small packages i cite: Improved citation handling in LaTeX i cm: Computer Modern fonts i cmap: Make PDF files searchable and copyable i collection-basic: Essential programs and files i collection-latex: LaTeX fundamental packages i collection-latexrecommended: LaTeX recommended packages i colorprofiles: Collection of free ICC profiles i colortbl: Add colour to LaTeX tables i crop: Support for cropmarks i csquotes: Context sensitive quotation facilities i ctable: Flexible typesetting of table and figure floats using key/value directives i dehyph: German hyphenation patterns for traditional orthography i dehyph-exptl: Experimental hyphenation patterns for the German language i doublestroke: Typeset mathematical double stroke symbols i dvipdfmx: An extended version of dvipdfm i dvipdfmx.x86_64-linux: x86_64-linux files of dvipdfmx i dvips: A DVI to PostScript driver i dvips.x86_64-linux: x86_64-linux files of dvips i ec: Computer modern fonts in T1 and TS1 encodings i enctex: A TeX extension that translates input on its way into TeX i endfloat: Move floats to the end, leaving markers where they belong i environ: A new interface for environments in LaTeX i epstopdf-pkg: Call epstopdf "on the fly" i eso-pic: Add picture commands (or backgrounds) to every page i etex: An extended version of TeX, from the NTS project i etex-pkg: E-TeX support package i etexcmds: Avoid name clashes with e-TeX commands i etoolbox: e-TeX tools for LaTeX i euenc: Unicode font encoding definitions for XeTeX i euler: Use AMS Euler fonts for math i everyshi: Take action at every \shipout i extsizes: Extend the standard classes' size options i fancybox: Variants of \fbox and other games with boxes i fancyhdr: Extensive control of page headers and footers in LaTeX2e i fancyref: A LaTeX package for fancy cross-referencing i fancyvrb: Sophisticated verbatim text i filehook: Hooks for input files i firstaid: First aid for external LaTeX files and packages that need updating i fix2col: Fix miscellaneous two column mode features i float: Improved interface for floating objects i fontspec: Advanced font selection in XeLaTeX and LuaLaTeX i footnotehyper: hyperref aware footnote.sty i fp: Fixed point arithmetic i framed: Framed or shaded regions that can break across pages i fundus-calligra: Support for the calligra font in LaTeX documents i geometry: Flexible and complete interface to document dimensions i gettitlestring: Clean up title references i glyphlist: Adobe Glyph List and TeX extensions i graphics: The LaTeX standard graphics bundle i graphics-cfg: Sample configuration files for LaTeX color and graphics i graphics-def: Colour and graphics option files i grfext: Manipulate the graphics package's list of extensions i grffile: Extended file name support for graphics (legacy package) i gsftopk: Convert "Ghostscript fonts" to PK files i gsftopk.x86_64-linux: x86_64-linux files of gsftopk i helvetic: URW "Base 35" font pack for LaTeX i hologo: A collection of logos with bookmark support i hopatch: Load patches for packages i hycolor: Implements colour for packages hyperref and bookmark i hyperref: Extensive support for hypertext in LaTeX i hyph-utf8: Hyphenation patterns expressed in UTF-8 i hyphen-base: core hyphenation support files i hyphenex: US English hyphenation exceptions file i ifplatform: Conditionals to test which platform is being used i iftex: Am I running under pdfTeX, XeTeX or LuaTeX? i inconsolata: A monospaced font, with support files for use with TeX i index: Extended index for LaTeX including multiple indexes i infwarerr: Complete set of information/warning/error message macros i intcalc: Expandable arithmetic operations with integers i jknapltx: Miscellaneous packages by Joerg Knappen i knuth-lib: A small library of Metafont sources i knuth-local: Knuth's local information i koma-script: A bundle of versatile classes and packages i kpathsea: Path searching library for TeX-related files i kpathsea.x86_64-linux: x86_64-linux files of kpathsea i kvdefinekeys: Define keys for use in the kvsetkeys package i kvoptions: Key value format for package options i kvsetkeys: Key value parser with default handler support i l3backend: LaTeX3 backend drivers i l3experimental: Experimental LaTeX3 concepts i l3kernel: LaTeX3 programming conventions i l3packages: High-level LaTeX3 concepts i latex: A TeX macro package that defines LaTeX i latex-bin: LaTeX executables and man pages i latex-bin.x86_64-linux: x86_64-linux files of latex-bin i latex-fonts: A collection of fonts used in LaTeX distributions i latexbug: Bug-classification for LaTeX related bugs i latexconfig: configuration files for LaTeX-related formats i latexmk: Fully automated LaTeX document generation i latexmk.x86_64-linux: x86_64-linux files of latexmk i letltxmacro: Let assignment for LaTeX macros i lineno: Line numbers on paragraphs i listings: Typeset source code listings using LaTeX i lm: Latin modern fonts in outline formats i lm-math: OpenType maths fonts for Latin Modern i ltxcmds: Some LaTeX kernel commands for general use i ltxmisc: Miscellaneous LaTeX packages, etc i lua-alt-getopt: Process application arguments the same way as getopt_long i luahbtex: LuaTeX with HarfBuzz library for glyph shaping i luahbtex.x86_64-linux: x86_64-linux files of luahbtex i lualibs: Additional Lua functions for LuaTeX macro programmers i luaotfload: OpenType 'loader' for Plain TeX and LaTeX i luaotfload.x86_64-linux: x86_64-linux files of luaotfload i luatex: The LuaTeX engine i luatex.x86_64-linux: x86_64-linux files of luatex i lwarp: Converts LaTeX to HTML i lwarp.x86_64-linux: x86_64-linux files of lwarp i makecmds: The new \makecommand command always (re)defines a command i makeindex: Makeindex development sources i makeindex.x86_64-linux: x86_64-linux files of makeindex i mathspec: Specify arbitrary fonts for mathematics in XeTeX i mathtools: Mathematical tools to use with amsmath i mdwtools: Miscellaneous tools by Mark Wooding i memoir: Typeset fiction, non-fiction and mathematical books i metafont: A system for specifying fonts i metafont.x86_64-linux: x86_64-linux files of metafont i metalogo: Extended TeX logo macros i mflogo: LaTeX support for Metafont logo fonts i mfnfss: Packages to typeset oldgerman and pandora fonts in LaTeX i mfware: Supporting tools for use with Metafont i mfware.x86_64-linux: x86_64-linux files of mfware i microtype: Subliminal refinements towards typographical perfection i modes: A collection of Metafont mode_def's i mptopdf: mpost to PDF, native MetaPost graphics inclusion i mptopdf.x86_64-linux: x86_64-linux files of mptopdf i ms: Various LaTeX packages by Martin Schroder i multirow: Create tabular cells spanning multiple rows i natbib: Flexible bibliography support i newfloat: Define new floating environments i ntgclass: "European" versions of standard classes i oberdiek: A bundle of packages submitted by Heiko Oberdiek i pagesel: Select pages of a document for output i parskip: Layout with zero \parindent, non-zero \parskip i pdfescape: Implements pdfTeX's escape features using TeX or e-TeX i pdflscape: Make landscape pages display as landscape i pdfpages: Include PDF documents in LaTeX i pdftex: A TeX extension for direct creation of PDF i pdftex.x86_64-linux: x86_64-linux files of pdftex i pdftexcmds: LuaTeX support for pdfTeX utility functions i pgf: Create PostScript and PDF graphics in TeX i physics: Macros supporting the Mathematics of Physics i plain: The Plain TeX format i polyglossia: An alternative to babel for XeLaTeX and LuaLaTeX i preview: Extract bits of a LaTeX source for output i psfrag: Replace strings in encapsulated PostScript figures i pslatex: Use PostScript fonts by default i psnfss: Font support for common PostScript fonts i pspicture: PostScript picture support i ragged2e: Alternative versions of "ragged"-type commands i rcs: Use RCS (revision control system) tags in LaTeX documents i refcount: Counter operations with label references i relsize: Set the font size relative to the current font size i rerunfilecheck: Checksum based rerun checks on auxiliary files i rsfs: Ralph Smith's Formal Script font i sansmath: Maths in a sans font i scheme-infraonly: infrastructure-only scheme (no TeX at all) i section: Modifying section commands in LaTeX i seminar: Make overhead slides i sepnum: Print numbers in a "friendly" format i setspace: Set space between lines i standalone: Compile TeX pictures stand-alone or as part of a document i stringenc: Converting a string between different encodings i subfig: Figures broken into subfigures i symbol: URW "Base 35" font pack for LaTeX i tex: A sophisticated typesetting engine i tex-ini-files: Model TeX format creation files i tex.x86_64-linux: x86_64-linux files of tex i texlive-common: TeX Live documentation (common elements) i texlive-docindex: top-level TeX Live doc.html, etc. i texlive-en: TeX Live manual (English) i texlive-msg-translations: translations of the TeX Live installer and TeX Live Manager i texlive-scripts: TeX Live infrastructure programs i texlive-scripts.x86_64-linux: x86_64-linux files of texlive-scripts i texlive.infra: basic TeX Live infrastructure i texlive.infra.x86_64-linux: x86_64-linux files of texlive.infra i textcase: Case conversion ignoring mathematics, etc i threeparttable: Tables with captions and notes all the same width i threeparttablex: Notes in longtables i thumbpdf: Thumbnails for pdfTeX and dvips/ps2pdf i thumbpdf.x86_64-linux: x86_64-linux files of thumbpdf i times: URW "Base 35" font pack for LaTeX i tipa: Fonts and macros for IPA phonetics characters i tlshell: GUI frontend (tcl/tk-based) for tlmgr i tlshell.x86_64-linux: x86_64-linux files of tlshell i tools: The LaTeX standard tools bundle i translator: Easy translation of strings in LaTeX i trimspaces: Trim spaces around an argument or within a macro i typehtml: Typeset HTML directly from LaTeX i ucharcat: Implementation of the (new in 2015) XeTeX \Ucharcat command in lua, for LuaTeX i underscore: Control the behaviour of "_" in text i unicode-data: Unicode data and loaders for TeX i unicode-math: Unicode mathematics support for XeTeX and LuaTeX i uniquecounter: Provides unlimited unique counter i upquote: Show "realistic" quotes in verbatim i url: Verbatim with URL-sensitive line breaks i was: A collection of small packages by Walter Schmidt i wasy: The wasy fonts (Waldi symbol fonts) i wasysym: LaTeX support for the wasy fonts i xcolor: Driver-independent color extensions for LaTeX and pdfLaTeX i xdvi: A DVI previewer for the X Window System i xdvi.x86_64-linux: x86_64-linux files of xdvi i xetex: An extended variant of TeX for use with Unicode sources i xetex.x86_64-linux: x86_64-linux files of xetex i xetexconfig: crop.cfg for XeLaTeX i xkeyval: Extension of the keyval package i xltxtra: "Extras" for LaTeX users of XeTeX i xunicode: Generate Unicode characters from accented glyphs i zapfding: URW "Base 35" font pack for LaTeX ```FFMPEG
Output of `ffmpeg -version`: ``` ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 ```Additional comments