Skip to content

MovingCamera rotation squishes objects instead of rotating #3373

@meawplex-plus

Description

@meawplex-plus

Description of bug / unexpected behavior

When I apply the animation self.camera.frame.animate.rotate(PI/2) to the scene and compile the animation with manim scene.py -pqh myScene, all mobjects (I used a single Square mobject with default properties) are squished instead of rotated.

Expected behavior

I expected the camera to rotate by PI/2 radians (90 degrees) without squishing.

How to reproduce the issue

Code for reproducing the problem Add to scene.py:
class CameraIssue(MovingCameraScene):
    def construct(self):
        self.add(Square())
        self.play(self.camera.frame.animate.rotate(PI/2))

Compile with manim scene.py -pqh CameraIssue.

Additional media files

Images/GIFs
CameraIssue.mp4

Logs

Terminal output
Manim Community v0.17.3

[09/20/23 15:53:42] DEBUG    Hashing ...                                             hashing.py:350
                    DEBUG    Hashing done in 0.003948 s.                             hashing.py:362
                    DEBUG    Hash generated :  1433715038_3210132319_2428177325      hashing.py:365
                    DEBUG    List of the first few animation hashes of the     cairo_renderer.py:87
                             scene: ['1433715038_3210132319_2428177325']
[09/20/23 15:53:43] INFO     Animation 0 : Partial movie file written in   scene_file_writer.py:527
                             '/my/path/media/videos/scene/1080p60/partial_movie_fi
                             les/CameraIssue/1433715038_3210132319_2428177
                             325.mp4'
                    INFO     Combining to Movie file.                      scene_file_writer.py:617
                    DEBUG    Partial movie files to combine (1 files):     scene_file_writer.py:561
                             ['/my/path/media/videos/scene/1080p60/partial_movie_f
                             iles/CameraIssue/1433715038_3210132319_242817
                             7325.mp4']
                    INFO                                                   scene_file_writer.py:736
                             File ready at
                             '/my/path/media/videos/scene/1080p60/CameraIssue.mp4'

                    INFO     Rendered CameraIssue                                      scene.py:241
                             Played 1 animations
                    INFO     Previewed File at:                                     file_ops.py:227
                             '/my/path/media/v
                             ideos/scene/1080p60/CameraIssue.mp4'

System specifications

System Details
  • OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): macOS 13.4 (Ventura)
  • RAM: 16GB
  • Python version (python/py/python3 --version): 3.11.4
  • Installed modules (provide output from pip list):
Package                Version
---------------------- ---------
certifi                2022.9.24
chardet                3.0.4
charset-normalizer     3.2.0
click                  8.1.7
click-default-group    1.2.4
cloup                  0.13.1
colour                 0.1.5
Cython                 3.0.2
decorator              5.1.1
glcontext              2.4.0
googletrans            3.0.0
h11                    0.9.0
h2                     3.2.0
hpack                  3.0.0
hstspreload            2022.12.1
httpcore               0.9.1
httpx                  0.13.3
hyperframe             5.2.0
idna                   2.10
isosurfaces            0.1.0
manim                  0.17.3
ManimPango             0.4.3
mapbox-earcut          1.0.1
markdown-it-py         3.0.0
mdurl                  0.1.2
moderngl               5.8.2
moderngl-window        2.4.4
multipledispatch       1.0.0
networkx               2.8.8
numpy                  1.25.2
Pillow                 9.5.0
pip                    23.2.1
pycairo                1.24.0
pydub                  0.25.1
pygame                 2.5.1
pyglet                 2.0.9
Pygments               2.16.1
pyobjc-core            9.2
pyobjc-framework-Cocoa 9.2
pyrr                   0.10.3
requests               2.31.0
rfc3986                1.5.0
rich                   13.5.2
scipy                  1.11.2
screeninfo             0.8.1
setuptools             65.5.0
skia-pathops           0.7.4
sniffio                1.3.0
srt                    3.5.3
svgelements            1.9.6
tqdm                   4.66.1
urllib3                2.0.4
watchdog               2.3.1
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020): MacTeX
  • Installed LaTeX packages: Irrelevant; did not use LaTeX
FFMPEG

Output of ffmpeg -version:

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100

Additional comments

I have found that this issue persists without -qh in the command line arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:bugSomething isn't working... For use in issues

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions