Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TracedPath disappears when adding other objects #3977

Open
nhabedi opened this issue Oct 25, 2024 · 1 comment
Open

TracedPath disappears when adding other objects #3977

nhabedi opened this issue Oct 25, 2024 · 1 comment

Comments

@nhabedi
Copy link

nhabedi commented Oct 25, 2024

Description of bug / unexpected behavior

TracedPath mobjects disappear as soon as other objects are added to the scene.

Expected behavior

I would have expected that they stay visible like other objects (for example like the circle in the example code).

How to reproduce the issue

With the code below, the path is visible at the end. However, if you add the line that is commented out, the traced path will vanish.

Code for reproducing the problem
from manim import *

r = 1.5

class Test(Scene):
  def construct(self):
    c = Circle(radius = r).shift(-r*PI*RIGHT)
    dot_pt = lambda t: c.point_at_angle(3*PI/2-2*t*PI)
    d = Dot(dot_pt(0))
    traced = TracedPath(d.get_center)
    e = Dot(ORIGIN)

    self.add(c,d,traced)
    self.play(
      c.animate.shift(2*r*PI*RIGHT),
      UpdateFromAlphaFunc(d,lambda mo,t: mo.move_to(dot_pt(t))),
      run_time=5
    )
    #self.add(e)
    self.wait()

System specifications

System Details
  • OS: Windows 10 Pro 22H2 19045.5011
  • RAM: 16 GB
  • Python version: 3.12.7
  • Installed modules:
Package                  Version
------------------------ -----------
annotated-types          0.7.0
asttokens                2.4.1
av                       13.1.0
beautifulsoup4           4.12.3
cachetools               5.5.0
certifi                  2024.8.30
charset-normalizer       3.4.0
click                    8.1.7
click-default-group      1.2.4
cloup                    3.0.5
colorama                 0.4.6
colour                   0.1.5
contourpy                1.3.0
cycler                   0.12.1
decorator                5.1.1
distlib                  0.3.9
executing                2.1.0
filelock                 3.16.1
fonttools                4.54.1
glcontext                3.0.0
google-api-core          2.21.0
google-api-python-client 2.149.0
google-auth              2.35.0
google-auth-httplib2     0.2.0
googleapis-common-protos 1.65.0
httplib2                 0.22.0
idna                     3.10
ipython                  8.28.0
isosurfaces              0.1.2
jedi                     0.19.1
Jinja2                   3.1.4
kiwisolver               1.4.7
lxml                     5.3.0
manim                    0.18.1
manim-slides             5.1.8
ManimPango               0.6.0
mapbox_earcut            1.0.2
markdown-it-py           3.0.0
MarkupSafe               3.0.1
matplotlib               3.9.2
matplotlib-inline        0.1.7
mdurl                    0.1.2
moderngl                 5.11.1
moderngl-window          2.4.6
mpmath                   1.3.0
multipledispatch         1.0.0
networkx                 3.4.1
numpy                    1.26.4
oauth2client             4.1.3
packaging                24.1
parso                    0.8.4
pillow                   10.4.0
pip                      24.2
platformdirs             4.3.6
prompt_toolkit           3.0.48
proto-plus               1.24.0
protobuf                 5.28.2
pure_eval                0.2.3
pyasn1                   0.6.1
pyasn1_modules           0.4.1
pycairo                  1.27.0
pydantic                 2.9.2
pydantic_core            2.23.4
pydantic-extra-types     2.9.0
pydub                    0.25.1
pyglet                   2.0.18
Pygments                 2.18.0
PyOpenGL                 3.1.7
pyparsing                3.2.0
pyperclip                1.9.0
pyrr                     0.10.3
PySide6                  6.8.0
PySide6_Addons           6.8.0
PySide6_Essentials       6.8.0
python-dateutil          2.9.0.post0
python-pptx              1.0.2
PyYAML                   6.0.2
QtPy                     2.4.1
requests                 2.32.3
rich                     13.9.2
rsa                      4.9
rtoml                    0.11.0
scipy                    1.14.1
screeninfo               0.8.1
setuptools               75.1.0
shiboken6                6.8.0
six                      1.16.0
skia-pathops             0.8.0.post1
soupsieve                2.6
srt                      3.5.3
stack-data               0.6.3
svgelements              1.9.6
sympy                    1.13.3
tqdm                     4.66.5
traitlets                5.14.3
typing_extensions        4.12.2
uritemplate              4.1.1
urllib3                  2.2.3
validators               0.34.0
virtualenv               20.26.6
watchdog                 5.0.3
wcwidth                  0.2.13
XlsxWriter               3.2.0
@nhabedi nhabedi changed the title TracePath disappears when adding other objects TracedPath disappears when adding other objects Oct 25, 2024
@OliverStrait
Copy link

This is mobject caching issue.
You can bypass the issue with this:

from manim import *
config.disable_caching = True
class Test(Scene):
       ....

Details:

  • First render is a normal and output is ok. Two partial files is produced.
  • Second render will produce 3rd partial file in which Traced path is not rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants