ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
26.26k stars 1.8k forks source link

Bug when adding a tip to an arc #3448

Closed SandwichGouda closed 1 year ago

SandwichGouda commented 1 year ago

Description of bug / unexpected behavior

When adding a tip to an arc, the latter get its center and radius changed.

Expected behavior

This is obviously a problem, since no one expects "adding a tip" to an arc to change its center position and radius. Adding a tip should simply add the tip without changing the size and position of the mobject. It is likely that the issues also applies to other Mobject types, such as CurvedArrow, DoubleCurvedArrow, etc.

How to reproduce the issue

Code for reproducing the problem ```py class arrArc(Scene): def construct(self): Arr = Arc( radius=2.0, start_angle=0, angle=95*PI/100*2, arc_center=np.array([0., 0., 0.]) ) Arr2 = Arr.copy().set_color(YELLOW).add_tip() self.add(Arr, Arr2) ```

Additional media files

Images/GIFs ![image](https://github.com/ManimCommunity/manim/assets/150556478/72f57cb8-2bd7-4b9a-ad13-e54f79742b2e)

Logs

Terminal output ``` PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR Nothing interesting to paste. The logs are normal, Manim renders normally. ```

System specifications

System Details - OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): - RAM: 4GB - Python version (`python/py/python3 --version`): 3.11 - Installed modules (provide output from `pip list`): - ``` attrs 23.1.0 beautifulsoup4 4.12.2 blis 0.7.9 Brotli 1.1.0 bs4 0.0.1 catalogue 2.0.8 certifi 2023.5.7 cffi 1.16.0 charset-normalizer 3.1.0 click 8.1.3 click-default-group 1.2.2 cloup 0.13.1 colorama 0.4.6 colour 0.1.5 confection 0.0.4 contourpy 1.0.7 coverage 5.5 cycler 0.11.0 cymem 2.0.7 decorator 5.1.1 deprecation 2.1.0 eyed3 0.9.7 ffmpeg 1.4 filetype 1.2.0 fonttools 4.39.4 glcontext 2.3.7 h11 0.14.0 idna 3.4 instaloader 4.9.6 isosurfaces 0.1.0 Jinja2 3.1.2 kiwisolver 1.4.4 langcodes 3.3.0 lxml 4.9.3 manim 0.18.0 ManimPango 0.5.0 mapbox-earcut 1.0.1 markdown-it-py 2.2.0 MarkupSafe 2.1.3 matplotlib 3.7.1 mdurl 0.1.2 moderngl 5.8.2 moderngl-window 2.4.4 mpmath 1.3.0 multipledispatch 0.6.0 murmurhash 1.0.9 mutagen 1.47.0 networkx 2.8.8 numpy 1.24.3 opencv-python 4.7.0.72 outcome 1.2.0 packaging 23.1 pathy 0.10.1 Pillow 9.5.0 pip 23.3.1 preshed 3.0.8 progressbar 2.5 pycairo 1.23.0 pycparser 2.21 pycryptodomex 3.19.0 pydantic 1.10.9 pydub 0.25.1 pygame 2.5.2 pyglet 2.0.7 Pygments 2.15.1 pyparsing 3.0.9 pypdf 3.9.1 pyrr 0.10.3 PySocks 1.7.1 python-dateutil 2.8.2 requests 2.31.0 rich 13.3.5 scipy 1.10.1 screeninfo 0.8.1 selenium 4.13.0 setuptools 65.5.0 simpy 4.0.1 six 1.16.0 skia-pathops 0.7.4 smart-open 6.3.0 sniffio 1.3.0 sortedcontainers 2.4.0 soupsieve 2.5 spacy 3.5.3 spacy-legacy 3.0.12 spacy-loggers 1.0.4 srsly 2.4.6 srt 3.5.3 svgelements 1.9.5 sympy 1.12 thinc 8.1.10 toml 0.10.2 tqdm 4.65.0 trio 0.22.2 trio-websocket 0.11.1 typer 0.7.0 typing_extensions 4.8.0 urllib3 2.0.2 wasabi 1.1.2 watchdog 2.3.1 websockets 11.0.3 wsproto 1.2.0 youtube-dl 2021.12.17 yt-dlp 2023.9.24 ```
LaTeX details + LaTeX distribution (e.g. TeX Live 2020): MiXTeX + Installed LaTeX packages: This bug has nothing to do with LaTeX
FFMPEG Output of `ffmpeg -version`: ``` ffmpeg version 2023-05-29-git-45fa85a777-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.0 (Rev10, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband libavutil 58. 12.100 / 58. 12.100 libavcodec 60. 15.100 / 60. 15.100 libavformat 60. 5.100 / 60. 5.100 libavdevice 60. 2.100 / 60. 2.100 libavfilter 9. 8.101 / 9. 8.101 libswscale 7. 3.100 / 7. 3.100 libswresample 4. 11.100 / 4. 11.100 libpostproc 57. 2.100 / 57. 2.100```

Additional comments

behackl commented 1 year ago

I think this is a duplicate of #3099, closing this in favor of the older issue with a bit more debugging info. Thanks for the report!