You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Transforming a Graph into another graph with a different number of edges, the resulting animated graph has the same number of edges as the original graph.
For example, when transforming the graph Graph(["A", "B", "C"], [("A", "B"), ("A", "C")]) to Graph(["A", "B", "C"], [("A", "B"), ("A", "C"), ("B", "C")]), the resulting graph should be a triangle, but one edge is dropped.
Expected behavior
The graph that is the result of a transformation has the number of edges that is specified in the code, not the number of edges the predecessor had.
How to reproduce the issue
Code for reproducing the problem
frommanimimport*classBugDemo(Scene):
defconstruct(self):
# Create a graph with two edgesgraph1=Graph(["A", "B", "C"], [("A", "B"), ("A", "C")])
# Create another graph with three edgesgraph2=Graph(["A", "B", "C"], [("A", "B"), ("A", "C"), ("B", "C")])
# Display the first graphself.play(Create(graph1))
self.wait(1)
# Attempt to transform graph1 into graph2self.play(Transform(graph1, graph2))
self.wait(1)
Additional media files
Images/GIFsBugDemo.mp4
Logs
Terminal output
Manim Community v0.18.1
[10/05/24 20:26:24] DEBUG Hashing ... hashing.py:352
DEBUG Hashing done in 0.006551 s. hashing.py:364
DEBUG Hash generated : 1185818338_2661024192_223132457 hashing.py:367
DEBUG List of the first few animation hashes of the scene: ['1185818338_2661024192_223132457'] cairo_renderer.py:97
INFO Animation 0 : Partial movie file written in scene_file_writer.py:527
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/1185818338_2661024192_223132457.mp4'
DEBUG Animation with empty mobject animation.py:175
DEBUG Hashing ... hashing.py:352
DEBUG Hashing done in 0.005637 s. hashing.py:364
DEBUG Hash generated : 624642324_3890345977_2618601865 hashing.py:367
DEBUG List of the first few animation hashes of the scene: ['1185818338_2661024192_223132457', cairo_renderer.py:97
'624642324_3890345977_2618601865']
[10/05/24 20:26:25] INFO Animation 1 : Partial movie file written in scene_file_writer.py:527
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_3890345977_2618601865.mp4'
DEBUG Hashing ... hashing.py:352
DEBUG Hashing done in 0.011324 s. hashing.py:364
DEBUG Hash generated : 624642324_2810248401_2118276392 hashing.py:367
DEBUG List of the first few animation hashes of the scene: ['1185818338_2661024192_223132457', cairo_renderer.py:97
'624642324_3890345977_2618601865', '624642324_2810248401_2118276392']
INFO Animation 2 : Partial movie file written in scene_file_writer.py:527
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_2810248401_2118276392.mp4'
DEBUG Animation with empty mobject animation.py:175
DEBUG Hashing ... hashing.py:352
DEBUG Hashing done in 0.006592 s. hashing.py:364
DEBUG Hash generated : 624642324_3890345977_3537993160 hashing.py:367
DEBUG List of the first few animation hashes of the scene: ['1185818338_2661024192_223132457', cairo_renderer.py:97
'624642324_3890345977_2618601865', '624642324_2810248401_2118276392',
'624642324_3890345977_3537993160']
INFO Animation 3 : Partial movie file written in scene_file_writer.py:527
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_3890345977_3537993160.mp4'
INFO Combining to Movie file. scene_file_writer.py:617
DEBUG Partial movie files to combine (4 files): scene_file_writer.py:561
['/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDem
o/1185818338_2661024192_223132457.mp4',
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_3890345977_2618601865.mp4',
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_2810248401_2118276392.mp4',
'/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/partial_movie_files/BugDemo
/624642324_3890345977_3537993160.mp4']
INFO scene_file_writer.py:737
File ready at '/home/niplav/proj/site/anim/turning/media/videos/bug/480p15/BugDemo.mp4'
INFO Rendered BugDemo scene.py:247
Played 4 animations
System specifications
System Details
OS Void Linux:
› uname -a (manim)
Linux REDACTED 6.6.52_1 #1 SMP PREEMPT_DYNAMIC Sat Sep 21 15:47:36 UTC 2024 x86_64 GNU/Linux
› cat /etc/os-release (manim)
NAME="Void"
ID="void"
PRETTY_NAME="Void Linux"
HOME_URL="https://voidlinux.org/"
DOCUMENTATION_URL="https://docs.voidlinux.org/"
LOGO="void-logo"
ANSI_COLOR="0;38;2;71;128;97"
DISTRIB_ID="void"
After self.play(Transform(graph1, graph2)) you see graph1 left on the screen with 4 dots dots and 2 lines as submobjects. It's rather strange to see. Just print graph1.submobjects out.
Using ReplacementTransform results in graph2 left on the screen with all vertices and edges as expected.
Description of bug / unexpected behavior
When
Transform
ing aGraph
into another graph with a different number of edges, the resulting animated graph has the same number of edges as the original graph.For example, when transforming the graph
Graph(["A", "B", "C"], [("A", "B"), ("A", "C")])
toGraph(["A", "B", "C"], [("A", "B"), ("A", "C"), ("B", "C")])
, the resulting graph should be a triangle, but one edge is dropped.Expected behavior
The graph that is the result of a transformation has the number of edges that is specified in the code, not the number of edges the predecessor had.
How to reproduce the issue
Code for reproducing the problem
Additional media files
Images/GIFs
BugDemo.mp4
Logs
Terminal output
System specifications
System Details
python/py/python3 --version
):pip list
):Additional comments
The text was updated successfully, but these errors were encountered: