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
I'm trying to change how the timing of a graph's edges and vertices are created so that graphs with many edges have an equal amount of time spend created edges and vertices. When I create the edges in an AnimationGroup, nothing is shown on the screen but the edges then all appear at once after the animation is over.
Expected behavior
The edges should appear one at a time, just like the vertices.
How to reproduce the issue
Code for reproducing the problem
frommanimimport*classTestScene(Scene):
defconstruct(self):
graph=Graph(
vertices=[1, 2, 3, 4, 5],
edges=[
(1, 2),
(1, 3),
(1, 4),
(1, 5),
(2, 3),
(2, 4),
(2, 5),
(3, 4),
(3, 5),
(4, 5),
],
vertex_type=Circle,
vertex_config={"radius": 0.25},
)
# default behavior; edges are created one at a timeself.play(Create(graph), run_time=4)
self.clear()
# manually created the vertices, works as expectedself.play(
AnimationGroup(
*(Create(vertex) forvertexingraph.vertices.values()),
lag_ratio=0.1,
),
run_time=2,
)
# manually create the edges, edges appear all at once?self.play(
AnimationGroup(
*(Create(edge) foredgeingraph.edges.values()),
lag_ratio=0.1,
),
run_time=2,
)
self.pause(3)
Additional media files
Images/GIFsTestScene.mp4
Logs
Terminal output
> manim -pqh -v DEBUG test.py TestScene
Manim Community v0.18.0
[01/18/24 18:23:59] DEBUG Hashing ... hashing.py:350
DEBUG Hashing done in 0.016427 s. hashing.py:362
DEBUG Hash generated : 3529212410_466792430_223132457 hashing.py:365
DEBUG List of the first few animation hashes of the scene: cairo_renderer.py:87
['3529212410_466792430_223132457']
Animation 0: Create(Undirected graph on 5 vertices and 10 edges): 30%|####5 | 73/240 [00:01<00:02, 56.22it/s]
(process:3544): GLib-GIO-WARNING **: 18:24:01.080: Unexpectedly, UWP app `Microsoft.ScreenSketch_11.2310.54.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.ScreenSketch_8wekyb3d8bbwe!App') supports 29 extensions but has no verbs
Animation 0: Create(Undirected graph on 5 vertices and 10 edges): 33%|####9 | 79/240 [00:01<00:02, 56.13it/s]
(process:3544): GLib-GIO-WARNING **: 18:24:01.155: Unexpectedly, UWP app `Microsoft.OutlookForWindows_1.2023.1214.201_x64__8wekyb3d8bbwe' (AUMId `Microsoft.OutlookForWindows_8wekyb3d8bbwe!Microsoft.OutlookforWindows') supports 1 extensions but has no verbs
[01/18/24 18:24:04] INFO Animation 0 : Partial movie file written in scene_file_writer.py:527
'D:\ml-visualize\media\videos\test\1080p60\partial_movie_files\Tes
tScene\3529212410_466792430_223132457.mp4'
DEBUG Hashing ... hashing.py:350
DEBUG Hashing done in 0.008106 s. hashing.py:362
DEBUG Hash generated : 3040924799_2563770218_2358810818 hashing.py:365
DEBUG List of the first few animation hashes of the scene: cairo_renderer.py:87
['3529212410_466792430_223132457', '3040924799_2563770218_2358810818']
[01/18/24 18:24:05] INFO Animation 1 : Partial movie file written in scene_file_writer.py:527
'D:\ml-visualize\media\videos\test\1080p60\partial_movie_files\Tes
tScene\3040924799_2563770218_2358810818.mp4'
DEBUG Hashing ... hashing.py:350
DEBUG Hashing done in 0.022348 s. hashing.py:362
DEBUG Hash generated : 3040924799_738277517_2459790260 hashing.py:365
DEBUG List of the first few animation hashes of the scene: cairo_renderer.py:87
['3529212410_466792430_223132457', '3040924799_2563770218_2358810818',
'3040924799_738277517_2459790260']
[01/18/24 18:24:07] INFO Animation 2 : Partial movie file written in scene_file_writer.py:527
'D:\ml-visualize\media\videos\test\1080p60\partial_movie_files\Tes
tScene\3040924799_738277517_2459790260.mp4'
DEBUG Animation with empty mobject animation.py:174
DEBUG Hashing ... hashing.py:350
DEBUG Hashing done in 0.019766 s. hashing.py:362
DEBUG Hash generated : 3040924799_2475379470_3097048898 hashing.py:365
DEBUG List of the first few animation hashes of the scene: cairo_renderer.py:87
['3529212410_466792430_223132457', '3040924799_2563770218_2358810818',
'3040924799_738277517_2459790260', '3040924799_2475379470_3097048898']
[01/18/24 18:24:09] INFO Animation 3 : Partial movie file written in scene_file_writer.py:527
'D:\ml-visualize\media\videos\test\1080p60\partial_movie_files\Tes
tScene\3040924799_2475379470_3097048898.mp4'
INFO Combining to Movie file. scene_file_writer.py:617
DEBUG Partial movie files to combine (4 files): scene_file_writer.py:561
['D:\\ml-visualize\\media\\videos\\test\\1080p60\\partial_movie_fi
les\\TestScene\\3529212410_466792430_223132457.mp4',
'D:\\ml-visualize\\media\\videos\\test\\1080p60\\partial_movie_fil
es\\TestScene\\3040924799_2563770218_2358810818.mp4',
'D:\\ml-visualize\\media\\videos\\test\\1080p60\\partial_movie_fil
es\\TestScene\\3040924799_738277517_2459790260.mp4',
'D:\\ml-visualize\\media\\videos\\test\\1080p60\\partial_movie_fil
es\\TestScene\\3040924799_2475379470_3097048898.mp4']
INFO scene_file_writer.py:735
File ready at
'D:\ml-visualize\media\videos\test\1080p60\TestScene.mp4'
INFO Rendered TestScene scene.py:241
Played 4 animations
INFO Previewed File at: file_ops.py:227
'D:\ml-visualize\media\videos\test\1080p60\TestScene.mp4'
The graph classes (GenericGraph, Graph, and DiGraph) all set the z_index of the edges to be -1 on creation. Removing this seems to fix the issue, but I don't know why they are there and the full effects of removing them.
Description of bug / unexpected behavior
I'm trying to change how the timing of a graph's edges and vertices are created so that graphs with many edges have an equal amount of time spend created edges and vertices. When I create the edges in an
AnimationGroup
, nothing is shown on the screen but the edges then all appear at once after the animation is over.Expected behavior
The edges should appear one at a time, just like the vertices.
How to reproduce the issue
Code for reproducing the problem
Additional media files
Images/GIFs
TestScene.mp4
Logs
Terminal output
System specifications
System Details
pip list
):FFMPEG
Output of
ffmpeg -version
:Additional comments
The graph classes (
GenericGraph
,Graph
, andDiGraph
) all set thez_index
of the edges to be-1
on creation. Removing this seems to fix the issue, but I don't know why they are there and the full effects of removing them.manim/manim/mobject/graph.py
Line 775 in 68bd790
manim/manim/mobject/graph.py
Line 1277 in 68bd790
manim/manim/mobject/graph.py
Line 1479 in 68bd790
The text was updated successfully, but these errors were encountered: