{"id": "autoresearch-manim_000001", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "SineWavePlot", "scene_base": "Scene", "num_animations": 3, "num_lines": 16, "has_reasoning": false, "prompt": "Create a Manim scene that introduces a coordinate system and plots y = sin(x) from -PI to PI. Add a title and label the curve.", "code": "from manim import *\n\nclass SineWavePlot(Scene):\n def construct(self):\n title = Text(\"Sine Wave\", font_size=42).to_edge(UP)\n axes = Axes(\n x_range=[-PI, PI, PI / 2],\n y_range=[-1.5, 1.5, 0.5],\n x_length=8,\n y_length=4.5,\n axis_config={\"include_numbers\": True},\n )\n graph = axes.plot(lambda x: np.sin(x), color=BLUE)\n label = MathTex(\"y = \\\\sin(x)\").set_color(BLUE).next_to(axes, RIGHT)\n\n self.play(FadeIn(title), Create(axes))\n self.play(Create(graph), FadeIn(label))\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a Manim scene that introduces a coordinate system and plots y = sin(x) from -PI to PI. Add a title and label the curve."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SineWavePlot(Scene):\n def construct(self):\n title = Text(\"Sine Wave\", font_size=42).to_edge(UP)\n axes = Axes(\n x_range=[-PI, PI, PI / 2],\n y_range=[-1.5, 1.5, 0.5],\n x_length=8,\n y_length=4.5,\n axis_config={\"include_numbers\": True},\n )\n graph = axes.plot(lambda x: np.sin(x), color=BLUE)\n label = MathTex(\"y = \\\\sin(x)\").set_color(BLUE).next_to(axes, RIGHT)\n\n self.play(FadeIn(title), Create(axes))\n self.play(Create(graph), FadeIn(label))\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000006", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "SquareToCircle", "scene_base": "Scene", "num_animations": 3, "num_lines": 10, "has_reasoning": false, "prompt": "Create a basic Manim scene that first draws a rotated square and then transforms it into a filled circle.", "code": "from manim import *\n\nclass SquareToCircle(Scene):\n def construct(self):\n circle = Circle() # create a circle\n circle.set_fill(PINK, opacity=0.5) # set color and transparency\n\n square = Square() # create a square\n square.rotate(PI / 4) # rotate a certain amount\n\n self.play(Create(square)) # animate the creation of the square\n self.play(Transform(square, circle)) # interpolate the square into the circle\n self.play(FadeOut(square)) # fade out animation", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a basic Manim scene that first draws a rotated square and then transforms it into a filled circle."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SquareToCircle(Scene):\n def construct(self):\n circle = Circle() # create a circle\n circle.set_fill(PINK, opacity=0.5) # set color and transparency\n\n square = Square() # create a square\n square.rotate(PI / 4) # rotate a certain amount\n\n self.play(Create(square)) # animate the creation of the square\n self.play(Transform(square, circle)) # interpolate the square into the circle\n self.play(FadeOut(square)) # fade out animation\n```"}]}
{"id": "autoresearch-manim_000011", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ExampleRotation", "scene_base": "Scene", "num_animations": 1, "num_lines": 12, "has_reasoning": false, "prompt": "Create a short Manim scene that compares two transforms and uses numpy point rolling to align one square before morphing it into a circle.", "code": "from manim import *\n\nclass ExampleRotation(Scene):\n def construct(self):\n self.camera.background_color = WHITE\n m1a = Square().set_color(RED).shift(LEFT)\n m1b = Circle().set_color(RED).shift(LEFT)\n m2a = Square().set_color(BLUE).shift(RIGHT)\n m2b = Circle().set_color(BLUE).shift(RIGHT)\n\n points = m2a.points\n points = np.roll(points, int(len(points)/4), axis=0)\n m2a.points = points\n\n self.play(Transform(m1a,m1b),Transform(m2a,m2b), run_time=1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a short Manim scene that compares two transforms and uses numpy point rolling to align one square before morphing it into a circle."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExampleRotation(Scene):\n def construct(self):\n self.camera.background_color = WHITE\n m1a = Square().set_color(RED).shift(LEFT)\n m1b = Circle().set_color(RED).shift(LEFT)\n m2a = Square().set_color(BLUE).shift(RIGHT)\n m2b = Circle().set_color(BLUE).shift(RIGHT)\n\n points = m2a.points\n points = np.roll(points, int(len(points)/4), axis=0)\n m2a.points = points\n\n self.play(Transform(m1a,m1b),Transform(m2a,m2b), run_time=1)\n```"}]}
{"id": "autoresearch-manim_000016", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "FeedForwardSignalFlow", "scene_base": "Scene", "num_animations": 8, "num_lines": 35, "has_reasoning": false, "prompt": "Create a 10-second Manim scene that explains a small feed-forward neural network with three layers. Show nodes, connecting edges, and animate an activation pulse moving from the input layer to the output layer.", "code": "from manim import *\n\nclass FeedForwardSignalFlow(Scene):\n def construct(self):\n title = Text(\"Feed-Forward Network\", font_size=36).to_edge(UP)\n layer_x = [-4, 0, 4]\n layer_sizes = [3, 4, 2]\n colors = [BLUE_E, TEAL_E, GREEN_E]\n layers = VGroup()\n for x_pos, size, color in zip(layer_x, layer_sizes, colors):\n dots = VGroup(*[\n Circle(radius=0.25, stroke_color=color, fill_color=color, fill_opacity=0.15)\n for _ in range(size)\n ]).arrange(DOWN, buff=0.55).move_to(np.array([x_pos, 0, 0]))\n layers.add(dots)\n edges = VGroup()\n for left_layer, right_layer in zip(layers[:-1], layers[1:]):\n for left_node in left_layer:\n for right_node in right_layer:\n edges.add(Line(left_node.get_right(), right_node.get_left(), stroke_width=2, color=GRAY_B))\n labels = VGroup(\n Text(\"Input\", font_size=24).next_to(layers[0], DOWN),\n Text(\"Hidden\", font_size=24).next_to(layers[1], DOWN),\n Text(\"Output\", font_size=24).next_to(layers[2], DOWN),\n )\n pulse_color = YELLOW\n pulses = VGroup(*[\n layer.copy().set_stroke(pulse_color, width=4).set_fill(pulse_color, opacity=0.25)\n for layer in layers\n ])\n self.play(FadeIn(title), LaggedStart(*[FadeIn(layer) for layer in layers], lag_ratio=0.2), Create(edges), FadeIn(labels), run_time=3)\n self.play(LaggedStart(*[Indicate(layer, color=pulse_color, scale_factor=1.05) for layer in layers], lag_ratio=0.45), run_time=4)\n self.play(FadeIn(pulses[0], scale=1.05), run_time=0.6)\n self.play(ReplacementTransform(pulses[0], pulses[1]), run_time=0.8)\n self.play(ReplacementTransform(pulses[1], pulses[2]), run_time=0.8)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene that explains a small feed-forward neural network with three layers. Show nodes, connecting edges, and animate an activation pulse moving from the input layer to the output layer."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass FeedForwardSignalFlow(Scene):\n def construct(self):\n title = Text(\"Feed-Forward Network\", font_size=36).to_edge(UP)\n layer_x = [-4, 0, 4]\n layer_sizes = [3, 4, 2]\n colors = [BLUE_E, TEAL_E, GREEN_E]\n layers = VGroup()\n for x_pos, size, color in zip(layer_x, layer_sizes, colors):\n dots = VGroup(*[\n Circle(radius=0.25, stroke_color=color, fill_color=color, fill_opacity=0.15)\n for _ in range(size)\n ]).arrange(DOWN, buff=0.55).move_to(np.array([x_pos, 0, 0]))\n layers.add(dots)\n edges = VGroup()\n for left_layer, right_layer in zip(layers[:-1], layers[1:]):\n for left_node in left_layer:\n for right_node in right_layer:\n edges.add(Line(left_node.get_right(), right_node.get_left(), stroke_width=2, color=GRAY_B))\n labels = VGroup(\n Text(\"Input\", font_size=24).next_to(layers[0], DOWN),\n Text(\"Hidden\", font_size=24).next_to(layers[1], DOWN),\n Text(\"Output\", font_size=24).next_to(layers[2], DOWN),\n )\n pulse_color = YELLOW\n pulses = VGroup(*[\n layer.copy().set_stroke(pulse_color, width=4).set_fill(pulse_color, opacity=0.25)\n for layer in layers\n ])\n self.play(FadeIn(title), LaggedStart(*[FadeIn(layer) for layer in layers], lag_ratio=0.2), Create(edges), FadeIn(labels), run_time=3)\n self.play(LaggedStart(*[Indicate(layer, color=pulse_color, scale_factor=1.05) for layer in layers], lag_ratio=0.45), run_time=4)\n self.play(FadeIn(pulses[0], scale=1.05), run_time=0.6)\n self.play(ReplacementTransform(pulses[0], pulses[1]), run_time=0.8)\n self.play(ReplacementTransform(pulses[1], pulses[2]), run_time=0.8)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000021", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ActivationComparisonPanel", "scene_base": "Scene", "num_animations": 5, "num_lines": 28, "has_reasoning": false, "prompt": "Create a 10-second Manim scene that compares three activation functions: ReLU, sigmoid, and tanh. Show them on separate miniature axes with labels and a short caption about nonlinearity.", "code": "from manim import *\n\nclass ActivationComparisonPanel(Scene):\n def construct(self):\n title = Text(\"Activation Functions\", font_size=36).to_edge(UP)\n axes_group = VGroup()\n specs = [\n (\"ReLU\", BLUE_D, lambda x: max(0, x)),\n (\"Sigmoid\", GREEN_D, lambda x: 1 / (1 + np.exp(-x))),\n (\"tanh\", ORANGE, lambda x: np.tanh(x)),\n ]\n for label, color, fn in specs:\n axes = Axes(\n x_range=[-3, 3, 1],\n y_range=[-1.2, 1.2, 1],\n x_length=2.9,\n y_length=2.2,\n tips=False,\n axis_config={\"stroke_width\": 2},\n )\n graph = axes.plot(fn, x_range=[-3, 3], color=color)\n title_label = Text(label, font_size=22, color=color).next_to(axes, UP, buff=0.2)\n axes_group.add(VGroup(axes, graph, title_label))\n axes_group.arrange(RIGHT, buff=0.65).shift(UP * 0.2)\n caption = Text(\"Nonlinear activations shape how networks learn patterns.\", font_size=24, color=GRAY_C).to_edge(DOWN)\n self.play(FadeIn(title), LaggedStart(*[FadeIn(group[0], shift=UP * 0.2) for group in axes_group], lag_ratio=0.2), run_time=3)\n self.play(LaggedStart(*[Create(group[1]) for group in axes_group], lag_ratio=0.3), FadeIn(VGroup(*[group[2] for group in axes_group])), run_time=4)\n self.play(FadeIn(caption), run_time=2)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene that compares three activation functions: ReLU, sigmoid, and tanh. Show them on separate miniature axes with labels and a short caption about nonlinearity."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ActivationComparisonPanel(Scene):\n def construct(self):\n title = Text(\"Activation Functions\", font_size=36).to_edge(UP)\n axes_group = VGroup()\n specs = [\n (\"ReLU\", BLUE_D, lambda x: max(0, x)),\n (\"Sigmoid\", GREEN_D, lambda x: 1 / (1 + np.exp(-x))),\n (\"tanh\", ORANGE, lambda x: np.tanh(x)),\n ]\n for label, color, fn in specs:\n axes = Axes(\n x_range=[-3, 3, 1],\n y_range=[-1.2, 1.2, 1],\n x_length=2.9,\n y_length=2.2,\n tips=False,\n axis_config={\"stroke_width\": 2},\n )\n graph = axes.plot(fn, x_range=[-3, 3], color=color)\n title_label = Text(label, font_size=22, color=color).next_to(axes, UP, buff=0.2)\n axes_group.add(VGroup(axes, graph, title_label))\n axes_group.arrange(RIGHT, buff=0.65).shift(UP * 0.2)\n caption = Text(\"Nonlinear activations shape how networks learn patterns.\", font_size=24, color=GRAY_C).to_edge(DOWN)\n self.play(FadeIn(title), LaggedStart(*[FadeIn(group[0], shift=UP * 0.2) for group in axes_group], lag_ratio=0.2), run_time=3)\n self.play(LaggedStart(*[Create(group[1]) for group in axes_group], lag_ratio=0.3), FadeIn(VGroup(*[group[2] for group in axes_group])), run_time=4)\n self.play(FadeIn(caption), run_time=2)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000026", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "AtomicRadiusTrend", "scene_base": "Scene", "num_animations": 6, "num_lines": 24, "has_reasoning": false, "prompt": "Create a 20-second Manim scene that explains atomic radius trends across period 2. Show labeled circles for Li through Ne that shrink across the row and include a caption about increasing nuclear pull.", "code": "from manim import *\n\nclass AtomicRadiusTrend(Scene):\n def construct(self):\n title = Text(\"Atomic Radius Across Period 2\", font_size=34).to_edge(UP)\n symbols = [\"Li\", \"Be\", \"B\", \"C\", \"N\", \"O\", \"F\", \"Ne\"]\n radii = [0.72, 0.65, 0.58, 0.52, 0.47, 0.43, 0.39, 0.35]\n circles = VGroup()\n for symbol, radius in zip(symbols, radii):\n circle = Circle(radius=radius, color=BLUE_D, fill_color=BLUE_B, fill_opacity=0.18)\n label = Text(symbol, font_size=22).move_to(circle)\n group = VGroup(circle, label)\n circles.add(group)\n circles.arrange(RIGHT, buff=0.38).shift(UP * 0.4)\n trend_arrow = Arrow(circles[0].get_bottom() + DOWN * 0.5, circles[-1].get_bottom() + DOWN * 0.5, color=YELLOW_D, buff=0)\n trend_text = Text(\"Radius decreases\", font_size=24, color=YELLOW_D).next_to(trend_arrow, DOWN)\n caption = VGroup(\n Text(\"Across a period, effective nuclear charge increases.\", font_size=24),\n Text(\"Electrons are pulled closer to the nucleus.\", font_size=22, color=GRAY_C),\n ).arrange(DOWN, buff=0.18).to_edge(DOWN)\n self.play(FadeIn(title), LaggedStart(*[FadeIn(group) for group in circles], lag_ratio=0.12), run_time=5)\n self.play(GrowArrow(trend_arrow), FadeIn(trend_text), run_time=3)\n self.play(LaggedStart(*[Indicate(group[0], color=TEAL_A) for group in circles], lag_ratio=0.15), run_time=5)\n self.play(FadeIn(caption), run_time=3)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 20-second Manim scene that explains atomic radius trends across period 2. Show labeled circles for Li through Ne that shrink across the row and include a caption about increasing nuclear pull."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AtomicRadiusTrend(Scene):\n def construct(self):\n title = Text(\"Atomic Radius Across Period 2\", font_size=34).to_edge(UP)\n symbols = [\"Li\", \"Be\", \"B\", \"C\", \"N\", \"O\", \"F\", \"Ne\"]\n radii = [0.72, 0.65, 0.58, 0.52, 0.47, 0.43, 0.39, 0.35]\n circles = VGroup()\n for symbol, radius in zip(symbols, radii):\n circle = Circle(radius=radius, color=BLUE_D, fill_color=BLUE_B, fill_opacity=0.18)\n label = Text(symbol, font_size=22).move_to(circle)\n group = VGroup(circle, label)\n circles.add(group)\n circles.arrange(RIGHT, buff=0.38).shift(UP * 0.4)\n trend_arrow = Arrow(circles[0].get_bottom() + DOWN * 0.5, circles[-1].get_bottom() + DOWN * 0.5, color=YELLOW_D, buff=0)\n trend_text = Text(\"Radius decreases\", font_size=24, color=YELLOW_D).next_to(trend_arrow, DOWN)\n caption = VGroup(\n Text(\"Across a period, effective nuclear charge increases.\", font_size=24),\n Text(\"Electrons are pulled closer to the nucleus.\", font_size=22, color=GRAY_C),\n ).arrange(DOWN, buff=0.18).to_edge(DOWN)\n self.play(FadeIn(title), LaggedStart(*[FadeIn(group) for group in circles], lag_ratio=0.12), run_time=5)\n self.play(GrowArrow(trend_arrow), FadeIn(trend_text), run_time=3)\n self.play(LaggedStart(*[Indicate(group[0], color=TEAL_A) for group in circles], lag_ratio=0.15), run_time=5)\n self.play(FadeIn(caption), run_time=3)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000031", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "EmbeddingClusterMap", "scene_base": "Scene", "num_animations": 9, "num_lines": 30, "has_reasoning": false, "prompt": "Create a 20-second Manim scene that visualizes embeddings as three clusters on a plane. Label the clusters, show a central prototype for each, and add a caption that similar items stay close together.", "code": "from manim import *\n\nclass EmbeddingClusterMap(Scene):\n def construct(self):\n title = Text(\"Embedding Space\", font_size=36).to_edge(UP)\n plane = NumberPlane(x_range=[-5, 5, 1], y_range=[-3, 3, 1], x_length=8, y_length=4.8, background_line_style={\"stroke_opacity\": 0.2}).shift(DOWN * 0.1)\n centers = [LEFT * 2.8 + UP * 0.8, RIGHT * 0.1 + DOWN * 0.2, RIGHT * 3.0 + UP * 1.0]\n colors = [BLUE_D, GREEN_D, ORANGE]\n names = [\"animals\", \"tools\", \"cities\"]\n clusters = VGroup()\n labels = VGroup()\n prototypes = VGroup()\n offsets = [\n [LEFT * 0.4, RIGHT * 0.35 + UP * 0.22, DOWN * 0.35, LEFT * 0.15 + DOWN * 0.22],\n [LEFT * 0.28 + UP * 0.2, RIGHT * 0.33, DOWN * 0.32, RIGHT * 0.18 + UP * 0.35],\n [LEFT * 0.3, RIGHT * 0.36 + DOWN * 0.16, UP * 0.35, LEFT * 0.18 + DOWN * 0.32],\n ]\n for center, color, name, local_offsets in zip(centers, colors, names, offsets):\n dots = VGroup(*[Dot(center + offset, color=color, radius=0.07) for offset in local_offsets])\n proto = Star(color=YELLOW_D, fill_color=YELLOW_E, fill_opacity=0.8, outer_radius=0.12).move_to(center)\n label = Text(name, font_size=24, color=color).next_to(dots, UP)\n clusters.add(dots)\n prototypes.add(proto)\n labels.add(label)\n caption = Text(\"Nearby points tend to encode similar meaning or behavior.\", font_size=24, color=GRAY_C).to_edge(DOWN)\n self.play(FadeIn(title), Create(plane), run_time=3)\n self.play(LaggedStart(*[FadeIn(group) for group in clusters], lag_ratio=0.25), run_time=4)\n self.play(LaggedStart(*[FadeIn(proto) for proto in prototypes], lag_ratio=0.25), FadeIn(labels), run_time=4)\n self.play(*[Indicate(group, color=color) for group, color in zip(clusters, colors)], run_time=4)\n self.play(FadeIn(caption), run_time=3)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 20-second Manim scene that visualizes embeddings as three clusters on a plane. Label the clusters, show a central prototype for each, and add a caption that similar items stay close together."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass EmbeddingClusterMap(Scene):\n def construct(self):\n title = Text(\"Embedding Space\", font_size=36).to_edge(UP)\n plane = NumberPlane(x_range=[-5, 5, 1], y_range=[-3, 3, 1], x_length=8, y_length=4.8, background_line_style={\"stroke_opacity\": 0.2}).shift(DOWN * 0.1)\n centers = [LEFT * 2.8 + UP * 0.8, RIGHT * 0.1 + DOWN * 0.2, RIGHT * 3.0 + UP * 1.0]\n colors = [BLUE_D, GREEN_D, ORANGE]\n names = [\"animals\", \"tools\", \"cities\"]\n clusters = VGroup()\n labels = VGroup()\n prototypes = VGroup()\n offsets = [\n [LEFT * 0.4, RIGHT * 0.35 + UP * 0.22, DOWN * 0.35, LEFT * 0.15 + DOWN * 0.22],\n [LEFT * 0.28 + UP * 0.2, RIGHT * 0.33, DOWN * 0.32, RIGHT * 0.18 + UP * 0.35],\n [LEFT * 0.3, RIGHT * 0.36 + DOWN * 0.16, UP * 0.35, LEFT * 0.18 + DOWN * 0.32],\n ]\n for center, color, name, local_offsets in zip(centers, colors, names, offsets):\n dots = VGroup(*[Dot(center + offset, color=color, radius=0.07) for offset in local_offsets])\n proto = Star(color=YELLOW_D, fill_color=YELLOW_E, fill_opacity=0.8, outer_radius=0.12).move_to(center)\n label = Text(name, font_size=24, color=color).next_to(dots, UP)\n clusters.add(dots)\n prototypes.add(proto)\n labels.add(label)\n caption = Text(\"Nearby points tend to encode similar meaning or behavior.\", font_size=24, color=GRAY_C).to_edge(DOWN)\n self.play(FadeIn(title), Create(plane), run_time=3)\n self.play(LaggedStart(*[FadeIn(group) for group in clusters], lag_ratio=0.25), run_time=4)\n self.play(LaggedStart(*[FadeIn(proto) for proto in prototypes], lag_ratio=0.25), FadeIn(labels), run_time=4)\n self.play(*[Indicate(group, color=color) for group, color in zip(clusters, colors)], run_time=4)\n self.play(FadeIn(caption), run_time=3)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000036", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "SuccessionPipelineToken", "scene_base": "Scene", "num_animations": 3, "num_lines": 35, "has_reasoning": false, "prompt": "Create a 10-second Manim scene showing a token moving through three pipeline stages. Use Succession so the token moves and each stage is indicated in sequence.", "code": "from manim import *\n\nclass SuccessionPipelineToken(Scene):\n def construct(self):\n title = Text(\"Succession Plays One Animation After Another\", font_size=34).to_edge(UP)\n stages = VGroup(*[\n VGroup(\n RoundedRectangle(corner_radius=0.1, width=1.8, height=0.85, color=TEAL_D, fill_opacity=0.12),\n Text(label, font_size=22, color=TEAL_D),\n )\n for label in [\"parse\", \"plan\", \"animate\"]\n ]).arrange(RIGHT, buff=1.0).shift(UP * 0.2)\n for group in stages:\n group[1].move_to(group[0])\n token = Dot(color=YELLOW, radius=0.1).move_to(stages[0][0].get_left() + RIGHT * 0.3)\n paths = [\n Line(token.get_center(), stages[0][0].get_center()),\n Line(stages[0][0].get_center(), stages[1][0].get_center()),\n Line(stages[1][0].get_center(), stages[2][0].get_center()),\n ]\n connectors = VGroup(*[Arrow(stages[i][0].get_right(), stages[i + 1][0].get_left(), buff=0.15, color=GRAY_B) for i in range(2)])\n caption = Text(\"Succession is useful when the order itself is the story.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), FadeIn(stages), FadeIn(connectors), FadeIn(token), run_time=3)\n self.play(\n Succession(\n MoveAlongPath(token, paths[0], rate_func=linear),\n Indicate(stages[0][0], color=YELLOW_D),\n MoveAlongPath(token, paths[1], rate_func=linear),\n Indicate(stages[1][0], color=YELLOW_D),\n MoveAlongPath(token, paths[2], rate_func=linear),\n Indicate(stages[2][0], color=YELLOW_D),\n ),\n FadeIn(caption),\n run_time=5,\n )\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene showing a token moving through three pipeline stages. Use Succession so the token moves and each stage is indicated in sequence."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SuccessionPipelineToken(Scene):\n def construct(self):\n title = Text(\"Succession Plays One Animation After Another\", font_size=34).to_edge(UP)\n stages = VGroup(*[\n VGroup(\n RoundedRectangle(corner_radius=0.1, width=1.8, height=0.85, color=TEAL_D, fill_opacity=0.12),\n Text(label, font_size=22, color=TEAL_D),\n )\n for label in [\"parse\", \"plan\", \"animate\"]\n ]).arrange(RIGHT, buff=1.0).shift(UP * 0.2)\n for group in stages:\n group[1].move_to(group[0])\n token = Dot(color=YELLOW, radius=0.1).move_to(stages[0][0].get_left() + RIGHT * 0.3)\n paths = [\n Line(token.get_center(), stages[0][0].get_center()),\n Line(stages[0][0].get_center(), stages[1][0].get_center()),\n Line(stages[1][0].get_center(), stages[2][0].get_center()),\n ]\n connectors = VGroup(*[Arrow(stages[i][0].get_right(), stages[i + 1][0].get_left(), buff=0.15, color=GRAY_B) for i in range(2)])\n caption = Text(\"Succession is useful when the order itself is the story.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), FadeIn(stages), FadeIn(connectors), FadeIn(token), run_time=3)\n self.play(\n Succession(\n MoveAlongPath(token, paths[0], rate_func=linear),\n Indicate(stages[0][0], color=YELLOW_D),\n MoveAlongPath(token, paths[1], rate_func=linear),\n Indicate(stages[1][0], color=YELLOW_D),\n MoveAlongPath(token, paths[2], rate_func=linear),\n Indicate(stages[2][0], color=YELLOW_D),\n ),\n FadeIn(caption),\n run_time=5,\n )\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000041", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "StreamlinesDivergenceDemo", "scene_base": "Scene", "num_animations": 5, "num_lines": 18, "has_reasoning": false, "prompt": "Create a 10-second Manim scene showing stream lines in a simple outward flow field with a short caption explaining divergence.", "code": "from manim import *\n\nclass StreamlinesDivergenceDemo(Scene):\n def construct(self):\n title = Text(\"Stream Lines for an Outward Flow\", font_size=34).to_edge(UP)\n stream_lines = StreamLines(\n lambda pos: 0.35 * pos + 0.1 * RIGHT,\n stroke_width=2,\n max_anchors_per_line=30,\n x_range=[-4, 4, 0.5],\n y_range=[-3, 3, 0.5],\n )\n caption = Text(\"Divergence means nearby trajectories spread apart.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), run_time=2)\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.4)\n self.play(FadeIn(caption), run_time=2)\n self.wait(stream_lines.virtual_time / stream_lines.flow_speed)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene showing stream lines in a simple outward flow field with a short caption explaining divergence."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass StreamlinesDivergenceDemo(Scene):\n def construct(self):\n title = Text(\"Stream Lines for an Outward Flow\", font_size=34).to_edge(UP)\n stream_lines = StreamLines(\n lambda pos: 0.35 * pos + 0.1 * RIGHT,\n stroke_width=2,\n max_anchors_per_line=30,\n x_range=[-4, 4, 0.5],\n y_range=[-3, 3, 0.5],\n )\n caption = Text(\"Divergence means nearby trajectories spread apart.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), run_time=2)\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.4)\n self.play(FadeIn(caption), run_time=2)\n self.wait(stream_lines.virtual_time / stream_lines.flow_speed)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000046", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ProbabilityNumberLineMasses", "scene_base": "Scene", "num_animations": 6, "num_lines": 20, "has_reasoning": false, "prompt": "Create a 10-second Manim scene on a NumberLine that marks a small discrete probability distribution with vertical lines, dots, and probability labels.", "code": "from manim import *\n\nclass ProbabilityNumberLineMasses(Scene):\n def construct(self):\n title = Text(\"Discrete Probability Mass on a Number Line\", font_size=32).to_edge(UP)\n line = NumberLine(x_range=[0, 6, 1], include_numbers=True, length=8)\n xs = [1, 2, 4, 5]\n probs = [0.2, 0.35, 0.3, 0.15]\n stems = VGroup()\n labels = VGroup()\n dots = VGroup()\n for x, p in zip(xs, probs):\n base = line.n2p(x)\n top = base + UP * (2.8 * p + 0.3)\n stems.add(Line(base, top, color=BLUE_D, stroke_width=6))\n dots.add(Dot(top, color=YELLOW_D, radius=0.06))\n labels.add(MathTex(f\"{p:.2f}\", color=YELLOW_D).next_to(top, UP, buff=0.12))\n caption = Text(\"Each stem height encodes the probability mass at one value.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(line), run_time=3)\n self.play(LaggedStart(*[Create(stem) for stem in stems], lag_ratio=0.15), LaggedStart(*[FadeIn(dot) for dot in dots], lag_ratio=0.15), LaggedStart(*[FadeIn(label) for label in labels], lag_ratio=0.15), FadeIn(caption), run_time=4)\n self.wait(3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene on a NumberLine that marks a small discrete probability distribution with vertical lines, dots, and probability labels."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ProbabilityNumberLineMasses(Scene):\n def construct(self):\n title = Text(\"Discrete Probability Mass on a Number Line\", font_size=32).to_edge(UP)\n line = NumberLine(x_range=[0, 6, 1], include_numbers=True, length=8)\n xs = [1, 2, 4, 5]\n probs = [0.2, 0.35, 0.3, 0.15]\n stems = VGroup()\n labels = VGroup()\n dots = VGroup()\n for x, p in zip(xs, probs):\n base = line.n2p(x)\n top = base + UP * (2.8 * p + 0.3)\n stems.add(Line(base, top, color=BLUE_D, stroke_width=6))\n dots.add(Dot(top, color=YELLOW_D, radius=0.06))\n labels.add(MathTex(f\"{p:.2f}\", color=YELLOW_D).next_to(top, UP, buff=0.12))\n caption = Text(\"Each stem height encodes the probability mass at one value.\", font_size=24, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(line), run_time=3)\n self.play(LaggedStart(*[Create(stem) for stem in stems], lag_ratio=0.15), LaggedStart(*[FadeIn(dot) for dot in dots], lag_ratio=0.15), LaggedStart(*[FadeIn(label) for label in labels], lag_ratio=0.15), FadeIn(caption), run_time=4)\n self.wait(3)\n```"}]}
{"id": "autoresearch-manim_000051", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ComplexPlaneRotationStory", "scene_base": "Scene", "num_animations": 7, "num_lines": 22, "has_reasoning": false, "prompt": "Create a 10-second Manim scene on a complex plane that rotates one complex number by ninety degrees twice. Trace the point, keep an arrow from the origin to the point, and relabel the states z, iz, and -z.", "code": "from manim import *\n\nclass ComplexPlaneRotationStory(Scene):\n def construct(self):\n title = Text(\"Multiplying by i Rotates the Point\", font_size=34).to_edge(UP)\n plane = ComplexPlane(x_range=[-3, 3, 1], y_range=[-3, 3, 1]).add_coordinates().shift(DOWN * 0.2)\n origin = plane.n2p(0)\n dot = Dot(plane.n2p(1 + 1j), color=YELLOW, radius=0.08)\n arrow = always_redraw(lambda: Arrow(origin, dot.get_center(), buff=0.0, color=YELLOW_D, stroke_width=5, max_tip_length_to_length_ratio=0.18))\n path = TracedPath(dot.get_center, stroke_color=YELLOW_D, stroke_width=4)\n label = MathTex(\"z\", color=YELLOW_D).next_to(dot, UR, buff=0.15)\n next_label = MathTex(\"iz\", color=BLUE_D)\n final_label = MathTex(\"-z\", color=RED_D)\n circle = Circle(radius=np.linalg.norm(plane.n2p(1 + 1j) - origin), color=GRAY_C, stroke_opacity=0.4).move_to(origin)\n\n self.play(FadeIn(title), Create(plane), Create(circle), FadeIn(dot), FadeIn(label), run_time=3)\n self.add(path, arrow)\n self.play(Rotate(dot, angle=PI / 2, about_point=origin), run_time=2)\n next_label.next_to(dot, UR, buff=0.15)\n self.play(Transform(label, next_label), run_time=1)\n self.play(Rotate(dot, angle=PI / 2, about_point=origin), run_time=2)\n final_label.next_to(dot, UL, buff=0.15)\n self.play(Transform(label, final_label), run_time=1)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 10-second Manim scene on a complex plane that rotates one complex number by ninety degrees twice. Trace the point, keep an arrow from the origin to the point, and relabel the states z, iz, and -z."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ComplexPlaneRotationStory(Scene):\n def construct(self):\n title = Text(\"Multiplying by i Rotates the Point\", font_size=34).to_edge(UP)\n plane = ComplexPlane(x_range=[-3, 3, 1], y_range=[-3, 3, 1]).add_coordinates().shift(DOWN * 0.2)\n origin = plane.n2p(0)\n dot = Dot(plane.n2p(1 + 1j), color=YELLOW, radius=0.08)\n arrow = always_redraw(lambda: Arrow(origin, dot.get_center(), buff=0.0, color=YELLOW_D, stroke_width=5, max_tip_length_to_length_ratio=0.18))\n path = TracedPath(dot.get_center, stroke_color=YELLOW_D, stroke_width=4)\n label = MathTex(\"z\", color=YELLOW_D).next_to(dot, UR, buff=0.15)\n next_label = MathTex(\"iz\", color=BLUE_D)\n final_label = MathTex(\"-z\", color=RED_D)\n circle = Circle(radius=np.linalg.norm(plane.n2p(1 + 1j) - origin), color=GRAY_C, stroke_opacity=0.4).move_to(origin)\n\n self.play(FadeIn(title), Create(plane), Create(circle), FadeIn(dot), FadeIn(label), run_time=3)\n self.add(path, arrow)\n self.play(Rotate(dot, angle=PI / 2, about_point=origin), run_time=2)\n next_label.next_to(dot, UR, buff=0.15)\n self.play(Transform(label, next_label), run_time=1)\n self.play(Rotate(dot, angle=PI / 2, about_point=origin), run_time=2)\n final_label.next_to(dot, UL, buff=0.15)\n self.play(Transform(label, final_label), run_time=1)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000056", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "WaveInterferenceBuild", "scene_base": "Scene", "num_animations": 9, "num_lines": 30, "has_reasoning": false, "prompt": "Create a 30-second Manim scene with three stacked plots showing wave 1, wave 2, and their sum. Reveal the component waves first and then show how the interference pattern forms in the combined plot.", "code": "from manim import *\n\nclass WaveInterferenceBuild(Scene):\n def construct(self):\n title = Text(\"Interference from Two Waves\", font_size=40).to_edge(UP)\n top_axes = Axes(x_range=[0, 2 * PI, PI / 2], y_range=[-1.6, 1.6, 1], x_length=8, y_length=2.2, tips=False).shift(UP * 1.8)\n mid_axes = top_axes.copy().shift(DOWN * 2.2)\n bot_axes = top_axes.copy().shift(DOWN * 4.4)\n\n wave1 = top_axes.plot(lambda x: np.sin(x), color=BLUE)\n wave2 = mid_axes.plot(lambda x: 0.7 * np.sin(x + PI / 3), color=GREEN)\n total = bot_axes.plot(lambda x: np.sin(x) + 0.7 * np.sin(x + PI / 3), color=YELLOW)\n\n label1 = Text(\"Wave 1\", font_size=24, color=BLUE).next_to(top_axes, LEFT)\n label2 = Text(\"Wave 2\", font_size=24, color=GREEN).next_to(mid_axes, LEFT)\n label3 = Text(\"Sum\", font_size=24, color=YELLOW).next_to(bot_axes, LEFT)\n\n x_sample = PI\n guides = VGroup(\n DashedLine(top_axes.c2p(x_sample, 0), top_axes.i2gp(x_sample, wave1), color=BLUE_D),\n DashedLine(mid_axes.c2p(x_sample, 0), mid_axes.i2gp(x_sample, wave2), color=GREEN_D),\n DashedLine(bot_axes.c2p(x_sample, 0), bot_axes.i2gp(x_sample, total), color=YELLOW_D),\n )\n sample_note = Text(\"At one x-position, the amplitudes add\", font_size=28, color=GRAY_D).to_edge(DOWN)\n phase_note = MathTex(r\"\\sin(x) + 0.7\\sin(x+\\phi)\", font_size=34).next_to(bot_axes, RIGHT)\n\n self.play(FadeIn(title), Create(top_axes), Create(mid_axes), Create(bot_axes), run_time=4)\n self.play(Create(wave1), FadeIn(label1), run_time=3)\n self.wait(1)\n self.play(Create(wave2), FadeIn(label2), run_time=3)\n self.wait(1)\n self.play(Create(total), FadeIn(label3), run_time=4)\n self.play(LaggedStart(*[Create(guide) for guide in guides], lag_ratio=0.15), FadeIn(sample_note), run_time=4)\n self.play(FadeIn(phase_note), run_time=2)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene with three stacked plots showing wave 1, wave 2, and their sum. Reveal the component waves first and then show how the interference pattern forms in the combined plot."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass WaveInterferenceBuild(Scene):\n def construct(self):\n title = Text(\"Interference from Two Waves\", font_size=40).to_edge(UP)\n top_axes = Axes(x_range=[0, 2 * PI, PI / 2], y_range=[-1.6, 1.6, 1], x_length=8, y_length=2.2, tips=False).shift(UP * 1.8)\n mid_axes = top_axes.copy().shift(DOWN * 2.2)\n bot_axes = top_axes.copy().shift(DOWN * 4.4)\n\n wave1 = top_axes.plot(lambda x: np.sin(x), color=BLUE)\n wave2 = mid_axes.plot(lambda x: 0.7 * np.sin(x + PI / 3), color=GREEN)\n total = bot_axes.plot(lambda x: np.sin(x) + 0.7 * np.sin(x + PI / 3), color=YELLOW)\n\n label1 = Text(\"Wave 1\", font_size=24, color=BLUE).next_to(top_axes, LEFT)\n label2 = Text(\"Wave 2\", font_size=24, color=GREEN).next_to(mid_axes, LEFT)\n label3 = Text(\"Sum\", font_size=24, color=YELLOW).next_to(bot_axes, LEFT)\n\n x_sample = PI\n guides = VGroup(\n DashedLine(top_axes.c2p(x_sample, 0), top_axes.i2gp(x_sample, wave1), color=BLUE_D),\n DashedLine(mid_axes.c2p(x_sample, 0), mid_axes.i2gp(x_sample, wave2), color=GREEN_D),\n DashedLine(bot_axes.c2p(x_sample, 0), bot_axes.i2gp(x_sample, total), color=YELLOW_D),\n )\n sample_note = Text(\"At one x-position, the amplitudes add\", font_size=28, color=GRAY_D).to_edge(DOWN)\n phase_note = MathTex(r\"\\sin(x) + 0.7\\sin(x+\\phi)\", font_size=34).next_to(bot_axes, RIGHT)\n\n self.play(FadeIn(title), Create(top_axes), Create(mid_axes), Create(bot_axes), run_time=4)\n self.play(Create(wave1), FadeIn(label1), run_time=3)\n self.wait(1)\n self.play(Create(wave2), FadeIn(label2), run_time=3)\n self.wait(1)\n self.play(Create(total), FadeIn(label3), run_time=4)\n self.play(LaggedStart(*[Create(guide) for guide in guides], lag_ratio=0.15), FadeIn(sample_note), run_time=4)\n self.play(FadeIn(phase_note), run_time=2)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000061", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "TrackerTangentAreaStory", "scene_base": "Scene", "num_animations": 6, "num_lines": 28, "has_reasoning": false, "prompt": "Create a 30-second Manim explainer that combines a moving point, a tangent-style line, and shaded accumulation on the same graph. Use trackers and live redraws so the story evolves through multiple beats instead of one static figure.", "code": "from manim import *\n\nclass TrackerTangentAreaStory(Scene):\n def construct(self):\n def curve(x):\n return 0.08 * (x - 1.2) * (x - 4.8) * (x - 6.1) + 2.4\n\n def tangent_segment(x_value, width=1.2):\n slope = (curve(x_value + 0.02) - curve(x_value - 0.02)) / 0.04\n center = axes.c2p(x_value, curve(x_value))\n dx = width / (2 * np.sqrt(1 + slope**2))\n dy = slope * dx\n return Line(center + np.array([-dx, -dy, 0]), center + np.array([dx, dy, 0]), color=YELLOW_D, stroke_width=6)\n\n title = Text(\"A Moving Point Tells Two Stories\", font_size=36).to_edge(UP)\n axes = Axes(x_range=[0, 7, 1], y_range=[0, 4.5, 1], x_length=8.8, y_length=4.8, tips=False).shift(DOWN * 0.3)\n graph = axes.plot(curve, x_range=[0.2, 6.8], color=BLUE_D)\n x_tracker = ValueTracker(1.2)\n probe = always_redraw(lambda: Dot(axes.c2p(x_tracker.get_value(), curve(x_tracker.get_value())), color=YELLOW, radius=0.08))\n guide = always_redraw(lambda: DashedLine(axes.c2p(x_tracker.get_value(), 0), probe.get_center(), color=GRAY_B, stroke_width=3))\n tangent = always_redraw(lambda: tangent_segment(x_tracker.get_value()))\n area = always_redraw(lambda: axes.get_area(graph, x_range=(0.4, x_tracker.get_value()), color=TEAL_D, opacity=0.22))\n readout = always_redraw(lambda: VGroup(Text(\"x\", font_size=24, color=GRAY_D), DecimalNumber(x_tracker.get_value(), num_decimal_places=2, font_size=28, color=YELLOW_D)).arrange(RIGHT, buff=0.15).to_corner(UR).shift(DOWN * 0.6))\n caption_a = Text(\"The point moves, the local slope rotates, and the accumulated area grows.\", font_size=25, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"One graph can support local and global reasoning at the same time.\", font_size=25, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(axes), Create(graph), run_time=4)\n self.play(FadeIn(area), FadeIn(probe), Create(guide), Create(tangent), FadeIn(readout), FadeIn(caption_a), run_time=4)\n self.play(x_tracker.animate.set_value(2.6), run_time=5)\n self.play(x_tracker.animate.set_value(4.4), run_time=5)\n self.play(ReplacementTransform(caption_a, caption_b), x_tracker.animate.set_value(5.9), run_time=5)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim explainer that combines a moving point, a tangent-style line, and shaded accumulation on the same graph. Use trackers and live redraws so the story evolves through multiple beats instead of one static figure."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass TrackerTangentAreaStory(Scene):\n def construct(self):\n def curve(x):\n return 0.08 * (x - 1.2) * (x - 4.8) * (x - 6.1) + 2.4\n\n def tangent_segment(x_value, width=1.2):\n slope = (curve(x_value + 0.02) - curve(x_value - 0.02)) / 0.04\n center = axes.c2p(x_value, curve(x_value))\n dx = width / (2 * np.sqrt(1 + slope**2))\n dy = slope * dx\n return Line(center + np.array([-dx, -dy, 0]), center + np.array([dx, dy, 0]), color=YELLOW_D, stroke_width=6)\n\n title = Text(\"A Moving Point Tells Two Stories\", font_size=36).to_edge(UP)\n axes = Axes(x_range=[0, 7, 1], y_range=[0, 4.5, 1], x_length=8.8, y_length=4.8, tips=False).shift(DOWN * 0.3)\n graph = axes.plot(curve, x_range=[0.2, 6.8], color=BLUE_D)\n x_tracker = ValueTracker(1.2)\n probe = always_redraw(lambda: Dot(axes.c2p(x_tracker.get_value(), curve(x_tracker.get_value())), color=YELLOW, radius=0.08))\n guide = always_redraw(lambda: DashedLine(axes.c2p(x_tracker.get_value(), 0), probe.get_center(), color=GRAY_B, stroke_width=3))\n tangent = always_redraw(lambda: tangent_segment(x_tracker.get_value()))\n area = always_redraw(lambda: axes.get_area(graph, x_range=(0.4, x_tracker.get_value()), color=TEAL_D, opacity=0.22))\n readout = always_redraw(lambda: VGroup(Text(\"x\", font_size=24, color=GRAY_D), DecimalNumber(x_tracker.get_value(), num_decimal_places=2, font_size=28, color=YELLOW_D)).arrange(RIGHT, buff=0.15).to_corner(UR).shift(DOWN * 0.6))\n caption_a = Text(\"The point moves, the local slope rotates, and the accumulated area grows.\", font_size=25, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"One graph can support local and global reasoning at the same time.\", font_size=25, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(axes), Create(graph), run_time=4)\n self.play(FadeIn(area), FadeIn(probe), Create(guide), Create(tangent), FadeIn(readout), FadeIn(caption_a), run_time=4)\n self.play(x_tracker.animate.set_value(2.6), run_time=5)\n self.play(x_tracker.animate.set_value(4.4), run_time=5)\n self.play(ReplacementTransform(caption_a, caption_b), x_tracker.animate.set_value(5.9), run_time=5)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000066", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "GraphTableZoomedTransitionStory", "scene_base": "ZoomedScene", "num_animations": 9, "num_lines": 34, "has_reasoning": false, "prompt": "Create a 30-second ZoomedScene that combines a graph, a tracked probe, and a small table of phases. Zoom into the steep transition region, then pop back out so the viewer sees both the local detail and the global curve.", "code": "from manim import *\n\nclass GraphTableZoomedTransitionStory(ZoomedScene):\n def __init__(self, **kwargs):\n super().__init__(zoom_factor=0.38, zoomed_display_height=2.4, zoomed_display_width=4.0, image_frame_stroke_width=10, zoomed_camera_config={\"default_frame_stroke_width\": 3}, **kwargs)\n\n def construct(self):\n title = Text(\"Global Shape and Local Detail\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[0, 10, 1], y_range=[0, 12, 2], x_length=7.2, y_length=4.6, tips=False).shift(LEFT * 1.5 + DOWN * 0.2)\n graph = axes.plot(lambda x: 2.1 + 4.2 * np.tanh((x - 5.0) * 1.4) + 0.08 * x, x_range=[0.6, 9.4], color=BLUE_D)\n tracker = ValueTracker(2.5)\n probe = always_redraw(lambda: Dot(axes.i2gp(tracker.get_value(), graph), color=YELLOW, radius=0.08))\n vline = always_redraw(lambda: DashedLine(axes.c2p(tracker.get_value(), 0), probe.get_center(), color=YELLOW_D, stroke_width=3))\n table = MathTable([[\"phase\", \"curve view\"], [\"left\", \"slow drift\"], [\"middle\", \"rapid jump\"], [\"right\", \"upper plateau\"]], include_outer_lines=True).scale(0.36).to_edge(RIGHT).shift(DOWN * 0.25)\n row_left = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n row_mid = SurroundingRectangle(table.get_rows()[2], color=YELLOW_D, buff=0.05)\n row_right = SurroundingRectangle(table.get_rows()[3], color=GREEN_D, buff=0.05)\n caption_a = Text(\"The global curve shows three phases, but the middle jump deserves a closer look.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Zooming into the transition shows how quickly the value changes there.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n frame = self.zoomed_camera.frame\n display = self.zoomed_display\n display.shift(DOWN * 2.1)\n display.display_frame.set_color(RED_D)\n\n self.play(FadeIn(title), Create(axes), Create(graph), FadeIn(table), run_time=4)\n self.play(FadeIn(probe), Create(vline), Create(row_left), FadeIn(caption_a), run_time=3)\n self.play(tracker.animate.set_value(5.0), ReplacementTransform(row_left, row_mid), run_time=4)\n frame.move_to(probe)\n frame.set_color(PURPLE)\n self.play(Create(frame), run_time=2)\n self.activate_zooming()\n self.play(self.get_zoomed_display_pop_out_animation(), ReplacementTransform(caption_a, caption_b), run_time=3)\n self.play(tracker.animate.set_value(5.4), run_time=4)\n pop_in = self.get_zoomed_display_pop_out_animation()\n self.play(pop_in, ReplacementTransform(row_mid, row_right), rate_func=lambda t: smooth(1 - t), run_time=3)\n self.play(tracker.animate.set_value(8.2), run_time=3)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second ZoomedScene that combines a graph, a tracked probe, and a small table of phases. Zoom into the steep transition region, then pop back out so the viewer sees both the local detail and the global curve."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GraphTableZoomedTransitionStory(ZoomedScene):\n def __init__(self, **kwargs):\n super().__init__(zoom_factor=0.38, zoomed_display_height=2.4, zoomed_display_width=4.0, image_frame_stroke_width=10, zoomed_camera_config={\"default_frame_stroke_width\": 3}, **kwargs)\n\n def construct(self):\n title = Text(\"Global Shape and Local Detail\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[0, 10, 1], y_range=[0, 12, 2], x_length=7.2, y_length=4.6, tips=False).shift(LEFT * 1.5 + DOWN * 0.2)\n graph = axes.plot(lambda x: 2.1 + 4.2 * np.tanh((x - 5.0) * 1.4) + 0.08 * x, x_range=[0.6, 9.4], color=BLUE_D)\n tracker = ValueTracker(2.5)\n probe = always_redraw(lambda: Dot(axes.i2gp(tracker.get_value(), graph), color=YELLOW, radius=0.08))\n vline = always_redraw(lambda: DashedLine(axes.c2p(tracker.get_value(), 0), probe.get_center(), color=YELLOW_D, stroke_width=3))\n table = MathTable([[\"phase\", \"curve view\"], [\"left\", \"slow drift\"], [\"middle\", \"rapid jump\"], [\"right\", \"upper plateau\"]], include_outer_lines=True).scale(0.36).to_edge(RIGHT).shift(DOWN * 0.25)\n row_left = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n row_mid = SurroundingRectangle(table.get_rows()[2], color=YELLOW_D, buff=0.05)\n row_right = SurroundingRectangle(table.get_rows()[3], color=GREEN_D, buff=0.05)\n caption_a = Text(\"The global curve shows three phases, but the middle jump deserves a closer look.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Zooming into the transition shows how quickly the value changes there.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n frame = self.zoomed_camera.frame\n display = self.zoomed_display\n display.shift(DOWN * 2.1)\n display.display_frame.set_color(RED_D)\n\n self.play(FadeIn(title), Create(axes), Create(graph), FadeIn(table), run_time=4)\n self.play(FadeIn(probe), Create(vline), Create(row_left), FadeIn(caption_a), run_time=3)\n self.play(tracker.animate.set_value(5.0), ReplacementTransform(row_left, row_mid), run_time=4)\n frame.move_to(probe)\n frame.set_color(PURPLE)\n self.play(Create(frame), run_time=2)\n self.activate_zooming()\n self.play(self.get_zoomed_display_pop_out_animation(), ReplacementTransform(caption_a, caption_b), run_time=3)\n self.play(tracker.animate.set_value(5.4), run_time=4)\n pop_in = self.get_zoomed_display_pop_out_animation()\n self.play(pop_in, ReplacementTransform(row_mid, row_right), rate_func=lambda t: smooth(1 - t), run_time=3)\n self.play(tracker.animate.set_value(8.2), run_time=3)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000071", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ArrowVectorFieldProbeVariation", "scene_base": "Scene", "num_animations": 7, "num_lines": 28, "has_reasoning": false, "prompt": "Create a 30-second Manim scene that explains a 2D flow with an ArrowVectorField, stream lines, and a moving probe. Use a compact table to distinguish left, center, and right flow behavior without relying on custom helper methods.", "code": "from manim import *\n\nclass ArrowVectorFieldProbeVariation(Scene):\n def construct(self):\n title = Text(\"Reading a Flow Field with Arrows and a Probe\", font_size=33).to_edge(UP)\n plane = NumberPlane(x_range=[-4, 4, 1], y_range=[-3, 3, 1], background_line_style={\"stroke_opacity\": 0.25}).shift(LEFT * 2.2 + DOWN * 0.15)\n field = ArrowVectorField(lambda pos: np.array([0.9 - 0.18 * pos[1], 0.22 * np.sin(pos[0]), 0.0]), x_range=[-4, 4, 1], y_range=[-3, 3, 1], colors=[BLUE_D, TEAL_D, GREEN_D], vector_config={\"stroke_width\": 2, \"max_tip_length_to_length_ratio\": 0.24})\n stream_lines = StreamLines(lambda pos: np.array([0.9 - 0.18 * pos[1], 0.22 * np.sin(pos[0]), 0.0]), x_range=[-4, 4, 1], y_range=[-3, 3, 1], stroke_width=2.0, max_anchors_per_line=14)\n probe = Dot(plane.c2p(-2.8, 0.8), color=YELLOW, radius=0.08)\n path = VMobject(color=YELLOW_D)\n path.set_points_smoothly([plane.c2p(-2.8, 0.8), plane.c2p(-1.0, 0.5), plane.c2p(0.6, 0.0), plane.c2p(2.0, -0.4), plane.c2p(3.0, -0.8)])\n table = MathTable([[\"zone\", \"behavior\"], [\"left\", \"gentle lift\"], [\"center\", \"balanced drift\"], [\"right\", \"stronger push\"]], include_outer_lines=True).scale(0.34).to_edge(RIGHT).shift(DOWN * 0.2)\n row_a = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n row_b = SurroundingRectangle(table.get_rows()[2], color=TEAL_D, buff=0.05)\n row_c = SurroundingRectangle(table.get_rows()[3], color=GREEN_D, buff=0.05)\n zone_a = Rectangle(width=2.1, height=5.1, stroke_color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.06).move_to(plane.c2p(-2.7, 0))\n zone_b = Rectangle(width=2.1, height=5.1, stroke_color=TEAL_D, fill_color=TEAL_D, fill_opacity=0.06).move_to(plane.c2p(0.0, 0))\n zone_c = Rectangle(width=2.1, height=5.1, stroke_color=GREEN_D, fill_color=GREEN_D, fill_opacity=0.06).move_to(plane.c2p(2.7, 0))\n caption_a = Text(\"On the left, the flow still rises gently.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Near the center, the horizontal drift dominates the motion.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Farther right, the probe exits with a stronger push.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(plane), Create(field), FadeIn(table), run_time=4)\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.2)\n self.play(Create(zone_a), Create(row_a), FadeIn(caption_a), run_time=3)\n self.play(ReplacementTransform(zone_a, zone_b), ReplacementTransform(row_a, row_b), ReplacementTransform(caption_a, caption_b), run_time=3)\n self.play(ReplacementTransform(zone_b, zone_c), ReplacementTransform(row_b, row_c), ReplacementTransform(caption_b, caption_c), run_time=3)\n self.play(FadeIn(probe), MoveAlongPath(probe, path), run_time=5, rate_func=linear)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene that explains a 2D flow with an ArrowVectorField, stream lines, and a moving probe. Use a compact table to distinguish left, center, and right flow behavior without relying on custom helper methods."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArrowVectorFieldProbeVariation(Scene):\n def construct(self):\n title = Text(\"Reading a Flow Field with Arrows and a Probe\", font_size=33).to_edge(UP)\n plane = NumberPlane(x_range=[-4, 4, 1], y_range=[-3, 3, 1], background_line_style={\"stroke_opacity\": 0.25}).shift(LEFT * 2.2 + DOWN * 0.15)\n field = ArrowVectorField(lambda pos: np.array([0.9 - 0.18 * pos[1], 0.22 * np.sin(pos[0]), 0.0]), x_range=[-4, 4, 1], y_range=[-3, 3, 1], colors=[BLUE_D, TEAL_D, GREEN_D], vector_config={\"stroke_width\": 2, \"max_tip_length_to_length_ratio\": 0.24})\n stream_lines = StreamLines(lambda pos: np.array([0.9 - 0.18 * pos[1], 0.22 * np.sin(pos[0]), 0.0]), x_range=[-4, 4, 1], y_range=[-3, 3, 1], stroke_width=2.0, max_anchors_per_line=14)\n probe = Dot(plane.c2p(-2.8, 0.8), color=YELLOW, radius=0.08)\n path = VMobject(color=YELLOW_D)\n path.set_points_smoothly([plane.c2p(-2.8, 0.8), plane.c2p(-1.0, 0.5), plane.c2p(0.6, 0.0), plane.c2p(2.0, -0.4), plane.c2p(3.0, -0.8)])\n table = MathTable([[\"zone\", \"behavior\"], [\"left\", \"gentle lift\"], [\"center\", \"balanced drift\"], [\"right\", \"stronger push\"]], include_outer_lines=True).scale(0.34).to_edge(RIGHT).shift(DOWN * 0.2)\n row_a = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n row_b = SurroundingRectangle(table.get_rows()[2], color=TEAL_D, buff=0.05)\n row_c = SurroundingRectangle(table.get_rows()[3], color=GREEN_D, buff=0.05)\n zone_a = Rectangle(width=2.1, height=5.1, stroke_color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.06).move_to(plane.c2p(-2.7, 0))\n zone_b = Rectangle(width=2.1, height=5.1, stroke_color=TEAL_D, fill_color=TEAL_D, fill_opacity=0.06).move_to(plane.c2p(0.0, 0))\n zone_c = Rectangle(width=2.1, height=5.1, stroke_color=GREEN_D, fill_color=GREEN_D, fill_opacity=0.06).move_to(plane.c2p(2.7, 0))\n caption_a = Text(\"On the left, the flow still rises gently.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Near the center, the horizontal drift dominates the motion.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Farther right, the probe exits with a stronger push.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(plane), Create(field), FadeIn(table), run_time=4)\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.2)\n self.play(Create(zone_a), Create(row_a), FadeIn(caption_a), run_time=3)\n self.play(ReplacementTransform(zone_a, zone_b), ReplacementTransform(row_a, row_b), ReplacementTransform(caption_a, caption_b), run_time=3)\n self.play(ReplacementTransform(zone_b, zone_c), ReplacementTransform(row_b, row_c), ReplacementTransform(caption_b, caption_c), run_time=3)\n self.play(FadeIn(probe), MoveAlongPath(probe, path), run_time=5, rate_func=linear)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000076", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "LatentSpaceClusterTransitionStory", "scene_base": "Scene", "num_animations": 4, "num_lines": 22, "has_reasoning": false, "prompt": "Create a 30-second Manim scene that starts with mixed points in a latent space and then animates them into clearer clusters. Use point movement, cluster highlights, and transition captions so the embedding separation becomes obvious.", "code": "from manim import *\n\nclass LatentSpaceClusterTransitionStory(Scene):\n def construct(self):\n title = Text(\"Latent Space Organizes into Clusters\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[-4, 4, 1], y_range=[-3, 3, 1], x_length=7.0, y_length=5.0, tips=False).shift(LEFT * 0.6 + DOWN * 0.15)\n mixed_positions = [(-1.6, 0.5), (-1.1, -0.1), (-0.8, 0.8), (0.2, 0.0), (0.6, 0.6), (1.0, -0.4), (1.7, 0.5), (1.2, 1.0)]\n target_positions = [(-2.1, 1.0), (-1.8, 0.2), (-2.3, 0.5), (0.3, -0.2), (0.8, -0.5), (0.6, 0.3), (2.2, 0.8), (2.5, 0.2)]\n colors = [BLUE_D, BLUE_D, BLUE_D, ORANGE, ORANGE, ORANGE, TEAL_D, TEAL_D]\n dots = VGroup(*[Dot(axes.c2p(x, y), color=color, radius=0.08) for (x, y), color in zip(mixed_positions, colors)])\n moved_dots = VGroup(*[Dot(axes.c2p(x, y), color=color, radius=0.08) for (x, y), color in zip(target_positions, colors)])\n cluster_boxes = VGroup(\n SurroundingRectangle(VGroup(*moved_dots[:3]), color=BLUE_D, buff=0.18),\n SurroundingRectangle(VGroup(*moved_dots[3:6]), color=ORANGE, buff=0.18),\n SurroundingRectangle(VGroup(*moved_dots[6:]), color=TEAL_D, buff=0.18),\n )\n caption_a = Text(\"At first, the representation looks noisy and partially mixed.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"As training shapes the embedding, related points drift together.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Cluster highlights make the separated structure easy to read.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(axes), FadeIn(dots), FadeIn(caption_a), run_time=4)\n self.play(*[ReplacementTransform(dot, moved) for dot, moved in zip(dots, moved_dots)], ReplacementTransform(caption_a, caption_b), run_time=6)\n self.play(LaggedStart(*[Create(box) for box in cluster_boxes], lag_ratio=0.18), ReplacementTransform(caption_b, caption_c), run_time=4)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene that starts with mixed points in a latent space and then animates them into clearer clusters. Use point movement, cluster highlights, and transition captions so the embedding separation becomes obvious."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LatentSpaceClusterTransitionStory(Scene):\n def construct(self):\n title = Text(\"Latent Space Organizes into Clusters\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[-4, 4, 1], y_range=[-3, 3, 1], x_length=7.0, y_length=5.0, tips=False).shift(LEFT * 0.6 + DOWN * 0.15)\n mixed_positions = [(-1.6, 0.5), (-1.1, -0.1), (-0.8, 0.8), (0.2, 0.0), (0.6, 0.6), (1.0, -0.4), (1.7, 0.5), (1.2, 1.0)]\n target_positions = [(-2.1, 1.0), (-1.8, 0.2), (-2.3, 0.5), (0.3, -0.2), (0.8, -0.5), (0.6, 0.3), (2.2, 0.8), (2.5, 0.2)]\n colors = [BLUE_D, BLUE_D, BLUE_D, ORANGE, ORANGE, ORANGE, TEAL_D, TEAL_D]\n dots = VGroup(*[Dot(axes.c2p(x, y), color=color, radius=0.08) for (x, y), color in zip(mixed_positions, colors)])\n moved_dots = VGroup(*[Dot(axes.c2p(x, y), color=color, radius=0.08) for (x, y), color in zip(target_positions, colors)])\n cluster_boxes = VGroup(\n SurroundingRectangle(VGroup(*moved_dots[:3]), color=BLUE_D, buff=0.18),\n SurroundingRectangle(VGroup(*moved_dots[3:6]), color=ORANGE, buff=0.18),\n SurroundingRectangle(VGroup(*moved_dots[6:]), color=TEAL_D, buff=0.18),\n )\n caption_a = Text(\"At first, the representation looks noisy and partially mixed.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"As training shapes the embedding, related points drift together.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Cluster highlights make the separated structure easy to read.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(axes), FadeIn(dots), FadeIn(caption_a), run_time=4)\n self.play(*[ReplacementTransform(dot, moved) for dot, moved in zip(dots, moved_dots)], ReplacementTransform(caption_a, caption_b), run_time=6)\n self.play(LaggedStart(*[Create(box) for box in cluster_boxes], lag_ratio=0.18), ReplacementTransform(caption_b, caption_c), run_time=4)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000081", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "PlaneToSurfaceMorphStory", "scene_base": "ThreeDScene", "num_animations": 6, "num_lines": 19, "has_reasoning": false, "prompt": "Create a 20-second ThreeDScene that starts from a flat plane and then transforms it into a curved surface. Use ReplacementTransform and a camera move so the viewer clearly sees the shift from flat geometry to warped geometry.", "code": "from manim import *\n\nclass PlaneToSurfaceMorphStory(ThreeDScene):\n def construct(self):\n title = Text(\"A Flat Plane Can Morph into Curved Geometry\", font_size=32).to_edge(UP)\n self.add_fixed_in_frame_mobjects(title)\n axes = ThreeDAxes(x_range=[-3, 3, 1], y_range=[-3, 3, 1], z_range=[-2, 3, 1])\n plane = Surface(lambda u, v: axes.c2p(u, v, 0), u_range=[-2.2, 2.2], v_range=[-2.2, 2.2], checkerboard_colors=[GRAY_D, GRAY_E], resolution=(10, 10), fill_opacity=0.45)\n curved = Surface(lambda u, v: axes.c2p(u, v, 0.2 * np.sin(u) * np.cos(v) + 0.1 * u), u_range=[-2.2, 2.2], v_range=[-2.2, 2.2], checkerboard_colors=[BLUE_D, TEAL_D], resolution=(14, 14), fill_opacity=0.72)\n caption_a = Text(\"Start from a flat reference surface.\", font_size=22, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Then warp it and change the camera so the height variation becomes obvious.\", font_size=22, color=GRAY_D).to_edge(DOWN)\n self.add_fixed_in_frame_mobjects(caption_a)\n\n self.set_camera_orientation(phi=70 * DEGREES, theta=-88 * DEGREES)\n self.play(FadeIn(axes), FadeIn(plane), run_time=3)\n self.play(ReplacementTransform(plane, curved), ReplacementTransform(caption_a, caption_b), run_time=4)\n self.move_camera(phi=68 * DEGREES, theta=-35 * DEGREES, run_time=4)\n self.begin_ambient_camera_rotation(rate=0.1)\n self.wait(3)\n self.stop_ambient_camera_rotation()\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 20-second ThreeDScene that starts from a flat plane and then transforms it into a curved surface. Use ReplacementTransform and a camera move so the viewer clearly sees the shift from flat geometry to warped geometry."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PlaneToSurfaceMorphStory(ThreeDScene):\n def construct(self):\n title = Text(\"A Flat Plane Can Morph into Curved Geometry\", font_size=32).to_edge(UP)\n self.add_fixed_in_frame_mobjects(title)\n axes = ThreeDAxes(x_range=[-3, 3, 1], y_range=[-3, 3, 1], z_range=[-2, 3, 1])\n plane = Surface(lambda u, v: axes.c2p(u, v, 0), u_range=[-2.2, 2.2], v_range=[-2.2, 2.2], checkerboard_colors=[GRAY_D, GRAY_E], resolution=(10, 10), fill_opacity=0.45)\n curved = Surface(lambda u, v: axes.c2p(u, v, 0.2 * np.sin(u) * np.cos(v) + 0.1 * u), u_range=[-2.2, 2.2], v_range=[-2.2, 2.2], checkerboard_colors=[BLUE_D, TEAL_D], resolution=(14, 14), fill_opacity=0.72)\n caption_a = Text(\"Start from a flat reference surface.\", font_size=22, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Then warp it and change the camera so the height variation becomes obvious.\", font_size=22, color=GRAY_D).to_edge(DOWN)\n self.add_fixed_in_frame_mobjects(caption_a)\n\n self.set_camera_orientation(phi=70 * DEGREES, theta=-88 * DEGREES)\n self.play(FadeIn(axes), FadeIn(plane), run_time=3)\n self.play(ReplacementTransform(plane, curved), ReplacementTransform(caption_a, caption_b), run_time=4)\n self.move_camera(phi=68 * DEGREES, theta=-35 * DEGREES, run_time=4)\n self.begin_ambient_camera_rotation(rate=0.1)\n self.wait(3)\n self.stop_ambient_camera_rotation()\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000086", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "EconomicsComparativeAdvantageStory", "scene_base": "Scene", "num_animations": 4, "num_lines": 17, "has_reasoning": false, "prompt": "Create a 30-second Manim scene that explains comparative advantage with a small table for two producers and two goods. Highlight opportunity cost differences and animate the conclusion about specialization.", "code": "from manim import *\n\nclass EconomicsComparativeAdvantageStory(Scene):\n def construct(self):\n title = Text(\"Comparative Advantage Depends on Opportunity Cost\", font_size=34).to_edge(UP)\n table = MathTable([[\"producer\", \"cloth\", \"wine\"], [\"A\", \"6\", \"3\"], [\"B\", \"4\", \"4\"]], include_outer_lines=True).scale(0.48).shift(LEFT * 1.8)\n cost_a = Text(\"A gives up 0.5 wine per cloth\", font_size=24, color=BLUE_D).to_edge(RIGHT).shift(UP * 0.8)\n cost_b = Text(\"B gives up 1 wine per cloth\", font_size=24, color=ORANGE).next_to(cost_a, DOWN, aligned_edge=LEFT, buff=0.25)\n box_a = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n box_b = SurroundingRectangle(table.get_rows()[2], color=ORANGE, buff=0.05)\n conclusion = Text(\"A specializes in cloth, B in wine\", font_size=28, color=GREEN_D).to_edge(DOWN).shift(UP * 0.4)\n caption_a = Text(\"Absolute output alone does not decide who should specialize.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"The lower opportunity cost reveals comparative advantage.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Specialization follows the relative tradeoff, not just who is bigger.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), FadeIn(table), Create(box_a), FadeIn(caption_a), run_time=4)\n self.play(Create(box_b), FadeIn(cost_a), FadeIn(cost_b), ReplacementTransform(caption_a, caption_b), run_time=5)\n self.play(FadeIn(conclusion), ReplacementTransform(caption_b, caption_c), run_time=4)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene that explains comparative advantage with a small table for two producers and two goods. Highlight opportunity cost differences and animate the conclusion about specialization."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass EconomicsComparativeAdvantageStory(Scene):\n def construct(self):\n title = Text(\"Comparative Advantage Depends on Opportunity Cost\", font_size=34).to_edge(UP)\n table = MathTable([[\"producer\", \"cloth\", \"wine\"], [\"A\", \"6\", \"3\"], [\"B\", \"4\", \"4\"]], include_outer_lines=True).scale(0.48).shift(LEFT * 1.8)\n cost_a = Text(\"A gives up 0.5 wine per cloth\", font_size=24, color=BLUE_D).to_edge(RIGHT).shift(UP * 0.8)\n cost_b = Text(\"B gives up 1 wine per cloth\", font_size=24, color=ORANGE).next_to(cost_a, DOWN, aligned_edge=LEFT, buff=0.25)\n box_a = SurroundingRectangle(table.get_rows()[1], color=BLUE_D, buff=0.05)\n box_b = SurroundingRectangle(table.get_rows()[2], color=ORANGE, buff=0.05)\n conclusion = Text(\"A specializes in cloth, B in wine\", font_size=28, color=GREEN_D).to_edge(DOWN).shift(UP * 0.4)\n caption_a = Text(\"Absolute output alone does not decide who should specialize.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"The lower opportunity cost reveals comparative advantage.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"Specialization follows the relative tradeoff, not just who is bigger.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), FadeIn(table), Create(box_a), FadeIn(caption_a), run_time=4)\n self.play(Create(box_b), FadeIn(cost_a), FadeIn(cost_b), ReplacementTransform(caption_a, caption_b), run_time=5)\n self.play(FadeIn(conclusion), ReplacementTransform(caption_b, caption_c), run_time=4)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000091", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "OpticsSnellRefractionStory", "scene_base": "Scene", "num_animations": 6, "num_lines": 29, "has_reasoning": false, "prompt": "Create a 30-second Manim scene that explains refraction at a flat interface. Show the boundary, a normal line, incident and refracted rays, angle markers, and staged captions so the bending toward the normal is easy to see.", "code": "from manim import *\n\nclass OpticsSnellRefractionStory(Scene):\n def construct(self):\n title = Text(\"Refraction Bends the Ray\", font_size=34).to_edge(UP)\n boundary = Line(LEFT * 5.4, RIGHT * 5.4, color=BLUE_B).shift(DOWN * 0.35)\n hit_point = boundary.get_center()\n normal = DashedLine(hit_point + UP * 2.8, hit_point + DOWN * 2.8, color=GRAY_C)\n air_label = Text(\"air\", font_size=24, color=GRAY_D).move_to(LEFT * 4.2 + UP * 1.8)\n water_label = Text(\"water\", font_size=24, color=BLUE_D).move_to(LEFT * 4.0 + DOWN * 1.8)\n incident_guide = Line(hit_point, hit_point + 2.8 * UL, color=BLUE_D)\n refracted_guide = Line(hit_point, hit_point + np.array([1.4, -2.5, 0]), color=GREEN_D)\n incident_ray = Arrow(hit_point + 2.8 * UL, hit_point + 0.08 * UL, buff=0.0, color=BLUE_D, stroke_width=5)\n refracted_ray = Arrow(hit_point + np.array([0.06, -0.1, 0]), hit_point + np.array([1.4, -2.5, 0]), buff=0.0, color=GREEN_D, stroke_width=5)\n normal_up = Line(hit_point, hit_point + UP * 2.2)\n normal_down = Line(hit_point, hit_point + DOWN * 2.2)\n angle_in = Angle(normal_up, incident_guide, radius=0.6, color=BLUE_D)\n angle_out = Angle(refracted_guide, normal_down, radius=0.6, color=GREEN_D)\n theta_in = MathTex(r\"\\theta_1\", color=BLUE_D).next_to(angle_in, LEFT, buff=0.12)\n theta_out = MathTex(r\"\\theta_2\", color=GREEN_D).next_to(angle_out, RIGHT, buff=0.12)\n bend_arrow = CurvedArrow(hit_point + RIGHT * 2.1 + DOWN * 0.4, hit_point + RIGHT * 0.8 + DOWN * 1.3, angle=0.6, color=YELLOW_D)\n caption_a = Text(\"The incident ray reaches the boundary while the normal gives a reference direction.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Inside the slower medium, the refracted ray bends closer to the normal.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"The smaller second angle is the visual signature of refraction here.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(boundary), Create(normal), FadeIn(air_label), FadeIn(water_label), FadeIn(caption_a), run_time=4)\n self.play(GrowArrow(incident_ray), Create(angle_in), FadeIn(theta_in), run_time=4)\n self.play(GrowArrow(refracted_ray), Create(angle_out), FadeIn(theta_out), ReplacementTransform(caption_a, caption_b), run_time=5)\n self.play(Create(bend_arrow), Indicate(angle_out, color=GREEN_A), run_time=4)\n self.play(ReplacementTransform(caption_b, caption_c), Indicate(theta_in, color=BLUE_A), Indicate(theta_out, color=GREEN_A), run_time=4)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene that explains refraction at a flat interface. Show the boundary, a normal line, incident and refracted rays, angle markers, and staged captions so the bending toward the normal is easy to see."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass OpticsSnellRefractionStory(Scene):\n def construct(self):\n title = Text(\"Refraction Bends the Ray\", font_size=34).to_edge(UP)\n boundary = Line(LEFT * 5.4, RIGHT * 5.4, color=BLUE_B).shift(DOWN * 0.35)\n hit_point = boundary.get_center()\n normal = DashedLine(hit_point + UP * 2.8, hit_point + DOWN * 2.8, color=GRAY_C)\n air_label = Text(\"air\", font_size=24, color=GRAY_D).move_to(LEFT * 4.2 + UP * 1.8)\n water_label = Text(\"water\", font_size=24, color=BLUE_D).move_to(LEFT * 4.0 + DOWN * 1.8)\n incident_guide = Line(hit_point, hit_point + 2.8 * UL, color=BLUE_D)\n refracted_guide = Line(hit_point, hit_point + np.array([1.4, -2.5, 0]), color=GREEN_D)\n incident_ray = Arrow(hit_point + 2.8 * UL, hit_point + 0.08 * UL, buff=0.0, color=BLUE_D, stroke_width=5)\n refracted_ray = Arrow(hit_point + np.array([0.06, -0.1, 0]), hit_point + np.array([1.4, -2.5, 0]), buff=0.0, color=GREEN_D, stroke_width=5)\n normal_up = Line(hit_point, hit_point + UP * 2.2)\n normal_down = Line(hit_point, hit_point + DOWN * 2.2)\n angle_in = Angle(normal_up, incident_guide, radius=0.6, color=BLUE_D)\n angle_out = Angle(refracted_guide, normal_down, radius=0.6, color=GREEN_D)\n theta_in = MathTex(r\"\\theta_1\", color=BLUE_D).next_to(angle_in, LEFT, buff=0.12)\n theta_out = MathTex(r\"\\theta_2\", color=GREEN_D).next_to(angle_out, RIGHT, buff=0.12)\n bend_arrow = CurvedArrow(hit_point + RIGHT * 2.1 + DOWN * 0.4, hit_point + RIGHT * 0.8 + DOWN * 1.3, angle=0.6, color=YELLOW_D)\n caption_a = Text(\"The incident ray reaches the boundary while the normal gives a reference direction.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_b = Text(\"Inside the slower medium, the refracted ray bends closer to the normal.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n caption_c = Text(\"The smaller second angle is the visual signature of refraction here.\", font_size=23, color=GRAY_D).to_edge(DOWN)\n\n self.play(FadeIn(title), Create(boundary), Create(normal), FadeIn(air_label), FadeIn(water_label), FadeIn(caption_a), run_time=4)\n self.play(GrowArrow(incident_ray), Create(angle_in), FadeIn(theta_in), run_time=4)\n self.play(GrowArrow(refracted_ray), Create(angle_out), FadeIn(theta_out), ReplacementTransform(caption_a, caption_b), run_time=5)\n self.play(Create(bend_arrow), Indicate(angle_out, color=GREEN_A), run_time=4)\n self.play(ReplacementTransform(caption_b, caption_c), Indicate(theta_in, color=BLUE_A), Indicate(theta_out, color=GREEN_A), run_time=4)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000096", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "SamplingAliasingReadoutStory", "scene_base": "Scene", "num_animations": 5, "num_lines": 28, "has_reasoning": false, "prompt": "Create a 30-second Manim scene that explains aliasing with one high-frequency signal, evenly spaced sample dots, and a misleading smooth reconstruction that still passes through those same dots. Keep the explanation clean and uncluttered with a small readout card instead of many labels.", "code": "from manim import *\n\nclass SamplingAliasingReadoutStory(Scene):\n def construct(self):\n def true_signal(x):\n return 1.15 * np.sin(2.7 * x)\n\n title = Text(\"The Samples Can Suggest the Wrong Wave\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[0, 8, 1], y_range=[-1.6, 1.6, 0.8], x_length=8.5, y_length=4.6, tips=False).shift(DOWN * 0.2)\n true_graph = axes.plot(true_signal, x_range=[0, 8], color=BLUE_D)\n sample_xs = [0.4, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4]\n sample_points = [axes.c2p(x, true_signal(x)) for x in sample_xs]\n sample_dots = VGroup(*[Dot(point, color=YELLOW, radius=0.08) for point in sample_points])\n alias_curve = VMobject(color=ORANGE)\n alias_curve.set_points_smoothly(sample_points)\n readout_lines = VGroup(Text(\"same samples\", font_size=22, color=YELLOW_D), Text(\"different smooth story\", font_size=26, color=ORANGE), Text(\"that is aliasing\", font_size=24, color=WHITE)).arrange(DOWN, aligned_edge=LEFT, buff=0.14)\n readout = VGroup(BackgroundRectangle(readout_lines, fill_opacity=0.92, buff=0.18), readout_lines).to_corner(UR).shift(DOWN * 0.75)\n caption_a = Text(\"The blue curve is the real signal before anything gets sampled.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_b = Text(\"The yellow dots are accurate samples, but they do not uniquely determine the fast oscillation.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_c = Text(\"A slower orange curve can pass through the same dots and tell the wrong story.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_group_a = VGroup(BackgroundRectangle(caption_a, fill_opacity=0.9, buff=0.16), caption_a)\n caption_group_b = VGroup(BackgroundRectangle(caption_b, fill_opacity=0.9, buff=0.16), caption_b)\n caption_group_c = VGroup(BackgroundRectangle(caption_c, fill_opacity=0.9, buff=0.16), caption_c)\n caption_group_b.set_opacity(0)\n caption_group_c.set_opacity(0)\n\n self.play(FadeIn(title), Create(axes), Create(true_graph), FadeIn(caption_group_a), run_time=4)\n self.play(LaggedStart(*[FadeIn(dot) for dot in sample_dots], lag_ratio=0.12), FadeOut(caption_group_a), FadeIn(caption_group_b), run_time=4)\n self.play(true_graph.animate.set_stroke(opacity=0.3), Create(alias_curve), FadeIn(readout), FadeOut(caption_group_b), FadeIn(caption_group_c), run_time=5)\n self.play(Indicate(alias_curve, color=ORANGE), Indicate(sample_dots, color=YELLOW_A), run_time=3)\n self.wait(3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 30-second Manim scene that explains aliasing with one high-frequency signal, evenly spaced sample dots, and a misleading smooth reconstruction that still passes through those same dots. Keep the explanation clean and uncluttered with a small readout card instead of many labels."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SamplingAliasingReadoutStory(Scene):\n def construct(self):\n def true_signal(x):\n return 1.15 * np.sin(2.7 * x)\n\n title = Text(\"The Samples Can Suggest the Wrong Wave\", font_size=34).to_edge(UP)\n axes = Axes(x_range=[0, 8, 1], y_range=[-1.6, 1.6, 0.8], x_length=8.5, y_length=4.6, tips=False).shift(DOWN * 0.2)\n true_graph = axes.plot(true_signal, x_range=[0, 8], color=BLUE_D)\n sample_xs = [0.4, 1.4, 2.4, 3.4, 4.4, 5.4, 6.4, 7.4]\n sample_points = [axes.c2p(x, true_signal(x)) for x in sample_xs]\n sample_dots = VGroup(*[Dot(point, color=YELLOW, radius=0.08) for point in sample_points])\n alias_curve = VMobject(color=ORANGE)\n alias_curve.set_points_smoothly(sample_points)\n readout_lines = VGroup(Text(\"same samples\", font_size=22, color=YELLOW_D), Text(\"different smooth story\", font_size=26, color=ORANGE), Text(\"that is aliasing\", font_size=24, color=WHITE)).arrange(DOWN, aligned_edge=LEFT, buff=0.14)\n readout = VGroup(BackgroundRectangle(readout_lines, fill_opacity=0.92, buff=0.18), readout_lines).to_corner(UR).shift(DOWN * 0.75)\n caption_a = Text(\"The blue curve is the real signal before anything gets sampled.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_b = Text(\"The yellow dots are accurate samples, but they do not uniquely determine the fast oscillation.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_c = Text(\"A slower orange curve can pass through the same dots and tell the wrong story.\", font_size=22, color=WHITE).to_edge(DOWN)\n caption_group_a = VGroup(BackgroundRectangle(caption_a, fill_opacity=0.9, buff=0.16), caption_a)\n caption_group_b = VGroup(BackgroundRectangle(caption_b, fill_opacity=0.9, buff=0.16), caption_b)\n caption_group_c = VGroup(BackgroundRectangle(caption_c, fill_opacity=0.9, buff=0.16), caption_c)\n caption_group_b.set_opacity(0)\n caption_group_c.set_opacity(0)\n\n self.play(FadeIn(title), Create(axes), Create(true_graph), FadeIn(caption_group_a), run_time=4)\n self.play(LaggedStart(*[FadeIn(dot) for dot in sample_dots], lag_ratio=0.12), FadeOut(caption_group_a), FadeIn(caption_group_b), run_time=4)\n self.play(true_graph.animate.set_stroke(opacity=0.3), Create(alias_curve), FadeIn(readout), FadeOut(caption_group_b), FadeIn(caption_group_c), run_time=5)\n self.play(Indicate(alias_curve, color=ORANGE), Indicate(sample_dots, color=YELLOW_A), run_time=3)\n self.wait(3)\n```"}]}
{"id": "autoresearch-manim_000101", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "OsmosisMembraneStory", "scene_base": "Scene", "num_animations": 6, "num_lines": 22, "has_reasoning": false, "prompt": "Create a 12-second Manim scene that explains osmosis with two compartments separated by a semipermeable membrane. Show more solute on one side, water arrows crossing toward that side, and a small rise in water level to make the direction of net flow obvious.", "code": "from manim import *\n\nclass OsmosisMembraneStory(Scene):\n def construct(self):\n title = Text('Water Moves Toward The More Concentrated Side', font_size=28).to_edge(UP)\n tank = Rectangle(width=6.6, height=3.6, color=GRAY_B).shift(DOWN * 0.05)\n membrane = DashedLine(ORIGIN + UP * 1.8 + DOWN * 0.2, ORIGIN + DOWN * 1.8 + DOWN * 0.2, color=YELLOW_D)\n left_water = Rectangle(width=3.2, height=1.45, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(LEFT * 1.65 + DOWN * 0.75)\n right_water = Rectangle(width=3.2, height=1.45, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(RIGHT * 1.65 + DOWN * 0.75)\n solute = VGroup(*[Dot(RIGHT * 1.2 + UP * y + RIGHT * 0.25 * i, color=ORANGE, radius=0.05) for i, y in enumerate([0.2, -0.15, 0.45, -0.45, 0.0, 0.6])])\n left_label = Text('lower solute', font_size=18, color=WHITE).next_to(tank.get_left() + RIGHT * 1.6 + UP * 1.55, UP, buff=0.05)\n right_label = Text('higher solute', font_size=18, color=ORANGE).next_to(tank.get_right() + LEFT * 1.6 + UP * 1.55, UP, buff=0.05)\n water_arrows = VGroup(Arrow(LEFT * 1.0, RIGHT * 0.4, buff=0.0, color=TEAL_D), Arrow(LEFT * 1.0 + DOWN * 0.35, RIGHT * 0.4 + DOWN * 0.35, buff=0.0, color=TEAL_D), Arrow(LEFT * 1.0 + UP * 0.35, RIGHT * 0.4 + UP * 0.35, buff=0.0, color=TEAL_D))\n left_final = Rectangle(width=3.2, height=1.18, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(LEFT * 1.65 + DOWN * 0.88)\n right_final = Rectangle(width=3.2, height=1.72, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(RIGHT * 1.65 + DOWN * 0.6)\n caption = Text('Net water flow crosses the membrane toward the side with more dissolved solute, raising its level.', font_size=19, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), Create(tank), Create(membrane), FadeIn(left_water), FadeIn(right_water), run_time=2.0)\n self.play(FadeIn(solute), FadeIn(left_label), FadeIn(right_label), run_time=1.4)\n self.play(LaggedStart(*[GrowArrow(arrow) for arrow in water_arrows], lag_ratio=0.14), run_time=1.7)\n self.play(ReplacementTransform(left_water, left_final), ReplacementTransform(right_water, right_final), run_time=1.8)\n self.play(FadeIn(caption_group), Indicate(right_final, color=YELLOW_A), run_time=1.4)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 12-second Manim scene that explains osmosis with two compartments separated by a semipermeable membrane. Show more solute on one side, water arrows crossing toward that side, and a small rise in water level to make the direction of net flow obvious."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass OsmosisMembraneStory(Scene):\n def construct(self):\n title = Text('Water Moves Toward The More Concentrated Side', font_size=28).to_edge(UP)\n tank = Rectangle(width=6.6, height=3.6, color=GRAY_B).shift(DOWN * 0.05)\n membrane = DashedLine(ORIGIN + UP * 1.8 + DOWN * 0.2, ORIGIN + DOWN * 1.8 + DOWN * 0.2, color=YELLOW_D)\n left_water = Rectangle(width=3.2, height=1.45, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(LEFT * 1.65 + DOWN * 0.75)\n right_water = Rectangle(width=3.2, height=1.45, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(RIGHT * 1.65 + DOWN * 0.75)\n solute = VGroup(*[Dot(RIGHT * 1.2 + UP * y + RIGHT * 0.25 * i, color=ORANGE, radius=0.05) for i, y in enumerate([0.2, -0.15, 0.45, -0.45, 0.0, 0.6])])\n left_label = Text('lower solute', font_size=18, color=WHITE).next_to(tank.get_left() + RIGHT * 1.6 + UP * 1.55, UP, buff=0.05)\n right_label = Text('higher solute', font_size=18, color=ORANGE).next_to(tank.get_right() + LEFT * 1.6 + UP * 1.55, UP, buff=0.05)\n water_arrows = VGroup(Arrow(LEFT * 1.0, RIGHT * 0.4, buff=0.0, color=TEAL_D), Arrow(LEFT * 1.0 + DOWN * 0.35, RIGHT * 0.4 + DOWN * 0.35, buff=0.0, color=TEAL_D), Arrow(LEFT * 1.0 + UP * 0.35, RIGHT * 0.4 + UP * 0.35, buff=0.0, color=TEAL_D))\n left_final = Rectangle(width=3.2, height=1.18, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(LEFT * 1.65 + DOWN * 0.88)\n right_final = Rectangle(width=3.2, height=1.72, color=BLUE_D, fill_color=BLUE_D, fill_opacity=0.32).move_to(RIGHT * 1.65 + DOWN * 0.6)\n caption = Text('Net water flow crosses the membrane toward the side with more dissolved solute, raising its level.', font_size=19, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), Create(tank), Create(membrane), FadeIn(left_water), FadeIn(right_water), run_time=2.0)\n self.play(FadeIn(solute), FadeIn(left_label), FadeIn(right_label), run_time=1.4)\n self.play(LaggedStart(*[GrowArrow(arrow) for arrow in water_arrows], lag_ratio=0.14), run_time=1.7)\n self.play(ReplacementTransform(left_water, left_final), ReplacementTransform(right_water, right_final), run_time=1.8)\n self.play(FadeIn(caption_group), Indicate(right_final, color=YELLOW_A), run_time=1.4)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000106", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "KMeansCentroidUpdateStory", "scene_base": "Scene", "num_animations": 6, "num_lines": 42, "has_reasoning": false, "prompt": "Create a 12-second Manim scene that explains one K-means update. Show two point clouds, two initial centroids, color the assignments, then move each centroid to the average of its assigned points. Add a tiny elbow chart on the right so the viewer also sees why increasing K eventually gives smaller returns.", "code": "from manim import *\n\nclass KMeansCentroidUpdateStory(Scene):\n def construct(self):\n title = Text('K-Means Reassigns Points Then Moves Centroids', font_size=28).to_edge(UP)\n left_frame = RoundedRectangle(corner_radius=0.14, width=5.5, height=4.9, color=GRAY_B).shift(LEFT * 3.0 + DOWN * 0.1)\n right_frame = RoundedRectangle(corner_radius=0.14, width=3.7, height=4.9, color=GRAY_B).shift(RIGHT * 3.55 + DOWN * 0.1)\n left_center = left_frame.get_center() + DOWN * 0.15\n left_points = VGroup(*[\n Dot(left_center + offset, color=GRAY_C, radius=0.06)\n for offset in [LEFT * 1.3 + UP * 0.8, LEFT * 1.05 + UP * 0.25, LEFT * 0.9 + DOWN * 0.2, LEFT * 1.45 + DOWN * 0.55, LEFT * 0.65 + UP * 0.55, LEFT * 0.75 + DOWN * 0.75]\n ])\n right_points = VGroup(*[\n Dot(left_center + offset, color=GRAY_C, radius=0.06)\n for offset in [RIGHT * 0.55 + UP * 0.85, RIGHT * 1.05 + UP * 0.35, RIGHT * 1.25 + DOWN * 0.2, RIGHT * 0.7 + DOWN * 0.55, RIGHT * 1.45 + UP * 0.7, RIGHT * 0.95 + DOWN * 0.8]\n ])\n centroid_a = Dot(left_center + LEFT * 0.2 + UP * 0.75, color=ORANGE, radius=0.1)\n centroid_b = Dot(left_center + RIGHT * 0.15 + DOWN * 0.25, color=TEAL_D, radius=0.1)\n centroid_a_target = Dot(left_center + LEFT * 1.0 + UP * 0.02, color=ORANGE, radius=0.1)\n centroid_b_target = Dot(left_center + RIGHT * 1.0 + UP * 0.05, color=TEAL_D, radius=0.1)\n update_arrows = VGroup(\n Arrow(centroid_a.get_center(), centroid_a_target.get_center(), buff=0.08, color=ORANGE),\n Arrow(centroid_b.get_center(), centroid_b_target.get_center(), buff=0.08, color=TEAL_D),\n )\n axes = Axes(x_range=[1, 5, 1], y_range=[0, 8, 2], x_length=2.6, y_length=2.8, tips=False).move_to(right_frame.get_center() + DOWN * 0.25)\n elbow_curve = VMobject(color=BLUE_D, stroke_width=4)\n elbow_curve.set_points_smoothly([\n axes.c2p(1, 7.2),\n axes.c2p(2, 3.9),\n axes.c2p(3, 2.4),\n axes.c2p(4, 1.75),\n ])\n elbow_dots = VGroup(*[Dot(axes.c2p(x, y), color=BLUE_D, radius=0.05) for x, y in [(1, 7.2), (2, 3.9), (3, 2.4), (4, 1.75)]])\n elbow_box = SurroundingRectangle(elbow_dots[1], color=YELLOW_D, buff=0.12)\n axis_labels = VGroup(Text('K', font_size=18, color=WHITE).next_to(axes.x_axis, DOWN, buff=0.12), Text('error', font_size=18, color=WHITE).next_to(axes.y_axis, LEFT, buff=0.12))\n caption = Text('After assignment, each centroid jumps to the average of its cluster, while the elbow chart shows that more clusters help less and less.', font_size=21, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), FadeIn(left_frame), FadeIn(right_frame), FadeIn(left_points), FadeIn(right_points), FadeIn(centroid_a), FadeIn(centroid_b), run_time=2.2)\n self.play(LaggedStart(*[point.animate.set_color(ORANGE) for point in left_points], lag_ratio=0.08), LaggedStart(*[point.animate.set_color(TEAL_D) for point in right_points], lag_ratio=0.08), run_time=1.8)\n self.play(GrowArrow(update_arrows[0]), GrowArrow(update_arrows[1]), centroid_a.animate.move_to(centroid_a_target), centroid_b.animate.move_to(centroid_b_target), run_time=2.2)\n self.play(Create(axes), FadeIn(axis_labels), Create(elbow_curve), FadeIn(elbow_dots), Create(elbow_box), run_time=2.3)\n self.play(FadeIn(caption_group), Indicate(elbow_box, color=YELLOW_A), run_time=1.5)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 12-second Manim scene that explains one K-means update. Show two point clouds, two initial centroids, color the assignments, then move each centroid to the average of its assigned points. Add a tiny elbow chart on the right so the viewer also sees why increasing K eventually gives smaller returns."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass KMeansCentroidUpdateStory(Scene):\n def construct(self):\n title = Text('K-Means Reassigns Points Then Moves Centroids', font_size=28).to_edge(UP)\n left_frame = RoundedRectangle(corner_radius=0.14, width=5.5, height=4.9, color=GRAY_B).shift(LEFT * 3.0 + DOWN * 0.1)\n right_frame = RoundedRectangle(corner_radius=0.14, width=3.7, height=4.9, color=GRAY_B).shift(RIGHT * 3.55 + DOWN * 0.1)\n left_center = left_frame.get_center() + DOWN * 0.15\n left_points = VGroup(*[\n Dot(left_center + offset, color=GRAY_C, radius=0.06)\n for offset in [LEFT * 1.3 + UP * 0.8, LEFT * 1.05 + UP * 0.25, LEFT * 0.9 + DOWN * 0.2, LEFT * 1.45 + DOWN * 0.55, LEFT * 0.65 + UP * 0.55, LEFT * 0.75 + DOWN * 0.75]\n ])\n right_points = VGroup(*[\n Dot(left_center + offset, color=GRAY_C, radius=0.06)\n for offset in [RIGHT * 0.55 + UP * 0.85, RIGHT * 1.05 + UP * 0.35, RIGHT * 1.25 + DOWN * 0.2, RIGHT * 0.7 + DOWN * 0.55, RIGHT * 1.45 + UP * 0.7, RIGHT * 0.95 + DOWN * 0.8]\n ])\n centroid_a = Dot(left_center + LEFT * 0.2 + UP * 0.75, color=ORANGE, radius=0.1)\n centroid_b = Dot(left_center + RIGHT * 0.15 + DOWN * 0.25, color=TEAL_D, radius=0.1)\n centroid_a_target = Dot(left_center + LEFT * 1.0 + UP * 0.02, color=ORANGE, radius=0.1)\n centroid_b_target = Dot(left_center + RIGHT * 1.0 + UP * 0.05, color=TEAL_D, radius=0.1)\n update_arrows = VGroup(\n Arrow(centroid_a.get_center(), centroid_a_target.get_center(), buff=0.08, color=ORANGE),\n Arrow(centroid_b.get_center(), centroid_b_target.get_center(), buff=0.08, color=TEAL_D),\n )\n axes = Axes(x_range=[1, 5, 1], y_range=[0, 8, 2], x_length=2.6, y_length=2.8, tips=False).move_to(right_frame.get_center() + DOWN * 0.25)\n elbow_curve = VMobject(color=BLUE_D, stroke_width=4)\n elbow_curve.set_points_smoothly([\n axes.c2p(1, 7.2),\n axes.c2p(2, 3.9),\n axes.c2p(3, 2.4),\n axes.c2p(4, 1.75),\n ])\n elbow_dots = VGroup(*[Dot(axes.c2p(x, y), color=BLUE_D, radius=0.05) for x, y in [(1, 7.2), (2, 3.9), (3, 2.4), (4, 1.75)]])\n elbow_box = SurroundingRectangle(elbow_dots[1], color=YELLOW_D, buff=0.12)\n axis_labels = VGroup(Text('K', font_size=18, color=WHITE).next_to(axes.x_axis, DOWN, buff=0.12), Text('error', font_size=18, color=WHITE).next_to(axes.y_axis, LEFT, buff=0.12))\n caption = Text('After assignment, each centroid jumps to the average of its cluster, while the elbow chart shows that more clusters help less and less.', font_size=21, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), FadeIn(left_frame), FadeIn(right_frame), FadeIn(left_points), FadeIn(right_points), FadeIn(centroid_a), FadeIn(centroid_b), run_time=2.2)\n self.play(LaggedStart(*[point.animate.set_color(ORANGE) for point in left_points], lag_ratio=0.08), LaggedStart(*[point.animate.set_color(TEAL_D) for point in right_points], lag_ratio=0.08), run_time=1.8)\n self.play(GrowArrow(update_arrows[0]), GrowArrow(update_arrows[1]), centroid_a.animate.move_to(centroid_a_target), centroid_b.animate.move_to(centroid_b_target), run_time=2.2)\n self.play(Create(axes), FadeIn(axis_labels), Create(elbow_curve), FadeIn(elbow_dots), Create(elbow_box), run_time=2.3)\n self.play(FadeIn(caption_group), Indicate(elbow_box, color=YELLOW_A), run_time=1.5)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000111", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "DopplerWavefrontStory", "scene_base": "Scene", "num_animations": 6, "num_lines": 22, "has_reasoning": false, "prompt": "Create a 12-second Manim scene that explains the Doppler effect for a moving source. Show a source moving to the right, with wavefront circles closer together in front and farther apart behind, and add a small caption that links the spacing change to higher versus lower observed frequency.", "code": "from manim import *\n\nclass DopplerWavefrontStory(Scene):\n def construct(self):\n title = Text('Motion Changes Wavefront Spacing', font_size=31).to_edge(UP)\n baseline = NumberLine(x_range=[0, 10, 1], length=8.2, include_numbers=False).shift(DOWN * 0.15)\n positions = [baseline.n2p(x) for x in [2.0, 3.0, 4.0, 5.0, 6.0]]\n source = Dot(positions[-1], color=ORANGE, radius=0.1)\n source_label = Text('moving source', font_size=18, color=ORANGE).next_to(source, UP, buff=0.15)\n motion_arrow = Arrow(positions[-1] + LEFT * 0.8, positions[-1] + RIGHT * 0.8, buff=0.0, color=ORANGE)\n wavefronts = VGroup(*[Circle(radius=r, color=BLUE_D, stroke_opacity=0.55).move_to(pos) for r, pos in zip([2.1, 1.7, 1.3, 0.9, 0.55], positions)])\n front_brace = BraceBetweenPoints(positions[-2] + RIGHT * 0.55 + UP * 1.35, positions[-1] + RIGHT * 0.55 + UP * 1.35, UP, color=YELLOW_D)\n back_brace = BraceBetweenPoints(positions[0] + LEFT * 0.55 + DOWN * 1.35, positions[1] + LEFT * 0.55 + DOWN * 1.35, DOWN, color=TEAL_D)\n front_label = Text('compressed', font_size=18, color=YELLOW_D).next_to(front_brace, UP, buff=0.1)\n back_label = Text('spread out', font_size=18, color=TEAL_D).next_to(back_brace, DOWN, buff=0.1)\n caption = Text('Wavefronts bunch up ahead of the source and spread out behind it, so observers measure different frequencies.', font_size=19, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), Create(baseline), run_time=1.6)\n self.play(LaggedStart(*[Create(wave) for wave in wavefronts], lag_ratio=0.1), run_time=2.3)\n self.play(FadeIn(source), FadeIn(source_label), GrowArrow(motion_arrow), run_time=1.5)\n self.play(GrowFromCenter(front_brace), FadeIn(front_label), GrowFromCenter(back_brace), FadeIn(back_label), run_time=1.6)\n self.play(FadeIn(caption_group), Indicate(front_brace, color=YELLOW_A), run_time=1.4)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 12-second Manim scene that explains the Doppler effect for a moving source. Show a source moving to the right, with wavefront circles closer together in front and farther apart behind, and add a small caption that links the spacing change to higher versus lower observed frequency."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DopplerWavefrontStory(Scene):\n def construct(self):\n title = Text('Motion Changes Wavefront Spacing', font_size=31).to_edge(UP)\n baseline = NumberLine(x_range=[0, 10, 1], length=8.2, include_numbers=False).shift(DOWN * 0.15)\n positions = [baseline.n2p(x) for x in [2.0, 3.0, 4.0, 5.0, 6.0]]\n source = Dot(positions[-1], color=ORANGE, radius=0.1)\n source_label = Text('moving source', font_size=18, color=ORANGE).next_to(source, UP, buff=0.15)\n motion_arrow = Arrow(positions[-1] + LEFT * 0.8, positions[-1] + RIGHT * 0.8, buff=0.0, color=ORANGE)\n wavefronts = VGroup(*[Circle(radius=r, color=BLUE_D, stroke_opacity=0.55).move_to(pos) for r, pos in zip([2.1, 1.7, 1.3, 0.9, 0.55], positions)])\n front_brace = BraceBetweenPoints(positions[-2] + RIGHT * 0.55 + UP * 1.35, positions[-1] + RIGHT * 0.55 + UP * 1.35, UP, color=YELLOW_D)\n back_brace = BraceBetweenPoints(positions[0] + LEFT * 0.55 + DOWN * 1.35, positions[1] + LEFT * 0.55 + DOWN * 1.35, DOWN, color=TEAL_D)\n front_label = Text('compressed', font_size=18, color=YELLOW_D).next_to(front_brace, UP, buff=0.1)\n back_label = Text('spread out', font_size=18, color=TEAL_D).next_to(back_brace, DOWN, buff=0.1)\n caption = Text('Wavefronts bunch up ahead of the source and spread out behind it, so observers measure different frequencies.', font_size=19, color=WHITE).to_edge(DOWN)\n caption_group = VGroup(BackgroundRectangle(caption, fill_opacity=0.88, buff=0.14), caption)\n\n self.play(FadeIn(title), Create(baseline), run_time=1.6)\n self.play(LaggedStart(*[Create(wave) for wave in wavefronts], lag_ratio=0.1), run_time=2.3)\n self.play(FadeIn(source), FadeIn(source_label), GrowArrow(motion_arrow), run_time=1.5)\n self.play(GrowFromCenter(front_brace), FadeIn(front_label), GrowFromCenter(back_brace), FadeIn(back_label), run_time=1.6)\n self.play(FadeIn(caption_group), Indicate(front_brace, color=YELLOW_A), run_time=1.4)\n self.wait(1)\n```"}]}
{"id": "autoresearch-manim_000116", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "RiemannErrorShrinkStory", "scene_base": "Scene", "num_animations": 5, "num_lines": 29, "has_reasoning": false, "prompt": "Create an 18-second Manim scene that explains how Riemann-sum error shrinks. Plot a smooth curve on axes, show a coarse set of rectangles, transform them into a finer set, add a brace marking one rectangle width, and display a numeric error readout that decreases.", "code": "from manim import *\n\nclass RiemannErrorShrinkStory(Scene):\n def construct(self):\n title = Text(\"Riemann error shrinks with narrower rectangles\", font_size=32).to_edge(UP)\n axes = Axes(\n x_range=[0, 4, 1],\n y_range=[0, 5, 1],\n x_length=7.0,\n y_length=4.2,\n tips=False,\n axis_config={\"include_numbers\": True},\n ).shift(DOWN * 0.25)\n\n def curve_fn(x):\n return 0.28 * (x - 1.0) ** 3 + 2.2\n\n curve = axes.plot(curve_fn, x_range=[0.25, 3.75], color=BLUE_D, stroke_width=5)\n coarse = axes.get_riemann_rectangles(curve, x_range=[0.4, 3.6], dx=0.8, color=YELLOW_D, fill_opacity=0.45)\n fine = axes.get_riemann_rectangles(curve, x_range=[0.4, 3.6], dx=0.32, color=GREEN_D, fill_opacity=0.42)\n width_brace = Brace(coarse[1], DOWN, color=YELLOW_D)\n width_label = Text(\"wide dx\", font_size=22, color=YELLOW_D).next_to(width_brace, DOWN, buff=0.12)\n error_value = DecimalNumber(0.48, num_decimal_places=2, font_size=30, color=YELLOW_D)\n error_label = Text(\"area error\", font_size=24, color=WHITE).next_to(error_value, LEFT, buff=0.15)\n error_panel = VGroup(error_label, error_value).arrange(RIGHT, buff=0.15).to_corner(UR).shift(DOWN * 0.55)\n caption = Text(\"Finer partitions track the curve more closely.\", font_size=24, color=WHITE).to_edge(DOWN)\n caption_panel = VGroup(BackgroundRectangle(caption, fill_opacity=0.86, buff=0.16), caption)\n\n self.play(FadeIn(title), Create(axes), Create(curve), run_time=3)\n self.play(FadeIn(coarse), GrowFromCenter(width_brace), FadeIn(width_label), FadeIn(error_panel), run_time=3)\n self.play(Transform(coarse, fine), FadeOut(width_brace), FadeOut(width_label), error_value.animate.set_value(0.14).set_color(GREEN_D), run_time=4)\n self.play(FadeIn(caption_panel), Indicate(coarse, color=GREEN_A), run_time=3)\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create an 18-second Manim scene that explains how Riemann-sum error shrinks. Plot a smooth curve on axes, show a coarse set of rectangles, transform them into a finer set, add a brace marking one rectangle width, and display a numeric error readout that decreases."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass RiemannErrorShrinkStory(Scene):\n def construct(self):\n title = Text(\"Riemann error shrinks with narrower rectangles\", font_size=32).to_edge(UP)\n axes = Axes(\n x_range=[0, 4, 1],\n y_range=[0, 5, 1],\n x_length=7.0,\n y_length=4.2,\n tips=False,\n axis_config={\"include_numbers\": True},\n ).shift(DOWN * 0.25)\n\n def curve_fn(x):\n return 0.28 * (x - 1.0) ** 3 + 2.2\n\n curve = axes.plot(curve_fn, x_range=[0.25, 3.75], color=BLUE_D, stroke_width=5)\n coarse = axes.get_riemann_rectangles(curve, x_range=[0.4, 3.6], dx=0.8, color=YELLOW_D, fill_opacity=0.45)\n fine = axes.get_riemann_rectangles(curve, x_range=[0.4, 3.6], dx=0.32, color=GREEN_D, fill_opacity=0.42)\n width_brace = Brace(coarse[1], DOWN, color=YELLOW_D)\n width_label = Text(\"wide dx\", font_size=22, color=YELLOW_D).next_to(width_brace, DOWN, buff=0.12)\n error_value = DecimalNumber(0.48, num_decimal_places=2, font_size=30, color=YELLOW_D)\n error_label = Text(\"area error\", font_size=24, color=WHITE).next_to(error_value, LEFT, buff=0.15)\n error_panel = VGroup(error_label, error_value).arrange(RIGHT, buff=0.15).to_corner(UR).shift(DOWN * 0.55)\n caption = Text(\"Finer partitions track the curve more closely.\", font_size=24, color=WHITE).to_edge(DOWN)\n caption_panel = VGroup(BackgroundRectangle(caption, fill_opacity=0.86, buff=0.16), caption)\n\n self.play(FadeIn(title), Create(axes), Create(curve), run_time=3)\n self.play(FadeIn(coarse), GrowFromCenter(width_brace), FadeIn(width_label), FadeIn(error_panel), run_time=3)\n self.play(Transform(coarse, fine), FadeOut(width_brace), FadeOut(width_label), error_value.animate.set_value(0.14).set_color(GREEN_D), run_time=4)\n self.play(FadeIn(caption_panel), Indicate(coarse, color=GREEN_A), run_time=3)\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000121", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "BayesPriorToPosteriorBars", "scene_base": "Scene", "num_animations": 4, "num_lines": 18, "has_reasoning": false, "prompt": "Create a 15-second Manim scene that explains a Bayesian update from prior to posterior. Show three small bar charts labeled prior, evidence, and posterior, animate one hypothesis gaining weight, and add a concise takeaway caption.", "code": "from manim import *\n\nclass BayesPriorToPosteriorBars(Scene):\n def construct(self):\n title = Text(\"Bayes update: evidence reweights beliefs\", font_size=32).to_edge(UP)\n prior = BarChart(values=[2, 2, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[BLUE_D, BLUE_D, BLUE_D])\n evidence = BarChart(values=[1, 4, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[GRAY_C, YELLOW_D, GRAY_C])\n posterior = BarChart(values=[1, 4, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[TEAL_D, GREEN_D, TEAL_D])\n charts = VGroup(prior, evidence, posterior).arrange(RIGHT, buff=0.75).shift(DOWN * 0.05)\n labels = VGroup(Text(\"prior\", font_size=24), Text(\"evidence\", font_size=24), Text(\"posterior\", font_size=24)).arrange(RIGHT, buff=1.45).next_to(charts, UP, buff=0.18)\n arrows = VGroup(Arrow(prior.get_right(), evidence.get_left(), buff=0.15), Arrow(evidence.get_right(), posterior.get_left(), buff=0.15))\n focus = SurroundingRectangle(posterior.bars[1], color=YELLOW_D, buff=0.06)\n caption_a = Text(\"Start with equal belief across three hypotheses.\", font_size=23, color=WHITE).to_edge(DOWN)\n caption_b = Text(\"Evidence makes hypothesis B more plausible.\", font_size=23, color=WHITE).to_edge(DOWN)\n formula = MathTex(r\"posterior \\propto prior \\times evidence\", font_size=30).next_to(title, DOWN, buff=0.22)\n\n self.play(FadeIn(title), FadeIn(formula), FadeIn(prior), FadeIn(labels[0]), FadeIn(caption_a), run_time=3)\n self.play(GrowArrow(arrows[0]), FadeIn(evidence), FadeIn(labels[1]), ReplacementTransform(caption_a, caption_b), run_time=4)\n self.play(GrowArrow(arrows[1]), FadeIn(posterior), FadeIn(labels[2]), Create(focus), run_time=4)\n self.wait(4)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 15-second Manim scene that explains a Bayesian update from prior to posterior. Show three small bar charts labeled prior, evidence, and posterior, animate one hypothesis gaining weight, and add a concise takeaway caption."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass BayesPriorToPosteriorBars(Scene):\n def construct(self):\n title = Text(\"Bayes update: evidence reweights beliefs\", font_size=32).to_edge(UP)\n prior = BarChart(values=[2, 2, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[BLUE_D, BLUE_D, BLUE_D])\n evidence = BarChart(values=[1, 4, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[GRAY_C, YELLOW_D, GRAY_C])\n posterior = BarChart(values=[1, 4, 2], bar_names=[\"A\", \"B\", \"C\"], y_range=[0, 5, 1], y_length=2.5, x_length=2.2, bar_colors=[TEAL_D, GREEN_D, TEAL_D])\n charts = VGroup(prior, evidence, posterior).arrange(RIGHT, buff=0.75).shift(DOWN * 0.05)\n labels = VGroup(Text(\"prior\", font_size=24), Text(\"evidence\", font_size=24), Text(\"posterior\", font_size=24)).arrange(RIGHT, buff=1.45).next_to(charts, UP, buff=0.18)\n arrows = VGroup(Arrow(prior.get_right(), evidence.get_left(), buff=0.15), Arrow(evidence.get_right(), posterior.get_left(), buff=0.15))\n focus = SurroundingRectangle(posterior.bars[1], color=YELLOW_D, buff=0.06)\n caption_a = Text(\"Start with equal belief across three hypotheses.\", font_size=23, color=WHITE).to_edge(DOWN)\n caption_b = Text(\"Evidence makes hypothesis B more plausible.\", font_size=23, color=WHITE).to_edge(DOWN)\n formula = MathTex(r\"posterior \\propto prior \\times evidence\", font_size=30).next_to(title, DOWN, buff=0.22)\n\n self.play(FadeIn(title), FadeIn(formula), FadeIn(prior), FadeIn(labels[0]), FadeIn(caption_a), run_time=3)\n self.play(GrowArrow(arrows[0]), FadeIn(evidence), FadeIn(labels[1]), ReplacementTransform(caption_a, caption_b), run_time=4)\n self.play(GrowArrow(arrows[1]), FadeIn(posterior), FadeIn(labels[2]), Create(focus), run_time=4)\n self.wait(4)\n```"}]}
{"id": "autoresearch-manim_000126", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "FeedbackErrorShrinks", "scene_base": "Scene", "num_animations": 8, "num_lines": 33, "has_reasoning": false, "prompt": "Create a 15-second Manim scene explaining negative feedback. Put a setpoint and a moving output on a number line, show a live error segment and numeric readout, and animate the output approaching and briefly overshooting the setpoint before settling. Emphasize that feedback acts on error.", "code": "from manim import *\n\nclass FeedbackErrorShrinks(Scene):\n def construct(self):\n title = Text(\"Negative feedback acts on the error\", font_size=38).to_edge(UP)\n line = NumberLine(x_range=[0, 10, 1], length=9, include_numbers=True).shift(DOWN * 0.2)\n setpoint = 8.0\n tracker = ValueTracker(2.0)\n target_mark = Triangle(color=YELLOW, fill_opacity=1).scale(0.18).rotate(PI).next_to(line.n2p(setpoint), UP, buff=0.05)\n target_label = Text(\"setpoint\", font_size=23, color=YELLOW).next_to(target_mark, UP, buff=0.1)\n output_dot = always_redraw(lambda: Dot(line.n2p(tracker.get_value()), color=BLUE_B, radius=0.12))\n error_line = always_redraw(lambda: Line(\n line.n2p(tracker.get_value()) + DOWN * 0.55,\n line.n2p(setpoint) + DOWN * 0.55,\n color=RED if abs(setpoint - tracker.get_value()) > 0.25 else GREEN,\n stroke_width=7,\n ))\n error_label = Text(\"error =\", font_size=24).to_edge(DOWN).shift(LEFT * 0.4)\n error_number = DecimalNumber(setpoint - tracker.get_value(), num_decimal_places=1, font_size=24)\n error_number.next_to(error_label, RIGHT, buff=0.15)\n error_number.add_updater(lambda number: number.set_value(setpoint - tracker.get_value()))\n feedback_arrow = CurvedArrow(RIGHT * 3 + DOWN * 1.25, LEFT * 3 + DOWN * 1.25, angle=-TAU / 5, color=TEAL_B)\n feedback_label = Text(\"measure → compare → correct\", font_size=23, color=TEAL_B).next_to(feedback_arrow, DOWN)\n\n self.play(Write(title), Create(line), FadeIn(target_mark, target_label, output_dot, error_line, error_label, error_number))\n self.play(Create(feedback_arrow), FadeIn(feedback_label))\n self.play(tracker.animate.set_value(6.0), run_time=2)\n self.play(tracker.animate.set_value(7.6), run_time=1.5)\n overshoot = Text(\"too much correction can overshoot\", font_size=23, color=ORANGE).to_edge(DOWN)\n error_number.clear_updaters()\n self.play(FadeOut(error_label, error_number), tracker.animate.set_value(8.5), FadeIn(overshoot), run_time=1.4)\n self.play(tracker.animate.set_value(8.0), run_time=1.5)\n settled = Text(\"settled: measured error is zero\", font_size=24, color=GREEN).to_edge(DOWN)\n self.play(ReplacementTransform(overshoot, settled), Indicate(target_mark, color=GREEN))\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 15-second Manim scene explaining negative feedback. Put a setpoint and a moving output on a number line, show a live error segment and numeric readout, and animate the output approaching and briefly overshooting the setpoint before settling. Emphasize that feedback acts on error."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass FeedbackErrorShrinks(Scene):\n def construct(self):\n title = Text(\"Negative feedback acts on the error\", font_size=38).to_edge(UP)\n line = NumberLine(x_range=[0, 10, 1], length=9, include_numbers=True).shift(DOWN * 0.2)\n setpoint = 8.0\n tracker = ValueTracker(2.0)\n target_mark = Triangle(color=YELLOW, fill_opacity=1).scale(0.18).rotate(PI).next_to(line.n2p(setpoint), UP, buff=0.05)\n target_label = Text(\"setpoint\", font_size=23, color=YELLOW).next_to(target_mark, UP, buff=0.1)\n output_dot = always_redraw(lambda: Dot(line.n2p(tracker.get_value()), color=BLUE_B, radius=0.12))\n error_line = always_redraw(lambda: Line(\n line.n2p(tracker.get_value()) + DOWN * 0.55,\n line.n2p(setpoint) + DOWN * 0.55,\n color=RED if abs(setpoint - tracker.get_value()) > 0.25 else GREEN,\n stroke_width=7,\n ))\n error_label = Text(\"error =\", font_size=24).to_edge(DOWN).shift(LEFT * 0.4)\n error_number = DecimalNumber(setpoint - tracker.get_value(), num_decimal_places=1, font_size=24)\n error_number.next_to(error_label, RIGHT, buff=0.15)\n error_number.add_updater(lambda number: number.set_value(setpoint - tracker.get_value()))\n feedback_arrow = CurvedArrow(RIGHT * 3 + DOWN * 1.25, LEFT * 3 + DOWN * 1.25, angle=-TAU / 5, color=TEAL_B)\n feedback_label = Text(\"measure → compare → correct\", font_size=23, color=TEAL_B).next_to(feedback_arrow, DOWN)\n\n self.play(Write(title), Create(line), FadeIn(target_mark, target_label, output_dot, error_line, error_label, error_number))\n self.play(Create(feedback_arrow), FadeIn(feedback_label))\n self.play(tracker.animate.set_value(6.0), run_time=2)\n self.play(tracker.animate.set_value(7.6), run_time=1.5)\n overshoot = Text(\"too much correction can overshoot\", font_size=23, color=ORANGE).to_edge(DOWN)\n error_number.clear_updaters()\n self.play(FadeOut(error_label, error_number), tracker.animate.set_value(8.5), FadeIn(overshoot), run_time=1.4)\n self.play(tracker.animate.set_value(8.0), run_time=1.5)\n settled = Text(\"settled: measured error is zero\", font_size=24, color=GREEN).to_edge(DOWN)\n self.play(ReplacementTransform(overshoot, settled), Indicate(target_mark, color=GREEN))\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000131", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ExoplanetTransitCurve", "scene_base": "Scene", "num_animations": 6, "num_lines": 22, "has_reasoning": false, "prompt": "Create a 15-second astronomy explainer showing how an exoplanet transit produces a dip in a star's measured brightness. Animate a planet crossing the star while a synchronized probe moves along a light curve, and clarify that transit depth measures blocked light rather than the planet emitting less light.", "code": "from manim import *\n\nclass ExoplanetTransitCurve(Scene):\n def construct(self):\n title = Text(\"A transit blocks a small fraction of starlight\", font_size=36).to_edge(UP)\n star = Circle(radius=0.9, color=YELLOW, fill_color=YELLOW, fill_opacity=0.85).shift(LEFT * 3 + UP * 1.15)\n glow = Circle(radius=1.1, color=YELLOW, stroke_opacity=0.35).move_to(star)\n planet = Dot(star.get_left() + LEFT * 1.2, radius=0.18, color=BLUE_E)\n transit_path = Line(star.get_left() + LEFT * 1.2, star.get_right() + RIGHT * 1.2)\n axes = Axes(x_range=[0, 10, 2], y_range=[0.96, 1.01, 0.01], x_length=7.5, y_length=2.35, tips=False).shift(DOWN * 1.65)\n labels = axes.get_axis_labels(Text(\"time\", font_size=20), Text(\"brightness\", font_size=20))\n curve = axes.plot(lambda t: 1 - 0.035 * np.exp(-((t - 5) / 1.25) ** 4), x_range=[0, 10], color=TEAL_B)\n probe = Dot(axes.i2gp(0, curve), color=ORANGE, radius=0.09)\n baseline = DashedLine(axes.c2p(0, 1), axes.c2p(10, 1), color=GRAY_B)\n caption = Text(\"The dip is blocked light—not light emitted by the planet.\", font_size=23).to_edge(DOWN)\n\n self.play(Write(title), FadeIn(star, glow, planet), Create(axes), FadeIn(labels))\n self.play(Create(baseline), Create(curve), FadeIn(probe))\n self.play(MoveAlongPath(planet, transit_path), MoveAlongPath(probe, curve), run_time=4, rate_func=linear)\n depth = DoubleArrow(axes.c2p(5, 1), axes.c2p(5, 0.965), color=ORANGE, buff=0)\n depth_label = Text(\"transit depth\", font_size=20, color=ORANGE).next_to(depth, RIGHT)\n self.play(GrowFromCenter(depth), FadeIn(depth_label))\n self.play(FadeIn(caption), Indicate(star, color=YELLOW))\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 15-second astronomy explainer showing how an exoplanet transit produces a dip in a star's measured brightness. Animate a planet crossing the star while a synchronized probe moves along a light curve, and clarify that transit depth measures blocked light rather than the planet emitting less light."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExoplanetTransitCurve(Scene):\n def construct(self):\n title = Text(\"A transit blocks a small fraction of starlight\", font_size=36).to_edge(UP)\n star = Circle(radius=0.9, color=YELLOW, fill_color=YELLOW, fill_opacity=0.85).shift(LEFT * 3 + UP * 1.15)\n glow = Circle(radius=1.1, color=YELLOW, stroke_opacity=0.35).move_to(star)\n planet = Dot(star.get_left() + LEFT * 1.2, radius=0.18, color=BLUE_E)\n transit_path = Line(star.get_left() + LEFT * 1.2, star.get_right() + RIGHT * 1.2)\n axes = Axes(x_range=[0, 10, 2], y_range=[0.96, 1.01, 0.01], x_length=7.5, y_length=2.35, tips=False).shift(DOWN * 1.65)\n labels = axes.get_axis_labels(Text(\"time\", font_size=20), Text(\"brightness\", font_size=20))\n curve = axes.plot(lambda t: 1 - 0.035 * np.exp(-((t - 5) / 1.25) ** 4), x_range=[0, 10], color=TEAL_B)\n probe = Dot(axes.i2gp(0, curve), color=ORANGE, radius=0.09)\n baseline = DashedLine(axes.c2p(0, 1), axes.c2p(10, 1), color=GRAY_B)\n caption = Text(\"The dip is blocked light—not light emitted by the planet.\", font_size=23).to_edge(DOWN)\n\n self.play(Write(title), FadeIn(star, glow, planet), Create(axes), FadeIn(labels))\n self.play(Create(baseline), Create(curve), FadeIn(probe))\n self.play(MoveAlongPath(planet, transit_path), MoveAlongPath(probe, curve), run_time=4, rate_func=linear)\n depth = DoubleArrow(axes.c2p(5, 1), axes.c2p(5, 0.965), color=ORANGE, buff=0)\n depth_label = Text(\"transit depth\", font_size=20, color=ORANGE).next_to(depth, RIGHT)\n self.play(GrowFromCenter(depth), FadeIn(depth_label))\n self.play(FadeIn(caption), Indicate(star, color=YELLOW))\n self.wait(2)\n```"}]}
{"id": "autoresearch-manim_000136", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "HashAvalanche", "scene_base": "Scene", "num_animations": 7, "num_lines": 40, "has_reasoning": false, "prompt": "Create a 12-second cybersecurity scene illustrating the avalanche effect of a cryptographic hash. Compare two input bit strings differing by one bit and reveal two very different illustrative output grids. Explicitly state that a hash is not encryption and the displayed bits are illustrative.", "code": "from manim import *\n\nclass HashAvalanche(Scene):\n def construct(self):\n self.camera.background_color = \"#F5F7FA\"\n ink = \"#1F2933\"\n title = Text(\"One input-bit change can flip many hash-output bits\", font_size=34, color=ink).to_edge(UP)\n inputs = VGroup(\n Text(\"10110010\", font=\"Monospace\", font_size=30, color=BLUE_D),\n Text(\"10110011\", font=\"Monospace\", font_size=30, color=ORANGE),\n ).arrange(DOWN, buff=1.2).shift(LEFT * 4)\n one_bit = SurroundingRectangle(VGroup(inputs[0][-1], inputs[1][-1]), color=RED, buff=0.12)\n hash_boxes = VGroup(*[\n VGroup(RoundedRectangle(width=1.5, height=0.65, corner_radius=0.12, color=ink), Text(\"HASH\", font_size=23, color=ink))\n for _ in range(2)\n ]).arrange(DOWN, buff=1.1).shift(LEFT * 1.2)\n patterns = [\n [1,0,1,1,0,0,1,0, 0,1,0,1,1,0,0,1],\n [0,1,0,0,1,1,1,1, 1,0,1,0,0,1,1,0],\n ]\n grids = VGroup()\n for row_index, bits in enumerate(patterns):\n cells = VGroup(*[\n Square(side_length=0.29, stroke_width=1.2, stroke_color=ink, fill_opacity=0.9, fill_color=TEAL_D if bit else GRAY_B)\n for bit in bits\n ]).arrange_in_grid(rows=2, cols=8, buff=0.04).shift(RIGHT * 3 + (UP if row_index == 0 else DOWN) * 1.05)\n grids.add(cells)\n arrows = VGroup(*[\n Arrow(inputs[i].get_right(), hash_boxes[i].get_left(), color=ink, buff=0.2)\n for i in range(2)\n ], *[\n Arrow(hash_boxes[i].get_right(), grids[i].get_left(), color=ink, buff=0.2)\n for i in range(2)\n ])\n caveat = Text(\"Illustrative bits: a hash is one-way compression, not encryption.\", font_size=23, color=ink).to_edge(DOWN)\n\n self.play(FadeIn(title, inputs, hash_boxes), Create(arrows))\n self.play(Create(one_bit), Indicate(one_bit, color=RED))\n self.play(LaggedStart(*[FadeIn(cell) for cell in grids[0]], lag_ratio=0.04))\n self.play(LaggedStart(*[FadeIn(cell) for cell in grids[1]], lag_ratio=0.04))\n self.play(Circumscribe(grids, color=ORANGE), FadeIn(caveat))\n self.wait(3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 12-second cybersecurity scene illustrating the avalanche effect of a cryptographic hash. Compare two input bit strings differing by one bit and reveal two very different illustrative output grids. Explicitly state that a hash is not encryption and the displayed bits are illustrative."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass HashAvalanche(Scene):\n def construct(self):\n self.camera.background_color = \"#F5F7FA\"\n ink = \"#1F2933\"\n title = Text(\"One input-bit change can flip many hash-output bits\", font_size=34, color=ink).to_edge(UP)\n inputs = VGroup(\n Text(\"10110010\", font=\"Monospace\", font_size=30, color=BLUE_D),\n Text(\"10110011\", font=\"Monospace\", font_size=30, color=ORANGE),\n ).arrange(DOWN, buff=1.2).shift(LEFT * 4)\n one_bit = SurroundingRectangle(VGroup(inputs[0][-1], inputs[1][-1]), color=RED, buff=0.12)\n hash_boxes = VGroup(*[\n VGroup(RoundedRectangle(width=1.5, height=0.65, corner_radius=0.12, color=ink), Text(\"HASH\", font_size=23, color=ink))\n for _ in range(2)\n ]).arrange(DOWN, buff=1.1).shift(LEFT * 1.2)\n patterns = [\n [1,0,1,1,0,0,1,0, 0,1,0,1,1,0,0,1],\n [0,1,0,0,1,1,1,1, 1,0,1,0,0,1,1,0],\n ]\n grids = VGroup()\n for row_index, bits in enumerate(patterns):\n cells = VGroup(*[\n Square(side_length=0.29, stroke_width=1.2, stroke_color=ink, fill_opacity=0.9, fill_color=TEAL_D if bit else GRAY_B)\n for bit in bits\n ]).arrange_in_grid(rows=2, cols=8, buff=0.04).shift(RIGHT * 3 + (UP if row_index == 0 else DOWN) * 1.05)\n grids.add(cells)\n arrows = VGroup(*[\n Arrow(inputs[i].get_right(), hash_boxes[i].get_left(), color=ink, buff=0.2)\n for i in range(2)\n ], *[\n Arrow(hash_boxes[i].get_right(), grids[i].get_left(), color=ink, buff=0.2)\n for i in range(2)\n ])\n caveat = Text(\"Illustrative bits: a hash is one-way compression, not encryption.\", font_size=23, color=ink).to_edge(DOWN)\n\n self.play(FadeIn(title, inputs, hash_boxes), Create(arrows))\n self.play(Create(one_bit), Indicate(one_bit, color=RED))\n self.play(LaggedStart(*[FadeIn(cell) for cell in grids[0]], lag_ratio=0.04))\n self.play(LaggedStart(*[FadeIn(cell) for cell in grids[1]], lag_ratio=0.04))\n self.play(Circumscribe(grids, color=ORANGE), FadeIn(caveat))\n self.wait(3)\n```"}]}
{"id": "autoresearch-manim_000141", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "ComparativeAdvantageStory", "scene_base": "Scene", "num_animations": 11, "num_lines": 37, "has_reasoning": false, "prompt": "Create a 25-second multi-beat economics explainer for comparative advantage. Compare two producers' daily output of bread and cloth, derive each opportunity cost, then allocate production according to lower opportunity cost. Make clear that comparative advantage depends on opportunity cost, not who is absolutely best at everything.", "code": "from manim import *\n\nclass ComparativeAdvantageStory(Scene):\n def construct(self):\n self.camera.background_color = \"#F8F8F6\"\n ink = \"#222222\"\n title = Text(\"Comparative advantage follows lower opportunity cost\", font_size=35, color=ink).to_edge(UP)\n table = Table(\n [[\"8\", \"4\"], [\"6\", \"2\"]],\n row_labels=[Text(\"Producer A\", font_size=22), Text(\"Producer B\", font_size=22)],\n col_labels=[Text(\"bread/day\", font_size=22), Text(\"cloth/day\", font_size=22)],\n include_outer_lines=True,\n ).scale(0.68).shift(UP * 0.35).set_color(ink)\n productivity = Text(\"Beat 1 · productivity\", font_size=21, color=BLUE_D).move_to(LEFT * 4.4 + UP * 2.55)\n absolute = Text(\"A can produce more of both goods\", font_size=23, color=ink).next_to(table, DOWN, buff=0.25)\n costs = VGroup(\n Text(\"A: 1 bread = 0.5 cloth | 1 cloth = 2 bread\", font_size=21, color=BLUE_D),\n Text(\"B: 1 bread = ⅓ cloth | 1 cloth = 3 bread\", font_size=21, color=TEAL_D),\n ).arrange(DOWN, aligned_edge=LEFT, buff=0.25).shift(DOWN * 2.1)\n cost_label = Text(\"Beat 2 · opportunity costs\", font_size=21, color=ORANGE).move_to(LEFT * 4.4 + UP * 2.55)\n specialize = VGroup(\n VGroup(RoundedRectangle(width=2.8, height=0.9, corner_radius=0.12, color=BLUE_D), Text(\"A → cloth\", font_size=27, color=ink)),\n VGroup(RoundedRectangle(width=2.8, height=0.9, corner_radius=0.12, color=TEAL_D), Text(\"B → bread\", font_size=27, color=ink)),\n ).arrange(RIGHT, buff=1.0).shift(DOWN * 0.5)\n result_label = Text(\"Beat 3 · specialize by relative cost\", font_size=21, color=GREEN_D).move_to(LEFT * 4.4 + UP * 2.55)\n question = Text(\"Who gives up less of the alternative?\", font_size=27, color=ORANGE).shift(DOWN * 0.4)\n boundary = Text(\"It is relative sacrifice—not absolute output—that decides.\", font_size=24, color=ink).to_edge(DOWN)\n\n self.play(FadeIn(title, productivity, absolute), Create(table), run_time=2)\n self.wait(2)\n self.play(ReplacementTransform(productivity, cost_label), FadeOut(absolute), table.animate.shift(UP * 0.7).scale(0.86))\n self.play(LaggedStart(*[FadeIn(line, shift=UP * 0.2) for line in costs], lag_ratio=0.4), run_time=3)\n self.play(Indicate(costs[1], color=TEAL_D), Indicate(costs[0], color=BLUE_D))\n self.wait(2)\n self.play(FadeOut(table, costs), ReplacementTransform(cost_label, result_label), FadeIn(question))\n self.play(LaggedStart(*[FadeIn(card) for card in specialize], lag_ratio=0.35), FadeOut(question), run_time=2.5)\n self.play(Circumscribe(specialize[0], color=BLUE_D), Circumscribe(specialize[1], color=TEAL_D))\n self.play(FadeIn(boundary))\n self.wait(4)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 25-second multi-beat economics explainer for comparative advantage. Compare two producers' daily output of bread and cloth, derive each opportunity cost, then allocate production according to lower opportunity cost. Make clear that comparative advantage depends on opportunity cost, not who is absolutely best at everything."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ComparativeAdvantageStory(Scene):\n def construct(self):\n self.camera.background_color = \"#F8F8F6\"\n ink = \"#222222\"\n title = Text(\"Comparative advantage follows lower opportunity cost\", font_size=35, color=ink).to_edge(UP)\n table = Table(\n [[\"8\", \"4\"], [\"6\", \"2\"]],\n row_labels=[Text(\"Producer A\", font_size=22), Text(\"Producer B\", font_size=22)],\n col_labels=[Text(\"bread/day\", font_size=22), Text(\"cloth/day\", font_size=22)],\n include_outer_lines=True,\n ).scale(0.68).shift(UP * 0.35).set_color(ink)\n productivity = Text(\"Beat 1 · productivity\", font_size=21, color=BLUE_D).move_to(LEFT * 4.4 + UP * 2.55)\n absolute = Text(\"A can produce more of both goods\", font_size=23, color=ink).next_to(table, DOWN, buff=0.25)\n costs = VGroup(\n Text(\"A: 1 bread = 0.5 cloth | 1 cloth = 2 bread\", font_size=21, color=BLUE_D),\n Text(\"B: 1 bread = ⅓ cloth | 1 cloth = 3 bread\", font_size=21, color=TEAL_D),\n ).arrange(DOWN, aligned_edge=LEFT, buff=0.25).shift(DOWN * 2.1)\n cost_label = Text(\"Beat 2 · opportunity costs\", font_size=21, color=ORANGE).move_to(LEFT * 4.4 + UP * 2.55)\n specialize = VGroup(\n VGroup(RoundedRectangle(width=2.8, height=0.9, corner_radius=0.12, color=BLUE_D), Text(\"A → cloth\", font_size=27, color=ink)),\n VGroup(RoundedRectangle(width=2.8, height=0.9, corner_radius=0.12, color=TEAL_D), Text(\"B → bread\", font_size=27, color=ink)),\n ).arrange(RIGHT, buff=1.0).shift(DOWN * 0.5)\n result_label = Text(\"Beat 3 · specialize by relative cost\", font_size=21, color=GREEN_D).move_to(LEFT * 4.4 + UP * 2.55)\n question = Text(\"Who gives up less of the alternative?\", font_size=27, color=ORANGE).shift(DOWN * 0.4)\n boundary = Text(\"It is relative sacrifice—not absolute output—that decides.\", font_size=24, color=ink).to_edge(DOWN)\n\n self.play(FadeIn(title, productivity, absolute), Create(table), run_time=2)\n self.wait(2)\n self.play(ReplacementTransform(productivity, cost_label), FadeOut(absolute), table.animate.shift(UP * 0.7).scale(0.86))\n self.play(LaggedStart(*[FadeIn(line, shift=UP * 0.2) for line in costs], lag_ratio=0.4), run_time=3)\n self.play(Indicate(costs[1], color=TEAL_D), Indicate(costs[0], color=BLUE_D))\n self.wait(2)\n self.play(FadeOut(table, costs), ReplacementTransform(cost_label, result_label), FadeIn(question))\n self.play(LaggedStart(*[FadeIn(card) for card in specialize], lag_ratio=0.35), FadeOut(question), run_time=2.5)\n self.play(Circumscribe(specialize[0], color=BLUE_D), Circumscribe(specialize[1], color=TEAL_D))\n self.play(FadeIn(boundary))\n self.wait(4)\n```"}]}
{"id": "autoresearch-manim_000146", "source": "sebastianboehler/autoresearch-manim", "tier": 1, "scene_name": "AntibioticSelectionStory", "scene_base": "Scene", "num_animations": 8, "num_lines": 35, "has_reasoning": false, "prompt": "Create a 25-second multi-beat microbiology explainer showing natural selection during antibiotic treatment. Begin with a mixed population containing a few resistant cells, apply treatment that removes susceptible cells, then show resistant survivors reproducing. Explicitly state that treatment selects pre-existing resistance rather than teaching individual cells to adapt.", "code": "from manim import *\n\nclass AntibioticSelectionStory(Scene):\n def construct(self):\n title = Text(\"Treatment selects resistance already present\", font_size=37).to_edge(UP)\n dish = Circle(radius=2.5, color=GRAY_B)\n susceptible_positions = [\n (-1.5,1.2),(-0.7,1.5),(0.2,1.4),(1.2,1.0),(-1.7,0.3),(-0.8,0.4),\n (0.1,0.5),(1.4,0.2),(-1.4,-0.8),(-0.4,-1.2),(0.6,-0.8),(1.4,-1.1)\n ]\n resistant_positions = [(-0.1,-0.2),(0.9,1.1)]\n susceptible = VGroup(*[Dot([x,y,0], color=BLUE_B, radius=0.13) for x,y in susceptible_positions])\n resistant = VGroup(*[Dot([x,y,0], color=RED, radius=0.14) for x,y in resistant_positions])\n legend = VGroup(\n VGroup(Dot(color=BLUE_B), Text(\"susceptible\", font_size=21)).arrange(RIGHT),\n VGroup(Dot(color=RED), Text(\"resistant before treatment\", font_size=21)).arrange(RIGHT),\n ).arrange(DOWN, aligned_edge=LEFT).to_edge(RIGHT)\n beat1 = Text(\"Beat 1 · variation exists before exposure\", font_size=24).to_edge(DOWN)\n treatment = Rectangle(width=5.2, height=0.35, color=YELLOW, fill_opacity=0.45).shift(UP * 2.8)\n beat2 = Text(\"Beat 2 · treatment removes susceptible cells\", font_size=24, color=YELLOW).to_edge(DOWN)\n beat3 = Text(\"Beat 3 · survivors reproduce, so resistance becomes common\", font_size=23, color=RED).to_edge(DOWN)\n caveat = Text(\"Selection changes the population; it does not train each cell.\", font_size=23).to_edge(DOWN)\n\n self.play(Write(title), Create(dish), FadeIn(susceptible, resistant, legend, beat1))\n self.wait(4)\n self.play(ReplacementTransform(beat1, beat2), treatment.animate.shift(DOWN * 5.6), run_time=2.5)\n self.play(FadeOut(susceptible, treatment), Indicate(resistant, color=RED))\n self.wait(4)\n offspring = VGroup(*[\n resistant[index % 2].copy().shift(offset)\n for index, offset in enumerate((LEFT, RIGHT, UP, DOWN, UL, DR))\n ])\n self.play(ReplacementTransform(beat2, beat3), LaggedStart(*[\n TransformFromCopy(resistant[index % 2], child) for index, child in enumerate(offspring)\n ], lag_ratio=0.25), run_time=3)\n self.play(ReplacementTransform(beat3, caveat), Circumscribe(VGroup(resistant, offspring), color=RED))\n self.wait(3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Create a 25-second multi-beat microbiology explainer showing natural selection during antibiotic treatment. Begin with a mixed population containing a few resistant cells, apply treatment that removes susceptible cells, then show resistant survivors reproducing. Explicitly state that treatment selects pre-existing resistance rather than teaching individual cells to adapt."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AntibioticSelectionStory(Scene):\n def construct(self):\n title = Text(\"Treatment selects resistance already present\", font_size=37).to_edge(UP)\n dish = Circle(radius=2.5, color=GRAY_B)\n susceptible_positions = [\n (-1.5,1.2),(-0.7,1.5),(0.2,1.4),(1.2,1.0),(-1.7,0.3),(-0.8,0.4),\n (0.1,0.5),(1.4,0.2),(-1.4,-0.8),(-0.4,-1.2),(0.6,-0.8),(1.4,-1.1)\n ]\n resistant_positions = [(-0.1,-0.2),(0.9,1.1)]\n susceptible = VGroup(*[Dot([x,y,0], color=BLUE_B, radius=0.13) for x,y in susceptible_positions])\n resistant = VGroup(*[Dot([x,y,0], color=RED, radius=0.14) for x,y in resistant_positions])\n legend = VGroup(\n VGroup(Dot(color=BLUE_B), Text(\"susceptible\", font_size=21)).arrange(RIGHT),\n VGroup(Dot(color=RED), Text(\"resistant before treatment\", font_size=21)).arrange(RIGHT),\n ).arrange(DOWN, aligned_edge=LEFT).to_edge(RIGHT)\n beat1 = Text(\"Beat 1 · variation exists before exposure\", font_size=24).to_edge(DOWN)\n treatment = Rectangle(width=5.2, height=0.35, color=YELLOW, fill_opacity=0.45).shift(UP * 2.8)\n beat2 = Text(\"Beat 2 · treatment removes susceptible cells\", font_size=24, color=YELLOW).to_edge(DOWN)\n beat3 = Text(\"Beat 3 · survivors reproduce, so resistance becomes common\", font_size=23, color=RED).to_edge(DOWN)\n caveat = Text(\"Selection changes the population; it does not train each cell.\", font_size=23).to_edge(DOWN)\n\n self.play(Write(title), Create(dish), FadeIn(susceptible, resistant, legend, beat1))\n self.wait(4)\n self.play(ReplacementTransform(beat1, beat2), treatment.animate.shift(DOWN * 5.6), run_time=2.5)\n self.play(FadeOut(susceptible, treatment), Indicate(resistant, color=RED))\n self.wait(4)\n offspring = VGroup(*[\n resistant[index % 2].copy().shift(offset)\n for index, offset in enumerate((LEFT, RIGHT, UP, DOWN, UL, DR))\n ])\n self.play(ReplacementTransform(beat2, beat3), LaggedStart(*[\n TransformFromCopy(resistant[index % 2], child) for index, child in enumerate(offspring)\n ], lag_ratio=0.25), run_time=3)\n self.play(ReplacementTransform(beat3, caveat), Circumscribe(VGroup(resistant, offspring), color=RED))\n self.wait(3)\n```"}]}
{"id": "ManimBench-v1_000001", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ThreeDCameraIllusionRotation", "scene_base": "ThreeDScene", "num_animations": 2, "num_lines": 10, "has_reasoning": false, "prompt": "Display 3D axes and a circle. Set the camera orientation to a specific angle. Begin rotating the camera around 3D space of the scene at a fast rate to create an illusion effect of the 3D space. Stop the camera rotation after a quarter turn.", "code": "from manim import *\n\nclass ThreeDCameraIllusionRotation(ThreeDScene):\n def construct(self):\n axes = ThreeDAxes()\n circle=Circle()\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n self.add(circle,axes)\n self.begin_3dillusion_camera_rotation(rate=2)\n self.wait(PI/2)\n self.stop_3dillusion_camera_rotation()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display 3D axes and a circle. Set the camera orientation to a specific angle. Begin rotating the camera around 3D space of the scene at a fast rate to create an illusion effect of the 3D space. Stop the camera rotation after a quarter turn."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ThreeDCameraIllusionRotation(ThreeDScene):\n def construct(self):\n axes = ThreeDAxes()\n circle=Circle()\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n self.add(circle,axes)\n self.begin_3dillusion_camera_rotation(rate=2)\n self.wait(PI/2)\n self.stop_3dillusion_camera_rotation()\n```"}]}
{"id": "ManimBench-v1_000009", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "LineGradientExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a thick parametric sine curve and a version of the same curve shifted upward, with its color smoothly transitioning from blue to red along its length. The gradient visually emphasizes the direction and flow of the curve.", "code": "from manim import *\n\nclass LineGradientExample(Scene):\n def construct(self):\n curve = ParametricFunction(lambda t: [t, np.sin(t), 0], t_range=[-PI, PI, 0.01], stroke_width=10)\n new_curve = CurvesAsSubmobjects(curve)\n new_curve.set_color_by_gradient(BLUE, RED)\n self.add(new_curve.shift(UP), curve)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a thick parametric sine curve and a version of the same curve shifted upward, with its color smoothly transitioning from blue to red along its length. The gradient visually emphasizes the direction and flow of the curve."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LineGradientExample(Scene):\n def construct(self):\n curve = ParametricFunction(lambda t: [t, np.sin(t), 0], t_range=[-PI, PI, 0.01], stroke_width=10)\n new_curve = CurvesAsSubmobjects(curve)\n new_curve.set_color_by_gradient(BLUE, RED)\n self.add(new_curve.shift(UP), curve)\n```"}]}
{"id": "ManimBench-v1_000016", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AnimateExample", "scene_base": "Scene", "num_animations": 5, "num_lines": 9, "has_reasoning": false, "prompt": "Display a red-filled square on the screen. Animate the square changing its fill color to white. Then, simultaneously move the square upward and rotate it 60 degrees. Pause for one second after each animation.", "code": "from manim import *\n\nclass AnimateExample(Scene):\n def construct(self):\n square = Square().set_fill(RED, opacity=1.0)\n self.add(square)\n\n # animate the change of color\n self.play(square.animate.set_fill(WHITE))\n self.wait(1)\n\n # animate the change of position and the rotation at the same time\n self.play(square.animate.shift(UP).rotate(PI / 3))\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red-filled square on the screen. Animate the square changing its fill color to white. Then, simultaneously move the square upward and rotate it 60 degrees. Pause for one second after each animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AnimateExample(Scene):\n def construct(self):\n square = Square().set_fill(RED, opacity=1.0)\n self.add(square)\n\n # animate the change of color\n self.play(square.animate.set_fill(WHITE))\n self.wait(1)\n\n # animate the change of position and the rotation at the same time\n self.play(square.animate.shift(UP).rotate(PI / 3))\n self.wait(1)\n```"}]}
{"id": "ManimBench-v1_000024", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ArrangeSumobjectsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 9, "has_reasoning": false, "prompt": "Display a group of 15 blue dots randomly scattered and slightly shifted upward. Below them, a red copy of the same dots is shown, but this time the dots are neatly arranged in a row using default spacing. Both groups are centered on the screen, with the blue dots above and the red dots below.", "code": "from manim import *\n\nclass ArrangeSumobjectsExample(Scene):\n def construct(self):\n s= VGroup(*[Dot().shift(i*0.1*RIGHT*np.random.uniform(-1,1)+UP*np.random.uniform(-1,1)) for i in range(0,15)])\n s.shift(UP).set_color(BLUE)\n s2= s.copy().set_color(RED)\n s2.arrange_submobjects()\n s2.shift(DOWN)\n self.add(s,s2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a group of 15 blue dots randomly scattered and slightly shifted upward. Below them, a red copy of the same dots is shown, but this time the dots are neatly arranged in a row using default spacing. Both groups are centered on the screen, with the blue dots above and the red dots below."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArrangeSumobjectsExample(Scene):\n def construct(self):\n s= VGroup(*[Dot().shift(i*0.1*RIGHT*np.random.uniform(-1,1)+UP*np.random.uniform(-1,1)) for i in range(0,15)])\n s.shift(UP).set_color(BLUE)\n s2= s.copy().set_color(RED)\n s2.arrange_submobjects()\n s2.shift(DOWN)\n self.add(s,s2)\n```"}]}
{"id": "ManimBench-v1_000031", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DifferentRotations", "scene_base": "Scene", "num_animations": 2, "num_lines": 9, "has_reasoning": false, "prompt": "Display two semi-transparent squares: a blue one on the left and a green one on the right. Over two seconds, rotate the blue square 180 degrees using an animation tied to its position, and simultaneously rotate the green square 180 degrees using a direct rotation. Then pause.", "code": "from manim import *\n\nclass DifferentRotations(Scene):\n def construct(self):\n left_square = Square(color=BLUE, fill_opacity=0.7).shift(2 * LEFT)\n right_square = Square(color=GREEN, fill_opacity=0.7).shift(2 * RIGHT)\n self.play(\n left_square.animate.rotate(PI), Rotate(right_square, angle=PI), run_time=2\n )\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two semi-transparent squares: a blue one on the left and a green one on the right. Over two seconds, rotate the blue square 180 degrees using an animation tied to its position, and simultaneously rotate the green square 180 degrees using a direct rotation. Then pause."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DifferentRotations(Scene):\n def construct(self):\n left_square = Square(color=BLUE, fill_opacity=0.7).shift(2 * LEFT)\n right_square = Square(color=GREEN, fill_opacity=0.7).shift(2 * RIGHT)\n self.play(\n left_square.animate.rotate(PI), Rotate(right_square, angle=PI), run_time=2\n )\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000039", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DifferentWeight", "scene_base": "Scene", "num_animations": 1, "num_lines": 17, "has_reasoning": false, "prompt": "Display a vertical list of the text “Open Sans” in various font weights, arranged from lightest to heaviest. Each line uses the corresponding weight style (e.g., Thin, Light, Regular, Bold, Black) to visually demonstrate the differences in font thickness. The entire group is scaled down to fit neatly on the screen.", "code": "from manim import *\n\nclass DifferentWeight(Scene):\n def construct(self):\n import manimpango\n\n g = VGroup()\n weight_list = dict(\n sorted(\n {\n weight: manimpango.Weight(weight).value\n for weight in manimpango.Weight\n }.items(),\n key=lambda x: x[1],\n )\n )\n for weight in weight_list:\n g += Text(weight.name, weight=weight.name, font=\"Open Sans\")\n self.add(g.arrange(DOWN).scale(0.5))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a vertical list of the text “Open Sans” in various font weights, arranged from lightest to heaviest. Each line uses the corresponding weight style (e.g., Thin, Light, Regular, Bold, Black) to visually demonstrate the differences in font thickness. The entire group is scaled down to fit neatly on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DifferentWeight(Scene):\n def construct(self):\n import manimpango\n\n g = VGroup()\n weight_list = dict(\n sorted(\n {\n weight: manimpango.Weight(weight).value\n for weight in manimpango.Weight\n }.items(),\n key=lambda x: x[1],\n )\n )\n for weight in weight_list:\n g += Text(weight.name, weight=weight.name, font=\"Open Sans\")\n self.add(g.arrange(DOWN).scale(0.5))\n```"}]}
{"id": "ManimBench-v1_000046", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExampleSector", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display two colored sectors on screen: a red sector with a full 360-degree angle centered on the right, and a pink sector with a 60-degree angle positioned to the left.", "code": "from manim import *\n\nclass ExampleSector(Scene):\n def construct(self):\n sector = Sector(radius=2)\n sector2 = Sector(radius=2.5, angle=60*DEGREES).move_to([-3, 0, 0])\n sector.set_color(RED)\n sector2.set_color(PINK)\n self.add(sector, sector2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two colored sectors on screen: a red sector with a full 360-degree angle centered on the right, and a pink sector with a 60-degree angle positioned to the left."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExampleSector(Scene):\n def construct(self):\n sector = Sector(radius=2)\n sector2 = Sector(radius=2.5, angle=60*DEGREES).move_to([-3, 0, 0])\n sector.set_color(RED)\n sector2.set_color(PINK)\n self.add(sector, sector2)\n```"}]}
{"id": "ManimBench-v1_000054", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UsingCircumscribe", "scene_base": "Scene", "num_animations": 6, "num_lines": 10, "has_reasoning": false, "prompt": "Display the text “Circum- scribe” in large font. Then animate several variations of the circumscribe effect around the text:\n\n1. Draw a default border around the text.\n2. Draw a circular border instead of the default shape.\n3. Draw a border that fades out after appearing.\n4. Animate a slower border drawing with a longer duration.\n5. Draw a circular border that fades out after appearing.", "code": "from manim import *\n\nclass UsingCircumscribe(Scene):\n def construct(self):\n lbl = Tex(r\"Circum-\\\\scribe\").scale(2)\n self.add(lbl)\n self.play(Circumscribe(lbl))\n self.play(Circumscribe(lbl, Circle))\n self.play(Circumscribe(lbl, fade_out=True))\n self.play(Circumscribe(lbl, time_width=2))\n self.play(Circumscribe(lbl, Circle, True))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the text “Circum- scribe” in large font. Then animate several variations of the circumscribe effect around the text:\n\n1. Draw a default border around the text.\n2. Draw a circular border instead of the default shape.\n3. Draw a border that fades out after appearing.\n4. Animate a slower border drawing with a longer duration.\n5. Draw a circular border that fades out after appearing."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UsingCircumscribe(Scene):\n def construct(self):\n lbl = Tex(r\"Circum-\\\\scribe\").scale(2)\n self.add(lbl)\n self.play(Circumscribe(lbl))\n self.play(Circumscribe(lbl, Circle))\n self.play(Circumscribe(lbl, fade_out=True))\n self.play(Circumscribe(lbl, time_width=2))\n self.play(Circumscribe(lbl, Circle, True))\n```"}]}
{"id": "ManimBench-v1_000061", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CircleExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display three circles arranged horizontally across the screen: a plain black circle on the left, a larger green-outlined circle in the center, and a fully filled blue circle on the right.", "code": "from manim import *\n\nclass CircleExample(Scene):\n def construct(self):\n circle_1 = Circle(radius=1.0)\n circle_2 = Circle(radius=1.5, color=GREEN)\n circle_3 = Circle(radius=1.0, color=BLUE_B, fill_opacity=1)\n\n circle_group = Group(circle_1, circle_2, circle_3).arrange(buff=1)\n self.add(circle_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three circles arranged horizontally across the screen: a plain black circle on the left, a larger green-outlined circle in the center, and a fully filled blue circle on the right."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CircleExample(Scene):\n def construct(self):\n circle_1 = Circle(radius=1.0)\n circle_2 = Circle(radius=1.5, color=GREEN)\n circle_3 = Circle(radius=1.0, color=BLUE_B, fill_opacity=1)\n\n circle_group = Group(circle_1, circle_2, circle_3).arrange(buff=1)\n self.add(circle_group)\n```"}]}
{"id": "ManimBench-v1_000074", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DarkThemeBanner", "scene_base": "Scene", "num_animations": 4, "num_lines": 8, "has_reasoning": false, "prompt": "Display the Manim logo banner animation: \n- First, the banner is drawn on screen. \n- Then, it expands in size. \n- After a brief pause, the banner is smoothly removed using an unwrite animation.", "code": "from manim import *\n\nclass DarkThemeBanner(Scene):\n def construct(self):\n banner = ManimBanner()\n self.play(banner.create())\n self.play(banner.expand())\n self.wait()\n self.play(Unwrite(banner))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the Manim logo banner animation: \n- First, the banner is drawn on screen. \n- Then, it expands in size. \n- After a brief pause, the banner is smoothly removed using an unwrite animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DarkThemeBanner(Scene):\n def construct(self):\n banner = ManimBanner()\n self.play(banner.create())\n self.play(banner.expand())\n self.wait()\n self.play(Unwrite(banner))\n```"}]}
{"id": "ManimBench-v1_000078", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SeveralLabeledDots", "scene_base": "Scene", "num_animations": 2, "num_lines": 14, "has_reasoning": false, "prompt": "Display a solid red square at the center of the screen with four labeled dots placed around its corners: \n- A red-labeled dot with \"42\" at the upper left, \n- A green-labeled dot with \"a\" at the upper right, \n- A blue-labeled dot with \"ii\" at the lower left, \n- A default-labeled dot with \"3\" at the lower right.", "code": "from manim import *\n\nclass SeveralLabeledDots(Scene):\n def construct(self):\n sq = Square(fill_color=RED, fill_opacity=1)\n self.add(sq)\n dot1 = LabeledDot(Tex(\"42\", color=RED))\n dot2 = LabeledDot(MathTex(\"a\", color=GREEN))\n dot3 = LabeledDot(Text(\"ii\", color=BLUE))\n dot4 = LabeledDot(\"3\")\n dot1.next_to(sq, UL)\n dot2.next_to(sq, UR)\n dot3.next_to(sq, DL)\n dot4.next_to(sq, DR)\n self.add(dot1, dot2, dot3, dot4)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a solid red square at the center of the screen with four labeled dots placed around its corners: \n- A red-labeled dot with \"42\" at the upper left, \n- A green-labeled dot with \"a\" at the upper right, \n- A blue-labeled dot with \"ii\" at the lower left, \n- A default-labeled dot with \"3\" at the lower right."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SeveralLabeledDots(Scene):\n def construct(self):\n sq = Square(fill_color=RED, fill_opacity=1)\n self.add(sq)\n dot1 = LabeledDot(Tex(\"42\", color=RED))\n dot2 = LabeledDot(MathTex(\"a\", color=GREEN))\n dot3 = LabeledDot(Text(\"ii\", color=BLUE))\n dot4 = LabeledDot(\"3\")\n dot1.next_to(sq, UL)\n dot2.next_to(sq, UR)\n dot3.next_to(sq, DL)\n dot4.next_to(sq, DR)\n self.add(dot1, dot2, dot3, dot4)\n```"}]}
{"id": "ManimBench-v1_000085", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "BraceExample", "scene_base": "Scene", "num_animations": 3, "num_lines": 11, "has_reasoning": false, "prompt": "Display a square at the center of the screen. Four braces are added to one side of the square, each with a different sharpness value ranging from 0.1 to 1.0. Next to each brace, a label indicates its corresponding sharpness value. All braces and labels are then arranged vertically with slight spacing between them.", "code": "from manim import *\n\nclass BraceExample(Scene):\n def construct(self):\n s = Square()\n self.add(s)\n for i in np.linspace(0.1,1.0,4):\n br = Brace(s, sharpness=i)\n t = Text(f\"sharpness= {i}\").next_to(br, RIGHT)\n self.add(t)\n self.add(br)\n VGroup(*self.mobjects).arrange(DOWN, buff=0.2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square at the center of the screen. Four braces are added to one side of the square, each with a different sharpness value ranging from 0.1 to 1.0. Next to each brace, a label indicates its corresponding sharpness value. All braces and labels are then arranged vertically with slight spacing between them."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass BraceExample(Scene):\n def construct(self):\n s = Square()\n self.add(s)\n for i in np.linspace(0.1,1.0,4):\n br = Brace(s, sharpness=i)\n t = Text(f\"sharpness= {i}\").next_to(br, RIGHT)\n self.add(t)\n self.add(br)\n VGroup(*self.mobjects).arrange(DOWN, buff=0.2)\n```"}]}
{"id": "ManimBench-v1_000093", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "RoundedRectangleExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display two rounded rectangles arranged horizontally:\n\n1. A standard-sized rectangle with mildly rounded corners.\n2. A larger square-shaped rectangle with more prominently rounded corners, giving it a softer, more circular appearance.", "code": "from manim import *\n\nclass RoundedRectangleExample(Scene):\n def construct(self):\n rect_1 = RoundedRectangle(corner_radius=0.5)\n rect_2 = RoundedRectangle(corner_radius=1.5, height=4.0, width=4.0)\n\n rect_group = Group(rect_1, rect_2).arrange(buff=1)\n self.add(rect_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two rounded rectangles arranged horizontally:\n\n1. A standard-sized rectangle with mildly rounded corners.\n2. A larger square-shaped rectangle with more prominently rounded corners, giving it a softer, more circular appearance."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass RoundedRectangleExample(Scene):\n def construct(self):\n rect_1 = RoundedRectangle(corner_radius=0.5)\n rect_2 = RoundedRectangle(corner_radius=1.5, height=4.0, width=4.0)\n\n rect_group = Group(rect_1, rect_2).arrange(buff=1)\n self.add(rect_group)\n```"}]}
{"id": "ManimBench-v1_000100", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SetRowColorsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. The column heading text is colored red-blue gradient, the first row’s text is colored gree, and all other labels are coloured white, creating a clear visual distinction between rows and labels.", "code": "from manim import *\n\nclass SetRowColorsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")]\n ).set_row_colors([RED,BLUE], GREEN)\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. The column heading text is colored red-blue gradient, the first row’s text is colored gree, and all other labels are coloured white, creating a clear visual distinction between rows and labels."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SetRowColorsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")]\n ).set_row_colors([RED,BLUE], GREEN)\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000107", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ParallelLineExample", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a 3D coordinate system with two lines:\n\n1. A red line extending from the point (2, 0, 0) to the point (0, 1, 1), angled diagonally through space.\n2. A yellow line that is parallel to the red line, automatically generated to match its direction.\n\nThe camera is set at a vertical angle of \\( \\frac{\\pi}{3} \\) and a horizontal angle of \\( -\\frac{\\pi}{4} \\), providing a tilted view that clearly shows the parallel orientation of the two lines in 3D space.", "code": "from manim import *\n\nclass ParallelLineExample(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(PI / 3, -PI / 4)\n ax = ThreeDAxes((-5, 5), (-5, 5), (-5, 5), 10, 10, 10)\n line1 = Line3D(RIGHT * 2, UP + OUT, color=RED)\n line2 = Line3D.parallel_to(line1, color=YELLOW)\n self.add(ax, line1, line2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D coordinate system with two lines:\n\n1. A red line extending from the point (2, 0, 0) to the point (0, 1, 1), angled diagonally through space.\n2. A yellow line that is parallel to the red line, automatically generated to match its direction.\n\nThe camera is set at a vertical angle of \\( \\frac{\\pi}{3} \\) and a horizontal angle of \\( -\\frac{\\pi}{4} \\), providing a tilted view that clearly shows the parallel orientation of the two lines in 3D space."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ParallelLineExample(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(PI / 3, -PI / 4)\n ax = ThreeDAxes((-5, 5), (-5, 5), (-5, 5), 10, 10, 10)\n line1 = Line3D(RIGHT * 2, UP + OUT, color=RED)\n line2 = Line3D.parallel_to(line1, color=YELLOW)\n self.add(ax, line1, line2)\n```"}]}
{"id": "ManimBench-v1_000114", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ColorExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 25, "has_reasoning": false, "prompt": "Display seven lines of styled text arranged vertically:\n\n1. The first line reads \"all in red except this\" where the entire text is red except for \"except this\", which is yellow.\n2. The second line says \"nice gradient\" with a smooth color transition from blue to green across the text.\n3. The third line reads \"nice intermediate gradient\" where \"intermediate\" has a red-to-yellow gradient, while the rest of the text has a blue-to-green gradient.\n4. The fourth line says \"fl ligature causing trouble here\" with \"causing trouble\" in a red-to-yellow gradient, highlighting potential rendering issues with the \"fl\" ligature.\n5. The fifth line repeats the previous text but offsets the gradient to avoid the ligature issue, making \"causing trouble\" appear correctly styled.\n6. The sixth line says \"fl ligature floating inside\" with \"floating\" in a red-to-yellow gradient and offset to prevent rendering issues.\n7. The seventh line is similar to the sixth but uses a two-dimensional offset for the gradient on \"floating\", further refining the visual effect.\n\nAll lines are centered and stacked vertically on the screen.", "code": "from manim import *\n\nclass ColorExample(Scene):\n def construct(self):\n text1 = MarkupText(\n f'all in red except this', color=RED\n )\n text2 = MarkupText(\"nice gradient\", gradient=(BLUE, GREEN))\n text3 = MarkupText(\n 'nice intermediate gradient',\n gradient=(BLUE, GREEN),\n )\n text4 = MarkupText(\n 'fl ligature causing trouble here'\n )\n text5 = MarkupText(\n 'fl ligature defeated with offset'\n )\n text6 = MarkupText(\n 'fl ligature floating inside'\n )\n text7 = MarkupText(\n 'fl ligature floating inside'\n )\n group = VGroup(text1, text2, text3, text4, text5, text6, text7).arrange(DOWN)\n self.add(group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display seven lines of styled text arranged vertically:\n\n1. The first line reads \"all in red except this\" where the entire text is red except for \"except this\", which is yellow.\n2. The second line says \"nice gradient\" with a smooth color transition from blue to green across the text.\n3. The third line reads \"nice intermediate gradient\" where \"intermediate\" has a red-to-yellow gradient, while the rest of the text has a blue-to-green gradient.\n4. The fourth line says \"fl ligature causing trouble here\" with \"causing trouble\" in a red-to-yellow gradient, highlighting potential rendering issues with the \"fl\" ligature.\n5. The fifth line repeats the previous text but offsets the gradient to avoid the ligature issue, making \"causing trouble\" appear correctly styled.\n6. The sixth line says \"fl ligature floating inside\" with \"floating\" in a red-to-yellow gradient and offset to prevent rendering issues.\n7. The seventh line is similar to the sixth but uses a two-dimensional offset for the gradient on \"floating\", further refining the visual effect.\n\nAll lines are centered and stacked vertically on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ColorExample(Scene):\n def construct(self):\n text1 = MarkupText(\n f'all in red except this', color=RED\n )\n text2 = MarkupText(\"nice gradient\", gradient=(BLUE, GREEN))\n text3 = MarkupText(\n 'nice intermediate gradient',\n gradient=(BLUE, GREEN),\n )\n text4 = MarkupText(\n 'fl ligature causing trouble here'\n )\n text5 = MarkupText(\n 'fl ligature defeated with offset'\n )\n text6 = MarkupText(\n 'fl ligature floating inside'\n )\n text7 = MarkupText(\n 'fl ligature floating inside'\n )\n group = VGroup(text1, text2, text3, text4, text5, text6, text7).arrange(DOWN)\n self.add(group)\n```"}]}
{"id": "ManimBench-v1_000121", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ToEdgeExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display three elements arranged around the edges of the screen:\n\n- A text reading “I am at the top!” is positioned at the top edge.\n- A circle, initially shifted downward, is moved to the right edge with no buffer space.\n- Another text reading “I am moving to the side!” is placed at the left edge.\n\nAll elements appear together, with their final positions aligned to the specified screen edges.", "code": "from manim import *\n\nclass ToEdgeExample(Scene):\n def construct(self):\n tex_top = Tex(\"I am at the top!\")\n tex_top.to_edge(UP)\n tex_side = Tex(\"I am moving to the side!\")\n c = Circle().shift(2*DOWN)\n self.add(tex_top, tex_side, c)\n tex_side.to_edge(LEFT)\n c.to_edge(RIGHT, buff=0)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three elements arranged around the edges of the screen:\n\n- A text reading “I am at the top!” is positioned at the top edge.\n- A circle, initially shifted downward, is moved to the right edge with no buffer space.\n- Another text reading “I am moving to the side!” is placed at the left edge.\n\nAll elements appear together, with their final positions aligned to the specified screen edges."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ToEdgeExample(Scene):\n def construct(self):\n tex_top = Tex(\"I am at the top!\")\n tex_top.to_edge(UP)\n tex_side = Tex(\"I am moving to the side!\")\n c = Circle().shift(2*DOWN)\n self.add(tex_top, tex_side, c)\n tex_side.to_edge(LEFT)\n c.to_edge(RIGHT, buff=0)\n```"}]}
{"id": "ManimBench-v1_000127", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "IntegerTableExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 16, "has_reasoning": false, "prompt": "Display a table with two rows labeled “sin” and “cos”, and five columns labeled with square root fractions. The table contains angle values in degrees, showing sine values in the first row and cosine values in the second, all centered on screen.", "code": "from manim import *\n\nclass IntegerTableExample(Scene):\n def construct(self):\n t0 = IntegerTable(\n [[0,30,45,60,90],\n [90,60,45,30,0]],\n col_labels=[\n MathTex(r\"\\frac{\\sqrt{0}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{1}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{2}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{3}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{4}}{2}\")],\n row_labels=[MathTex(r\"\\sin\"), MathTex(r\"\\cos\")],\n h_buff=1,\n element_to_mobject_config={\"unit\": r\"^{\\circ}\"})\n self.add(t0)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a table with two rows labeled “sin” and “cos”, and five columns labeled with square root fractions. The table contains angle values in degrees, showing sine values in the first row and cosine values in the second, all centered on screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass IntegerTableExample(Scene):\n def construct(self):\n t0 = IntegerTable(\n [[0,30,45,60,90],\n [90,60,45,30,0]],\n col_labels=[\n MathTex(r\"\\frac{\\sqrt{0}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{1}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{2}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{3}}{2}\"),\n MathTex(r\"\\frac{\\sqrt{4}}{2}\")],\n row_labels=[MathTex(r\"\\sin\"), MathTex(r\"\\cos\")],\n h_buff=1,\n element_to_mobject_config={\"unit\": r\"^{\\circ}\"})\n self.add(t0)\n```"}]}
{"id": "ManimBench-v1_000133", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ArrowExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 25, "has_reasoning": false, "prompt": "Display four groups of arrows arranged across the screen, each demonstrating different arrow properties:\n\n1. **Left Group (far left):** A vertical stack of arrows pointing right, each shorter than the last, showing how increasing the `buff` value reduces arrow length.\n2. **Middle Group (center):** A vertical stack of arrows with increasing stroke width, illustrating how a higher `max_stroke_width_to_length_ratio` thickens the arrow shaft.\n3. **Upper Right Group:** A vertical stack of arrows with increasingly longer arrow tips, demonstrating the effect of increasing `max_tip_length_to_length_ratio`.\n4. **Lower Right Group:** A vertical stack of arrows with different tip shapes and colors—square, filled square, circle, and filled circle—showing the variety of arrowhead styles.", "code": "from manim import *\n\nclass ArrowExample(Scene):\n def construct(self):\n left_group = VGroup()\n # As buff increases, the size of the arrow decreases.\n for buff in np.arange(0, 2.2, 0.45):\n left_group += Arrow(buff=buff, start=2 * LEFT, end=2 * RIGHT)\n # Required to arrange arrows.\n left_group.arrange(DOWN)\n left_group.move_to(4 * LEFT)\n\n middle_group = VGroup()\n # As max_stroke_width_to_length_ratio gets bigger,\n # the width of stroke increases.\n for i in np.arange(0, 5, 0.5):\n middle_group += Arrow(max_stroke_width_to_length_ratio=i)\n middle_group.arrange(DOWN)\n\n UR_group = VGroup()\n # As max_tip_length_to_length_ratio increases,\n # the length of the tip increases.\n for i in np.arange(0, 0.3, 0.1):\n UR_group += Arrow(max_tip_length_to_length_ratio=i)\n UR_group.arrange(DOWN)\n UR_group.move_to(4 * RIGHT + 2 * UP)\n\n DR_group = VGroup()\n DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareFilledTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleFilledTip)\n DR_group.arrange(DOWN)\n DR_group.move_to(4 * RIGHT + 2 * DOWN)\n\n self.add(left_group, middle_group, UR_group, DR_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display four groups of arrows arranged across the screen, each demonstrating different arrow properties:\n\n1. **Left Group (far left):** A vertical stack of arrows pointing right, each shorter than the last, showing how increasing the `buff` value reduces arrow length.\n2. **Middle Group (center):** A vertical stack of arrows with increasing stroke width, illustrating how a higher `max_stroke_width_to_length_ratio` thickens the arrow shaft.\n3. **Upper Right Group:** A vertical stack of arrows with increasingly longer arrow tips, demonstrating the effect of increasing `max_tip_length_to_length_ratio`.\n4. **Lower Right Group:** A vertical stack of arrows with different tip shapes and colors—square, filled square, circle, and filled circle—showing the variety of arrowhead styles."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArrowExample(Scene):\n def construct(self):\n left_group = VGroup()\n # As buff increases, the size of the arrow decreases.\n for buff in np.arange(0, 2.2, 0.45):\n left_group += Arrow(buff=buff, start=2 * LEFT, end=2 * RIGHT)\n # Required to arrange arrows.\n left_group.arrange(DOWN)\n left_group.move_to(4 * LEFT)\n\n middle_group = VGroup()\n # As max_stroke_width_to_length_ratio gets bigger,\n # the width of stroke increases.\n for i in np.arange(0, 5, 0.5):\n middle_group += Arrow(max_stroke_width_to_length_ratio=i)\n middle_group.arrange(DOWN)\n\n UR_group = VGroup()\n # As max_tip_length_to_length_ratio increases,\n # the length of the tip increases.\n for i in np.arange(0, 0.3, 0.1):\n UR_group += Arrow(max_tip_length_to_length_ratio=i)\n UR_group.arrange(DOWN)\n UR_group.move_to(4 * RIGHT + 2 * UP)\n\n DR_group = VGroup()\n DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=BLUE, tip_shape=ArrowSquareFilledTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleTip)\n DR_group += Arrow(start=LEFT, end=RIGHT, color=YELLOW, tip_shape=ArrowCircleFilledTip)\n DR_group.arrange(DOWN)\n DR_group.move_to(4 * RIGHT + 2 * DOWN)\n\n self.add(left_group, middle_group, UR_group, DR_group)\n```"}]}
{"id": "ManimBench-v1_000140", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SpiralLayout", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a graph with six labeled nodes arranged in a spiral layout, where each node is positioned along a gradually expanding curve. The nodes are connected in a loop with additional cross-links between non-adjacent nodes, forming a dense and interconnected structure that visually spirals outward from the center.", "code": "from manim import *\n\nclass SpiralLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"spiral\",\n labels=True\n )\n self.add(graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a graph with six labeled nodes arranged in a spiral layout, where each node is positioned along a gradually expanding curve. The nodes are connected in a loop with additional cross-links between non-adjacent nodes, forming a dense and interconnected structure that visually spirals outward from the center."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SpiralLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"spiral\",\n labels=True\n )\n self.add(graph)\n```"}]}
{"id": "ManimBench-v1_000148", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PolarGraphExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a polar coordinate grid, then plot an orange polar graph defined by the equation \\( r = 2\\sin(5\\theta) \\). The resulting curve forms a five-petaled rose pattern, symmetrically arranged around the origin.", "code": "from manim import *\n\nclass PolarGraphExample(Scene):\n def construct(self):\n plane = PolarPlane()\n r = lambda theta: 2 * np.sin(theta * 5)\n graph = plane.plot_polar_graph(r, [0, 2 * PI], color=ORANGE)\n self.add(plane, graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a polar coordinate grid, then plot an orange polar graph defined by the equation \\( r = 2\\sin(5\\theta) \\). The resulting curve forms a five-petaled rose pattern, symmetrically arranged around the origin."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PolarGraphExample(Scene):\n def construct(self):\n plane = PolarPlane()\n r = lambda theta: 2 * np.sin(theta * 5)\n graph = plane.plot_polar_graph(r, [0, 2 * PI], color=ORANGE)\n self.add(plane, graph)\n```"}]}
{"id": "ManimBench-v1_000154", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "IterateColor", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display the word \"Colors\" in large font, with each letter randomly assigned a different bright color.", "code": "from manim import *\n\nclass IterateColor(Scene):\n def construct(self):\n text = Text(\"Colors\", font_size=96)\n for letter in text:\n letter.set_color(random_bright_color())\n self.add(text)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the word \"Colors\" in large font, with each letter randomly assigned a different bright color."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass IterateColor(Scene):\n def construct(self):\n text = Text(\"Colors\", font_size=96)\n for letter in text:\n letter.set_color(random_bright_color())\n self.add(text)\n```"}]}
{"id": "ManimBench-v1_000160", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "EndAnimation", "scene_base": "Scene", "num_animations": 3, "num_lines": 11, "has_reasoning": false, "prompt": "Display a blue streamlines vector field where each line flows according to a sine and cosine-based function. The streamlines begin animating immediately with a smooth, continuous motion, simulating fluid flow at a moderate speed. After a brief moment, the animation gracefully stops, freezing the streamlines in place.", "code": "from manim import *\n\nclass EndAnimation(Scene):\n def construct(self):\n func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT\n stream_lines = StreamLines(\n func, stroke_width=3, max_anchors_per_line=5, virtual_time=1, color=BLUE\n )\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.5, time_width=0.5)\n self.wait(1)\n self.play(stream_lines.end_animation())", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a blue streamlines vector field where each line flows according to a sine and cosine-based function. The streamlines begin animating immediately with a smooth, continuous motion, simulating fluid flow at a moderate speed. After a brief moment, the animation gracefully stops, freezing the streamlines in place."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass EndAnimation(Scene):\n def construct(self):\n func = lambda pos: np.sin(pos[0] / 2) * UR + np.cos(pos[1] / 2) * LEFT\n stream_lines = StreamLines(\n func, stroke_width=3, max_anchors_per_line=5, virtual_time=1, color=BLUE\n )\n self.add(stream_lines)\n stream_lines.start_animation(warm_up=False, flow_speed=1.5, time_width=0.5)\n self.wait(1)\n self.play(stream_lines.end_animation())\n```"}]}
{"id": "ManimBench-v1_000168", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ApplyingWaves", "scene_base": "Scene", "num_animations": 2, "num_lines": 6, "has_reasoning": false, "prompt": "Display the word \"Wiggle\" in large text at the center of the screen, then animate it with a playful wiggling motion before pausing briefly.", "code": "from manim import *\n\nclass ApplyingWaves(Scene):\n def construct(self):\n tex = Tex(\"Wiggle\").scale(3)\n self.play(Wiggle(tex))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the word \"Wiggle\" in large text at the center of the screen, then animate it with a playful wiggling motion before pausing briefly."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ApplyingWaves(Scene):\n def construct(self):\n tex = Tex(\"Wiggle\").scale(3)\n self.play(Wiggle(tex))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000175", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExpandDirections", "scene_base": "Scene", "num_animations": 1, "num_lines": 9, "has_reasoning": false, "prompt": "Display three smaller Manim banners stacked vertically:\n\n- The bottom banner expands to the right.\n- The middle banner expands outward from the center.\n- The top banner expands to the left.\n\nAll three banners animate their expansion simultaneously.", "code": "from manim import *\n\nclass ExpandDirections(Scene):\n def construct(self):\n banners = [ManimBanner().scale(0.5).shift(UP*x) for x in [-2, 0, 2]]\n self.play(\n banners[0].expand(direction=\"right\"),\n banners[1].expand(direction=\"center\"),\n banners[2].expand(direction=\"left\"),\n )", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three smaller Manim banners stacked vertically:\n\n- The bottom banner expands to the right.\n- The middle banner expands outward from the center.\n- The top banner expands to the left.\n\nAll three banners animate their expansion simultaneously."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExpandDirections(Scene):\n def construct(self):\n banners = [ManimBanner().scale(0.5).shift(UP*x) for x in [-2, 0, 2]]\n self.play(\n banners[0].expand(direction=\"right\"),\n banners[1].expand(direction=\"center\"),\n banners[2].expand(direction=\"left\"),\n )\n```"}]}
{"id": "ManimBench-v1_000183", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "StarExample", "scene_base": "Scene", "num_animations": 3, "num_lines": 8, "has_reasoning": false, "prompt": "Display a five-pointed star shape (pentagram) centered on the screen. Then, a red star with the same outer radius is drawn over it with a smooth animation. After being displayed briefly, the red star fades out gradually.", "code": "from manim import *\n\nclass StarExample(Scene):\n def construct(self):\n pentagram = RegularPolygram(5, radius=2)\n star = Star(outer_radius=2, color=RED)\n\n self.add(pentagram)\n self.play(Create(star), run_time=3)\n self.play(FadeOut(star), run_time=2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a five-pointed star shape (pentagram) centered on the screen. Then, a red star with the same outer radius is drawn over it with a smooth animation. After being displayed briefly, the red star fades out gradually."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass StarExample(Scene):\n def construct(self):\n pentagram = RegularPolygram(5, radius=2)\n star = Star(outer_radius=2, color=RED)\n\n self.add(pentagram)\n self.play(Create(star), run_time=3)\n self.play(FadeOut(star), run_time=2)\n```"}]}
{"id": "ManimBench-v1_000191", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UsingIndicate", "scene_base": "Scene", "num_animations": 2, "num_lines": 6, "has_reasoning": false, "prompt": "Display the word “Indicate” in large font on the screen, then animate it with a brief highlighting effect that draws attention to the text.", "code": "from manim import *\n\nclass UsingIndicate(Scene):\n def construct(self):\n tex = Tex(\"Indicate\").scale(3)\n self.play(Indicate(tex))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the word “Indicate” in large font on the screen, then animate it with a brief highlighting effect that draws attention to the text."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UsingIndicate(Scene):\n def construct(self):\n tex = Tex(\"Indicate\").scale(3)\n self.play(Indicate(tex))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000198", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PointFromProportion", "scene_base": "Scene", "num_animations": 2, "num_lines": 11, "has_reasoning": false, "prompt": "Display a diagonal line from the bottom-left to the top-right of the screen. Place three colored dots along the line: a red dot at one-quarter of the way, a blue dot at the midpoint, and a yellow dot at three-quarters of the way along the line.", "code": "from manim import *\n\nclass PointFromProportion(Scene):\n def construct(self):\n line = Line(2*DL, 2*UR)\n self.add(line)\n colors = (RED, BLUE, YELLOW)\n proportions = (1/4, 1/2, 3/4)\n for color, proportion in zip(colors, proportions):\n self.add(Dot(color=color).move_to(\n line.point_from_proportion(proportion)\n ))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a diagonal line from the bottom-left to the top-right of the screen. Place three colored dots along the line: a red dot at one-quarter of the way, a blue dot at the midpoint, and a yellow dot at three-quarters of the way along the line."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PointFromProportion(Scene):\n def construct(self):\n line = Line(2*DL, 2*UR)\n self.add(line)\n colors = (RED, BLUE, YELLOW)\n proportions = (1/4, 1/2, 3/4)\n for color, proportion in zip(colors, proportions):\n self.add(Dot(color=color).move_to(\n line.point_from_proportion(proportion)\n ))\n```"}]}
{"id": "ManimBench-v1_000206", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MovingCameraCenter", "scene_base": "MovingCameraScene", "num_animations": 5, "num_lines": 10, "has_reasoning": false, "prompt": "Display a red semi-transparent square on the left and a green semi-transparent triangle on the right. After a brief pause, the camera smoothly pans to center on the square, then transitions to center on the triangle, creating a dynamic shift in focus between the two shapes.", "code": "from manim import *\n\nclass MovingCameraCenter(MovingCameraScene):\n def construct(self):\n s = Square(color=RED, fill_opacity=0.5).move_to(2 * LEFT)\n t = Triangle(color=GREEN, fill_opacity=0.5).move_to(2 * RIGHT)\n self.wait(0.3)\n self.add(s, t)\n self.play(self.camera.frame.animate.move_to(s))\n self.wait(0.3)\n self.play(self.camera.frame.animate.move_to(t))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red semi-transparent square on the left and a green semi-transparent triangle on the right. After a brief pause, the camera smoothly pans to center on the square, then transitions to center on the triangle, creating a dynamic shift in focus between the two shapes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MovingCameraCenter(MovingCameraScene):\n def construct(self):\n s = Square(color=RED, fill_opacity=0.5).move_to(2 * LEFT)\n t = Triangle(color=GREEN, fill_opacity=0.5).move_to(2 * RIGHT)\n self.wait(0.3)\n self.add(s, t)\n self.play(self.camera.frame.animate.move_to(s))\n self.wait(0.3)\n self.play(self.camera.frame.animate.move_to(t))\n```"}]}
{"id": "ManimBench-v1_000214", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "Fading", "scene_base": "Scene", "num_animations": 3, "num_lines": 8, "has_reasoning": false, "prompt": "Display the text “Fade In” in large font as it fades into view from below while scaling up slightly. Then transform it into the text “Fade Out.” Finally, animate “Fade Out” fading away while moving further downward and scaling up.", "code": "from manim import *\n\nclass Fading(Scene):\n def construct(self):\n tex_in = Tex(\"Fade\", \"In\").scale(3)\n tex_out = Tex(\"Fade\", \"Out\").scale(3)\n self.play(FadeIn(tex_in, shift=DOWN, scale=0.66))\n self.play(ReplacementTransform(tex_in, tex_out))\n self.play(FadeOut(tex_out, shift=DOWN * 2, scale=1.5))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the text “Fade In” in large font as it fades into view from below while scaling up slightly. Then transform it into the text “Fade Out.” Finally, animate “Fade Out” fading away while moving further downward and scaling up."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass Fading(Scene):\n def construct(self):\n tex_in = Tex(\"Fade\", \"In\").scale(3)\n tex_out = Tex(\"Fade\", \"Out\").scale(3)\n self.play(FadeIn(tex_in, shift=DOWN, scale=0.66))\n self.play(ReplacementTransform(tex_in, tex_out))\n self.play(FadeOut(tex_out, shift=DOWN * 2, scale=1.5))\n```"}]}
{"id": "ManimBench-v1_000220", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ShapesWithVDict", "scene_base": "Scene", "num_animations": 17, "num_lines": 39, "has_reasoning": false, "prompt": "Display a red square and a yellow circle labeled with keys \"s\" and \"c\" respectively, grouped together using a visual dictionary. After a pause, green text labeled \"t\" appears below the square. A rectangle is then added below the text and labeled \"r\". The text changes color to purple, scales up, and is then replaced with new blue text. This new text is removed, followed by the red square being uncreated, the yellow circle fading out, and the rectangle fading out while shifting downward. Finally, two new VDicts appear: one on the left showing integers 1, 2, and 3 stacked vertically, and another on the right showing a square, circle, and rectangle arranged together.", "code": "from manim import *\n\nclass ShapesWithVDict(Scene):\n def construct(self):\n square = Square().set_color(RED)\n circle = Circle().set_color(YELLOW).next_to(square, UP)\n\n # create dict from list of tuples each having key-mobject pair\n pairs = [(\"s\", square), (\"c\", circle)]\n my_dict = VDict(pairs, show_keys=True)\n\n # display it just like a VGroup\n self.play(Create(my_dict))\n self.wait()\n\n text = Tex(\"Some text\").set_color(GREEN).next_to(square, DOWN)\n\n # add a key-value pair by wrapping it in a single-element list of tuple\n # after attrs branch is merged, it will be easier like `.add(t=text)`\n my_dict.add([(\"t\", text)])\n self.wait()\n\n rect = Rectangle().next_to(text, DOWN)\n # can also do key assignment like a python dict\n my_dict[\"r\"] = rect\n\n # access submobjects like a python dict\n my_dict[\"t\"].set_color(PURPLE)\n self.play(my_dict[\"t\"].animate.scale(3))\n self.wait()\n\n # also supports python dict styled reassignment\n my_dict[\"t\"] = Tex(\"Some other text\").set_color(BLUE)\n self.wait()\n\n # remove submobject by key\n my_dict.remove(\"t\")\n self.wait()\n\n self.play(Uncreate(my_dict[\"s\"]))\n self.wait()\n\n self.play(FadeOut(my_dict[\"c\"]))\n self.wait()\n\n self.play(FadeOut(my_dict[\"r\"], shift=DOWN))\n self.wait()\n\n # you can also make a VDict from an existing dict of mobjects\n plain_dict = {\n 1: Integer(1).shift(DOWN),\n 2: Integer(2).shift(2 * DOWN),\n 3: Integer(3).shift(3 * DOWN),\n }\n\n vdict_from_plain_dict = VDict(plain_dict)\n vdict_from_plain_dict.shift(1.5 * (UP + LEFT))\n self.play(Create(vdict_from_plain_dict))\n\n # you can even use zip\n vdict_using_zip = VDict(zip([\"s\", \"c\", \"r\"], [Square(), Circle(), Rectangle()]))\n vdict_using_zip.shift(1.5 * RIGHT)\n self.play(Create(vdict_using_zip))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red square and a yellow circle labeled with keys \"s\" and \"c\" respectively, grouped together using a visual dictionary. After a pause, green text labeled \"t\" appears below the square. A rectangle is then added below the text and labeled \"r\". The text changes color to purple, scales up, and is then replaced with new blue text. This new text is removed, followed by the red square being uncreated, the yellow circle fading out, and the rectangle fading out while shifting downward. Finally, two new VDicts appear: one on the left showing integers 1, 2, and 3 stacked vertically, and another on the right showing a square, circle, and rectangle arranged together."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ShapesWithVDict(Scene):\n def construct(self):\n square = Square().set_color(RED)\n circle = Circle().set_color(YELLOW).next_to(square, UP)\n\n # create dict from list of tuples each having key-mobject pair\n pairs = [(\"s\", square), (\"c\", circle)]\n my_dict = VDict(pairs, show_keys=True)\n\n # display it just like a VGroup\n self.play(Create(my_dict))\n self.wait()\n\n text = Tex(\"Some text\").set_color(GREEN).next_to(square, DOWN)\n\n # add a key-value pair by wrapping it in a single-element list of tuple\n # after attrs branch is merged, it will be easier like `.add(t=text)`\n my_dict.add([(\"t\", text)])\n self.wait()\n\n rect = Rectangle().next_to(text, DOWN)\n # can also do key assignment like a python dict\n my_dict[\"r\"] = rect\n\n # access submobjects like a python dict\n my_dict[\"t\"].set_color(PURPLE)\n self.play(my_dict[\"t\"].animate.scale(3))\n self.wait()\n\n # also supports python dict styled reassignment\n my_dict[\"t\"] = Tex(\"Some other text\").set_color(BLUE)\n self.wait()\n\n # remove submobject by key\n my_dict.remove(\"t\")\n self.wait()\n\n self.play(Uncreate(my_dict[\"s\"]))\n self.wait()\n\n self.play(FadeOut(my_dict[\"c\"]))\n self.wait()\n\n self.play(FadeOut(my_dict[\"r\"], shift=DOWN))\n self.wait()\n\n # you can also make a VDict from an existing dict of mobjects\n plain_dict = {\n 1: Integer(1).shift(DOWN),\n 2: Integer(2).shift(2 * DOWN),\n 3: Integer(3).shift(3 * DOWN),\n }\n\n vdict_from_plain_dict = VDict(plain_dict)\n vdict_from_plain_dict.shift(1.5 * (UP + LEFT))\n self.play(Create(vdict_from_plain_dict))\n\n # you can even use zip\n vdict_using_zip = VDict(zip([\"s\", \"c\", \"r\"], [Square(), Circle(), Rectangle()]))\n vdict_using_zip.shift(1.5 * RIGHT)\n self.play(Create(vdict_using_zip))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000233", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PlotParametricFunction", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a red parametric curve traced by the point \\((\\sin(2t), \\sin(3t))\\) as \\(t\\) ranges from 0 to \\(2\\pi\\), scaled up by a factor of 3. The curve appears on screen without animation.", "code": "from manim import *\n\nclass PlotParametricFunction(Scene):\n def func(self, t):\n return (np.sin(2 * t), np.sin(3 * t), 0)\n\n def construct(self):\n func = ParametricFunction(self.func, t_range = (0, TAU), fill_opacity=0).set_color(RED)\n self.add(func.scale(3))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red parametric curve traced by the point \\((\\sin(2t), \\sin(3t))\\) as \\(t\\) ranges from 0 to \\(2\\pi\\), scaled up by a factor of 3. The curve appears on screen without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PlotParametricFunction(Scene):\n def func(self, t):\n return (np.sin(2 * t), np.sin(3 * t), 0)\n\n def construct(self):\n func = ParametricFunction(self.func, t_range = (0, TAU), fill_opacity=0).set_color(RED)\n self.add(func.scale(3))\n```"}]}
{"id": "ManimBench-v1_000240", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SpawningAndFlowingArea", "scene_base": "Scene", "num_animations": 1, "num_lines": 13, "has_reasoning": false, "prompt": "Display a streamlines vector field where each line flows according to a custom function combining sine, cosine, and position-based scaling. Two rectangles are overlaid: a smaller one labeled \"Spawning Area\" indicating where streamlines originate, and a larger one labeled \"Flowing Area\" showing the full region where the streamlines move. Both labels have semi-transparent background rectangles for readability.", "code": "from manim import *\n\nclass SpawningAndFlowingArea(Scene):\n def construct(self):\n func = lambda pos: np.sin(pos[0]) * UR + np.cos(pos[1]) * LEFT + pos / 5\n stream_lines = StreamLines(\n func, x_range=[-3, 3, 0.2], y_range=[-2, 2, 0.2], padding=1\n )\n\n spawning_area = Rectangle(width=6, height=4)\n flowing_area = Rectangle(width=8, height=6)\n labels = [Tex(\"Spawning Area\"), Tex(\"Flowing Area\").shift(DOWN * 2.5)]\n for lbl in labels:\n lbl.add_background_rectangle(opacity=0.6, buff=0.05)\n\n self.add(stream_lines, spawning_area, flowing_area, *labels)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a streamlines vector field where each line flows according to a custom function combining sine, cosine, and position-based scaling. Two rectangles are overlaid: a smaller one labeled \"Spawning Area\" indicating where streamlines originate, and a larger one labeled \"Flowing Area\" showing the full region where the streamlines move. Both labels have semi-transparent background rectangles for readability."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SpawningAndFlowingArea(Scene):\n def construct(self):\n func = lambda pos: np.sin(pos[0]) * UR + np.cos(pos[1]) * LEFT + pos / 5\n stream_lines = StreamLines(\n func, x_range=[-3, 3, 0.2], y_range=[-2, 2, 0.2], padding=1\n )\n\n spawning_area = Rectangle(width=6, height=4)\n flowing_area = Rectangle(width=8, height=6)\n labels = [Tex(\"Spawning Area\"), Tex(\"Flowing Area\").shift(DOWN * 2.5)]\n for lbl in labels:\n lbl.add_background_rectangle(opacity=0.6, buff=0.05)\n\n self.add(stream_lines, spawning_area, flowing_area, *labels)\n```"}]}
{"id": "ManimBench-v1_000247", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetGraphLabelExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 13, "has_reasoning": false, "prompt": "Display a set of coordinate axes with a purple sine curve representing \\( y = \\sin(x) \\). At \\( x = \\frac{\\pi}{2} \\), a dot is placed on the curve, and a label showing \\( \\frac{\\pi}{2} \\) appears near the dot, positioned diagonally up and to the right.", "code": "from manim import *\n\nclass GetGraphLabelExample(Scene):\n def construct(self):\n ax = Axes()\n sin = ax.plot(lambda x: np.sin(x), color=PURPLE_B)\n label = ax.get_graph_label(\n graph=sin,\n label= MathTex(r\"\\frac{\\pi}{2}\"),\n x_val=PI / 2,\n dot=True,\n direction=UR,\n )\n\n self.add(ax, sin, label)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes with a purple sine curve representing \\( y = \\sin(x) \\). At \\( x = \\frac{\\pi}{2} \\), a dot is placed on the curve, and a label showing \\( \\frac{\\pi}{2} \\) appears near the dot, positioned diagonally up and to the right."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetGraphLabelExample(Scene):\n def construct(self):\n ax = Axes()\n sin = ax.plot(lambda x: np.sin(x), color=PURPLE_B)\n label = ax.get_graph_label(\n graph=sin,\n label= MathTex(r\"\\frac{\\pi}{2}\"),\n x_val=PI / 2,\n dot=True,\n direction=UR,\n )\n\n self.add(ax, sin, label)\n```"}]}
{"id": "ManimBench-v1_000254", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PointMovingOnShapes", "scene_base": "Scene", "num_animations": 7, "num_lines": 14, "has_reasoning": false, "prompt": "Display a dot at the origin. Draw a line from (3, 0) to (5, 0). Show a blue circle growing from its center. Transform the dot to a new position to the right. Move the dot along the path of the circle. Rotate the dot around the point (2, 0).", "code": "from manim import *\n\nclass PointMovingOnShapes(Scene):\n def construct(self):\n circle = Circle(radius=1, color=BLUE)\n dot = Dot()\n dot2 = dot.copy().shift(RIGHT)\n self.add(dot)\n\n line = Line([3, 0, 0], [5, 0, 0])\n self.add(line)\n\n self.play(GrowFromCenter(circle))\n self.play(Transform(dot, dot2))\n self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)\n self.play(Rotating(dot, about_point=[2, 0, 0]), run_time=1.5)\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a dot at the origin. Draw a line from (3, 0) to (5, 0). Show a blue circle growing from its center. Transform the dot to a new position to the right. Move the dot along the path of the circle. Rotate the dot around the point (2, 0)."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PointMovingOnShapes(Scene):\n def construct(self):\n circle = Circle(radius=1, color=BLUE)\n dot = Dot()\n dot2 = dot.copy().shift(RIGHT)\n self.add(dot)\n\n line = Line([3, 0, 0], [5, 0, 0])\n self.add(line)\n\n self.play(GrowFromCenter(circle))\n self.play(Transform(dot, dot2))\n self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)\n self.play(Rotating(dot, about_point=[2, 0, 0]), run_time=1.5)\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000261", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "IcosahedronScene", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display a 3D icosahedron—a twenty-faced polyhedron—centered in the scene. The camera is set at a 75° vertical angle and a 30° horizontal angle, providing a clear, tilted perspective that highlights the icosahedron’s geometric structure.", "code": "from manim import *\n\nclass IcosahedronScene(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n obj = Icosahedron()\n self.add(obj)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D icosahedron—a twenty-faced polyhedron—centered in the scene. The camera is set at a 75° vertical angle and a 30° horizontal angle, providing a clear, tilted perspective that highlights the icosahedron’s geometric structure."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass IcosahedronScene(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n obj = Icosahedron()\n self.add(obj)\n```"}]}
{"id": "ManimBench-v1_000269", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AddPackageLatex", "scene_base": "Scene", "num_animations": 1, "num_lines": 11, "has_reasoning": false, "prompt": "Display a large mathematical expression showing a script-style \"H\" followed by a right arrow pointing to a double-struck \"H\", using a custom LaTeX package (mathrsfs) to render the script font.", "code": "from manim import *\n\nclass AddPackageLatex(Scene):\n def construct(self):\n myTemplate = TexTemplate()\n myTemplate.add_to_preamble(r\"\\usepackage{mathrsfs}\")\n tex = Tex(\n r\"$\\mathscr{H} \\rightarrow \\mathbb{H}$\",\n tex_template=myTemplate,\n font_size=144,\n )\n self.add(tex)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a large mathematical expression showing a script-style \"H\" followed by a right arrow pointing to a double-struck \"H\", using a custom LaTeX package (mathrsfs) to render the script font."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AddPackageLatex(Scene):\n def construct(self):\n myTemplate = TexTemplate()\n myTemplate.add_to_preamble(r\"\\usepackage{mathrsfs}\")\n tex = Tex(\n r\"$\\mathscr{H} \\rightarrow \\mathbb{H}$\",\n tex_template=myTemplate,\n font_size=144,\n )\n self.add(tex)\n```"}]}
{"id": "ManimBench-v1_000277", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ClockwiseExample", "scene_base": "Scene", "num_animations": 4, "num_lines": 14, "has_reasoning": false, "prompt": "Display two pairs of dots and squares: one pair on the left side of the screen and the other on the right. After a brief pause, the left dot transforms into a square with a clockwise spinning motion, while the right dot transforms into a square with a standard morphing animation. Both transformations occur simultaneously.", "code": "from manim import *\n\nclass ClockwiseExample(Scene):\n def construct(self):\n dl, dr = Dot(), Dot()\n sl, sr = Square(), Square()\n\n VGroup(dl, sl).arrange(DOWN).shift(2*LEFT)\n VGroup(dr, sr).arrange(DOWN).shift(2*RIGHT)\n\n self.add(dl, dr)\n self.wait()\n self.play(\n ClockwiseTransform(dl, sl),\n Transform(dr, sr)\n )\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two pairs of dots and squares: one pair on the left side of the screen and the other on the right. After a brief pause, the left dot transforms into a square with a clockwise spinning motion, while the right dot transforms into a square with a standard morphing animation. Both transformations occur simultaneously."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ClockwiseExample(Scene):\n def construct(self):\n dl, dr = Dot(), Dot()\n sl, sr = Square(), Square()\n\n VGroup(dl, sl).arrange(DOWN).shift(2*LEFT)\n VGroup(dr, sr).arrange(DOWN).shift(2*RIGHT)\n\n self.add(dl, dr)\n self.wait()\n self.play(\n ClockwiseTransform(dl, sl),\n Transform(dr, sr)\n )\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000281", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ShowIncreasingSubsetsScene", "scene_base": "Scene", "num_animations": 3, "num_lines": 7, "has_reasoning": false, "prompt": "Display a dot, a square, and a triangle grouped together on screen. Then animate them appearing one by one in order, gradually revealing the full group.", "code": "from manim import *\n\nclass ShowIncreasingSubsetsScene(Scene):\n def construct(self):\n p = VGroup(Dot(), Square(), Triangle())\n self.add(p)\n self.play(ShowIncreasingSubsets(p))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a dot, a square, and a triangle grouped together on screen. Then animate them appearing one by one in order, gradually revealing the full group."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ShowIncreasingSubsetsScene(Scene):\n def construct(self):\n p = VGroup(Dot(), Square(), Triangle())\n self.add(p)\n self.play(ShowIncreasingSubsets(p))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000282", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AngleExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 21, "has_reasoning": false, "prompt": "Display eight diagrams arranged in a 2×4 grid, each showing two diagonal lines intersecting at various angles. Each diagram highlights a different angle between the lines using a curved arc, with variations in radius, quadrant placement, stroke width, color, and whether the smaller or larger angle is shown. Each diagram is enclosed in a light rectangular frame for clarity.", "code": "from manim import *\n\nclass AngleExample(Scene):\n def construct(self):\n line1 = Line( LEFT + (1/3) * UP, RIGHT + (1/3) * DOWN )\n line2 = Line( DOWN + (1/3) * RIGHT, UP + (1/3) * LEFT )\n angles = [\n Angle(line1, line2),\n Angle(line1, line2, radius=0.4, quadrant=(1,-1), other_angle=True),\n Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8, other_angle=True),\n Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED),\n Angle(line1, line2, other_angle=True),\n Angle(line1, line2, radius=0.4, quadrant=(1,-1)),\n Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8),\n Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, other_angle=True),\n ]\n plots = VGroup()\n for angle in angles:\n plot=VGroup(line1.copy(),line2.copy(), angle)\n plots.add(VGroup(plot,SurroundingRectangle(plot, buff=0.3)))\n plots.arrange_in_grid(rows=2,buff=1)\n self.add(plots)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display eight diagrams arranged in a 2×4 grid, each showing two diagonal lines intersecting at various angles. Each diagram highlights a different angle between the lines using a curved arc, with variations in radius, quadrant placement, stroke width, color, and whether the smaller or larger angle is shown. Each diagram is enclosed in a light rectangular frame for clarity."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AngleExample(Scene):\n def construct(self):\n line1 = Line( LEFT + (1/3) * UP, RIGHT + (1/3) * DOWN )\n line2 = Line( DOWN + (1/3) * RIGHT, UP + (1/3) * LEFT )\n angles = [\n Angle(line1, line2),\n Angle(line1, line2, radius=0.4, quadrant=(1,-1), other_angle=True),\n Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8, other_angle=True),\n Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED),\n Angle(line1, line2, other_angle=True),\n Angle(line1, line2, radius=0.4, quadrant=(1,-1)),\n Angle(line1, line2, radius=0.5, quadrant=(-1,1), stroke_width=8),\n Angle(line1, line2, radius=0.7, quadrant=(-1,-1), color=RED, other_angle=True),\n ]\n plots = VGroup()\n for angle in angles:\n plot=VGroup(line1.copy(),line2.copy(), angle)\n plots.add(VGroup(plot,SurroundingRectangle(plot, buff=0.3)))\n plots.arrange_in_grid(rows=2,buff=1)\n self.add(plots)\n```"}]}
{"id": "ManimBench-v1_000283", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UnwriteReverseFalse", "scene_base": "Scene", "num_animations": 2, "num_lines": 6, "has_reasoning": false, "prompt": "Display the text “Alice and Bob” in large font on the screen, then animate it being erased in the original writing order, as if unwriting it from start to end.", "code": "from manim import *\n\nclass UnwriteReverseFalse(Scene):\n def construct(self):\n text = Tex(\"Alice and Bob\").scale(3)\n self.add(text)\n self.play(Unwrite(text, reverse=False))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the text “Alice and Bob” in large font on the screen, then animate it being erased in the original writing order, as if unwriting it from start to end."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UnwriteReverseFalse(Scene):\n def construct(self):\n text = Tex(\"Alice and Bob\").scale(3)\n self.add(text)\n self.play(Unwrite(text, reverse=False))\n```"}]}
{"id": "ManimBench-v1_000284", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetRowsExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 10, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. A rectangle is drawn around the first row, visually highlighting both cells in that row, including the row heading.", "code": "from manim import *\n\nclass GetRowsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.add(SurroundingRectangle(table.get_rows()[1]))\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. A rectangle is drawn around the first row, visually highlighting both cells in that row, including the row heading."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetRowsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.add(SurroundingRectangle(table.get_rows()[1]))\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000285", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DodecahedronScene", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display a 3D dodecahedron—a twelve-faced polyhedron—centered in the scene. The camera is angled at 75° vertically and 30° horizontally to provide a clear, tilted view of the shape, showcasing its three-dimensional structure.", "code": "from manim import *\n\nclass DodecahedronScene(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n obj = Dodecahedron()\n self.add(obj)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D dodecahedron—a twelve-faced polyhedron—centered in the scene. The camera is angled at 75° vertically and 30° horizontally to provide a clear, tilted view of the shape, showcasing its three-dimensional structure."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DodecahedronScene(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n obj = Dodecahedron()\n self.add(obj)\n```"}]}
{"id": "ManimBench-v1_000286", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "FlashOnCircle", "scene_base": "Scene", "num_animations": 2, "num_lines": 13, "has_reasoning": false, "prompt": "Display a circle on the screen. Then animate a red flash effect radiating outward from the circle with 30 lines, a slightly larger flash radius than the circle, and a quick burst animation that lasts 2 seconds using a fast-start easing function.", "code": "from manim import *\n\nclass FlashOnCircle(Scene):\n def construct(self):\n radius = 2\n circle = Circle(radius)\n self.add(circle)\n self.play(Flash(\n circle, line_length=1,\n num_lines=30, color=RED,\n flash_radius=radius+SMALL_BUFF,\n time_width=0.3, run_time=2,\n rate_func = rush_from\n ))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a circle on the screen. Then animate a red flash effect radiating outward from the circle with 30 lines, a slightly larger flash radius than the circle, and a quick burst animation that lasts 2 seconds using a fast-start easing function."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass FlashOnCircle(Scene):\n def construct(self):\n radius = 2\n circle = Circle(radius)\n self.add(circle)\n self.play(Flash(\n circle, line_length=1,\n num_lines=30, color=RED,\n flash_radius=radius+SMALL_BUFF,\n time_width=0.3, run_time=2,\n rate_func = rush_from\n ))\n```"}]}
{"id": "ManimBench-v1_000287", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SpeedModifierUpdaterExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 13, "has_reasoning": false, "prompt": "Display a dot on the far left side of the screen. It begins moving smoothly to the right, but its speed varies over time: it starts at normal speed, slows down significantly during the middle portion of the animation, then returns to normal speed. This speed variation is controlled by a modifier that affects the dot's motion continuously throughout the animation.", "code": "from manim import *\n\nclass SpeedModifierUpdaterExample(Scene):\n def construct(self):\n a = Dot().shift(LEFT * 4)\n self.add(a)\n\n ChangeSpeed.add_updater(a, lambda x, dt: x.shift(RIGHT * 4 * dt))\n self.play(\n ChangeSpeed(\n Wait(2),\n speedinfo={0.4: 1, 0.5: 0.2, 0.8: 0.2, 1: 1},\n affects_speed_updaters=True,\n )\n )", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a dot on the far left side of the screen. It begins moving smoothly to the right, but its speed varies over time: it starts at normal speed, slows down significantly during the middle portion of the animation, then returns to normal speed. This speed variation is controlled by a modifier that affects the dot's motion continuously throughout the animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SpeedModifierUpdaterExample(Scene):\n def construct(self):\n a = Dot().shift(LEFT * 4)\n self.add(a)\n\n ChangeSpeed.add_updater(a, lambda x, dt: x.shift(RIGHT * 4 * dt))\n self.play(\n ChangeSpeed(\n Wait(2),\n speedinfo={0.4: 1, 0.5: 0.2, 0.8: 0.2, 1: 1},\n affects_speed_updaters=True,\n )\n )\n```"}]}
{"id": "ManimBench-v1_000288", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PointCloudDotExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display three point cloud dots arranged horizontally. The first is red with default styling, the second is larger with a thicker outline, and the third has a lower point density, making it appear more sparse. All three are shown together as a grouped visual comparison.", "code": "from manim import *\n\nclass PointCloudDotExample(Scene):\n def construct(self):\n cloud_1 = PointCloudDot(color=RED)\n cloud_2 = PointCloudDot(stroke_width=4, radius=1)\n cloud_3 = PointCloudDot(density=15)\n\n group = Group(cloud_1, cloud_2, cloud_3).arrange()\n self.add(group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three point cloud dots arranged horizontally. The first is red with default styling, the second is larger with a thicker outline, and the third has a lower point density, making it appear more sparse. All three are shown together as a grouped visual comparison."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PointCloudDotExample(Scene):\n def construct(self):\n cloud_1 = PointCloudDot(color=RED)\n cloud_2 = PointCloudDot(stroke_width=4, radius=1)\n cloud_3 = PointCloudDot(density=15)\n\n group = Group(cloud_1, cloud_2, cloud_3).arrange()\n self.add(group)\n```"}]}
{"id": "ManimBench-v1_000289", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CoordsToPointExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 9, "has_reasoning": false, "prompt": "Display a coordinate system with labeled axes and grid lines. A green dot is placed at the point (2, 2) relative to the axes, with dashed guide lines extending from the axes to the dot. A red dot is also placed at the same (2, 2) location, but relative to the scene's default coordinate system. This illustrates the difference between placing objects using axis-based coordinates versus scene-based coordinates.", "code": "from manim import *\n\nclass CoordsToPointExample(Scene):\n def construct(self):\n ax = Axes().add_coordinates()\n\n # a dot with respect to the axes\n dot_axes = Dot(ax.coords_to_point(2, 2), color=GREEN)\n lines = ax.get_lines_to_point(ax.c2p(2,2))\n\n # a dot with respect to the scene\n # the default plane corresponds to the coordinates of the scene.\n plane = NumberPlane()\n dot_scene = Dot((2,2,0), color=RED)\n\n self.add(plane, dot_scene, ax, dot_axes, lines)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a coordinate system with labeled axes and grid lines. A green dot is placed at the point (2, 2) relative to the axes, with dashed guide lines extending from the axes to the dot. A red dot is also placed at the same (2, 2) location, but relative to the scene's default coordinate system. This illustrates the difference between placing objects using axis-based coordinates versus scene-based coordinates."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CoordsToPointExample(Scene):\n def construct(self):\n ax = Axes().add_coordinates()\n\n # a dot with respect to the axes\n dot_axes = Dot(ax.coords_to_point(2, 2), color=GREEN)\n lines = ax.get_lines_to_point(ax.c2p(2,2))\n\n # a dot with respect to the scene\n # the default plane corresponds to the coordinates of the scene.\n plane = NumberPlane()\n dot_scene = Dot((2,2,0), color=RED)\n\n self.add(plane, dot_scene, ax, dot_axes, lines)\n```"}]}
{"id": "ManimBench-v1_000290", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "FadeInExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 15, "has_reasoning": false, "prompt": "Display a dot positioned at the upper left. Then animate the text “FadeIn with shift or target_position and scale” appearing in four parts: the first part fades in normally, the second fades in while shifting upward, the third fades in while moving toward the dot, and the fourth fades in while scaling up. Each part appears with a delay between them.", "code": "from manim import *\n\nclass FadeInExample(Scene):\n def construct(self):\n dot = Dot(UP * 2 + LEFT)\n self.add(dot)\n tex = Tex(\n \"FadeIn with \", \"shift \", r\" or target\\_position\", \" and scale\"\n ).scale(1)\n animations = [\n FadeIn(tex[0]),\n FadeIn(tex[1], shift=DOWN),\n FadeIn(tex[2], target_position=dot),\n FadeIn(tex[3], scale=1.5),\n ]\n self.play(AnimationGroup(*animations, lag_ratio=0.5))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a dot positioned at the upper left. Then animate the text “FadeIn with shift or target_position and scale” appearing in four parts: the first part fades in normally, the second fades in while shifting upward, the third fades in while moving toward the dot, and the fourth fades in while scaling up. Each part appears with a delay between them."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass FadeInExample(Scene):\n def construct(self):\n dot = Dot(UP * 2 + LEFT)\n self.add(dot)\n tex = Tex(\n \"FadeIn with \", \"shift \", r\" or target\\_position\", \" and scale\"\n ).scale(1)\n animations = [\n FadeIn(tex[0]),\n FadeIn(tex[1], shift=DOWN),\n FadeIn(tex[2], target_position=dot),\n FadeIn(tex[3], scale=1.5),\n ]\n self.play(AnimationGroup(*animations, lag_ratio=0.5))\n```"}]}
{"id": "ManimBench-v1_000291", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UsefulAnnotations", "scene_base": "Scene", "num_animations": 1, "num_lines": 13, "has_reasoning": false, "prompt": "Display a vertical sequence of annotation elements centered on screen: \n\n- A plain dot\n- A dot with an annotation ring\n- A dot labeled \"ii\"\n- A dot labeled with an orange Greek letter alpha\n- A large left-to-right curved arrow bending downward\n- A left-to-right curved arrow bending upward\n- Lastly, a double-headed curved arrow pointing right.\n\nEach of the above element is evenly spaced vertically.", "code": "from manim import *\n\nclass UsefulAnnotations(Scene):\n def construct(self):\n m0 = Dot()\n m1 = AnnotationDot()\n m2 = LabeledDot(\"ii\")\n m3 = LabeledDot(MathTex(r\"\\alpha\").set_color(ORANGE))\n m4 = CurvedArrow(2*LEFT, 2*RIGHT, radius= -5)\n m5 = CurvedArrow(2*LEFT, 2*RIGHT, radius= 8)\n m6 = CurvedDoubleArrow(ORIGIN, 2*RIGHT)\n\n self.add(m0, m1, m2, m3, m4, m5, m6)\n for i, mobj in enumerate(self.mobjects):\n mobj.shift(DOWN * (i-3))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a vertical sequence of annotation elements centered on screen: \n\n- A plain dot\n- A dot with an annotation ring\n- A dot labeled \"ii\"\n- A dot labeled with an orange Greek letter alpha\n- A large left-to-right curved arrow bending downward\n- A left-to-right curved arrow bending upward\n- Lastly, a double-headed curved arrow pointing right.\n\nEach of the above element is evenly spaced vertically."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UsefulAnnotations(Scene):\n def construct(self):\n m0 = Dot()\n m1 = AnnotationDot()\n m2 = LabeledDot(\"ii\")\n m3 = LabeledDot(MathTex(r\"\\alpha\").set_color(ORANGE))\n m4 = CurvedArrow(2*LEFT, 2*RIGHT, radius= -5)\n m5 = CurvedArrow(2*LEFT, 2*RIGHT, radius= 8)\n m6 = CurvedDoubleArrow(ORIGIN, 2*RIGHT)\n\n self.add(m0, m1, m2, m3, m4, m5, m6)\n for i, mobj in enumerate(self.mobjects):\n mobj.shift(DOWN * (i-3))\n```"}]}
{"id": "ManimBench-v1_000292", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "EllipseExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display two ellipses arranged horizontally: a tall blue ellipse on the left and a wide dark blue ellipse on the right, with space between them.", "code": "from manim import *\n\nclass EllipseExample(Scene):\n def construct(self):\n ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B)\n ellipse_2 = Ellipse(width=4.0, height=1.0, color=BLUE_D)\n ellipse_group = Group(ellipse_1,ellipse_2).arrange(buff=1)\n self.add(ellipse_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two ellipses arranged horizontally: a tall blue ellipse on the left and a wide dark blue ellipse on the right, with space between them."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass EllipseExample(Scene):\n def construct(self):\n ellipse_1 = Ellipse(width=2.0, height=4.0, color=BLUE_B)\n ellipse_2 = Ellipse(width=4.0, height=1.0, color=BLUE_D)\n ellipse_group = Group(ellipse_1,ellipse_2).arrange(buff=1)\n self.add(ellipse_group)\n```"}]}
{"id": "ManimBench-v1_000293", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExampleTorus", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a 3D scene with a coordinate axis system and a torus (doughnut-shaped surface) centered in the scene. The camera is angled from above and slightly to the side to provide a clear view of the torus's circular structure.", "code": "from manim import *\n\nclass ExampleTorus(ThreeDScene):\n def construct(self):\n axes = ThreeDAxes()\n torus = Torus()\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n self.add(axes, torus)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D scene with a coordinate axis system and a torus (doughnut-shaped surface) centered in the scene. The camera is angled from above and slightly to the side to provide a clear view of the torus's circular structure."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExampleTorus(ThreeDScene):\n def construct(self):\n axes = ThreeDAxes()\n torus = Torus()\n self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)\n self.add(axes, torus)\n```"}]}
{"id": "ManimBench-v1_000294", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ArcShapeIris", "scene_base": "Scene", "num_animations": 2, "num_lines": 9, "has_reasoning": false, "prompt": "Display a group of concentric circles, each with increasing radius and a different color from dark brown through various shades of blue, teal, green, and yellow. The circles are centered on the screen, creating a layered, iris-like visual effect.", "code": "from manim import *\n\nclass ArcShapeIris(Scene):\n def construct(self):\n colors = [DARK_BROWN, BLUE_E, BLUE_D, BLUE_A, TEAL_B, GREEN_B, YELLOW_E]\n radius = [1 + rad * 0.1 for rad in range(len(colors))]\n\n circles_group = VGroup()\n\n # zip(radius, color) makes the iterator [(radius[i], color[i]) for i in range(radius)]\n circles_group.add(*[Circle(radius=rad, stroke_width=10, color=col)\n for rad, col in zip(radius, colors)])\n self.add(circles_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a group of concentric circles, each with increasing radius and a different color from dark brown through various shades of blue, teal, green, and yellow. The circles are centered on the screen, creating a layered, iris-like visual effect."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArcShapeIris(Scene):\n def construct(self):\n colors = [DARK_BROWN, BLUE_E, BLUE_D, BLUE_A, TEAL_B, GREEN_B, YELLOW_E]\n radius = [1 + rad * 0.1 for rad in range(len(colors))]\n\n circles_group = VGroup()\n\n # zip(radius, color) makes the iterator [(radius[i], color[i]) for i in range(radius)]\n circles_group.add(*[Circle(radius=rad, stroke_width=10, color=col)\n for rad, col in zip(radius, colors)])\n self.add(circles_group)\n```"}]}
{"id": "ManimBench-v1_000295", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "FadeTransformSubmobjects", "scene_base": "Scene", "num_animations": 3, "num_lines": 15, "has_reasoning": false, "prompt": "Display two groups of shapes: on the upper left, a square and a circle shifted diagonally; on the upper right, a circle and a triangle also shifted diagonally. Below each group is a copy of the same arrangement.\n\nFirst, both upper groups fade in. Then:\n\n- The upper left group transforms into the upper right group using a smooth fade transition.\n- The lower left group transforms into the lower right group using a piecewise fade, where each individual shape fades and morphs into its corresponding target.\n\nFinally, all shapes fade out together.", "code": "from manim import *\n\nclass FadeTransformSubmobjects(Scene):\n def construct(self):\n src = VGroup(Square(), Circle().shift(LEFT + UP))\n src.shift(3*LEFT + 2*UP)\n src_copy = src.copy().shift(4*DOWN)\n\n target = VGroup(Circle(), Triangle().shift(RIGHT + DOWN))\n target.shift(3*RIGHT + 2*UP)\n target_copy = target.copy().shift(4*DOWN)\n\n self.play(FadeIn(src), FadeIn(src_copy))\n self.play(\n FadeTransform(src, target),\n FadeTransformPieces(src_copy, target_copy)\n )\n self.play(*[FadeOut(mobj) for mobj in self.mobjects])", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two groups of shapes: on the upper left, a square and a circle shifted diagonally; on the upper right, a circle and a triangle also shifted diagonally. Below each group is a copy of the same arrangement.\n\nFirst, both upper groups fade in. Then:\n\n- The upper left group transforms into the upper right group using a smooth fade transition.\n- The lower left group transforms into the lower right group using a piecewise fade, where each individual shape fades and morphs into its corresponding target.\n\nFinally, all shapes fade out together."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass FadeTransformSubmobjects(Scene):\n def construct(self):\n src = VGroup(Square(), Circle().shift(LEFT + UP))\n src.shift(3*LEFT + 2*UP)\n src_copy = src.copy().shift(4*DOWN)\n\n target = VGroup(Circle(), Triangle().shift(RIGHT + DOWN))\n target.shift(3*RIGHT + 2*UP)\n target_copy = target.copy().shift(4*DOWN)\n\n self.play(FadeIn(src), FadeIn(src_copy))\n self.play(\n FadeTransform(src, target),\n FadeTransformPieces(src_copy, target_copy)\n )\n self.play(*[FadeOut(mobj) for mobj in self.mobjects])\n```"}]}
{"id": "ManimBench-v1_000296", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UsingFlash", "scene_base": "Scene", "num_animations": 3, "num_lines": 7, "has_reasoning": false, "prompt": "Display the text “Flash the dot below:” at the top of the screen with a yellow dot positioned below it. Then animate a flashing effect around the dot to draw attention to it.", "code": "from manim import *\n\nclass UsingFlash(Scene):\n def construct(self):\n dot = Dot(color=YELLOW).shift(DOWN)\n self.add(Tex(\"Flash the dot below:\"), dot)\n self.play(Flash(dot))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the text “Flash the dot below:” at the top of the screen with a yellow dot positioned below it. Then animate a flashing effect around the dot to draw attention to it."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UsingFlash(Scene):\n def construct(self):\n dot = Dot(color=YELLOW).shift(DOWN)\n self.add(Tex(\"Flash the dot below:\"), dot)\n self.play(Flash(dot))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000297", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExamplePrism", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a 3D scene with the camera angled from above and to the side. Show a small rectangular prism rotated onto its side, and a larger rectangular prism positioned to its right. Both prisms are static and appear simultaneously in the scene.", "code": "from manim import *\n\nclass ExamplePrism(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=60 * DEGREES, theta=150 * DEGREES)\n prismSmall = Prism(dimensions=[1, 2, 3]).rotate(PI / 2)\n prismLarge = Prism(dimensions=[1.5, 3, 4.5]).move_to([2, 0, 0])\n self.add(prismSmall, prismLarge)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D scene with the camera angled from above and to the side. Show a small rectangular prism rotated onto its side, and a larger rectangular prism positioned to its right. Both prisms are static and appear simultaneously in the scene."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExamplePrism(ThreeDScene):\n def construct(self):\n self.set_camera_orientation(phi=60 * DEGREES, theta=150 * DEGREES)\n prismSmall = Prism(dimensions=[1, 2, 3]).rotate(PI / 2)\n prismLarge = Prism(dimensions=[1.5, 3, 4.5]).move_to([2, 0, 0])\n self.add(prismSmall, prismLarge)\n```"}]}
{"id": "ManimBench-v1_000298", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ImplicitFunctionExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a yellow curve representing the implicit function defined by the equation \\( x y^2 - x^2 y - 2 = 0 \\), overlaid on a coordinate grid. The graph and the number plane appear together without animation.", "code": "from manim import *\n\nclass ImplicitFunctionExample(Scene):\n def construct(self):\n graph = ImplicitFunction(\n lambda x, y: x * y ** 2 - x ** 2 * y - 2,\n color=YELLOW\n )\n self.add(NumberPlane(), graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a yellow curve representing the implicit function defined by the equation \\( x y^2 - x^2 y - 2 = 0 \\), overlaid on a coordinate grid. The graph and the number plane appear together without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ImplicitFunctionExample(Scene):\n def construct(self):\n graph = ImplicitFunction(\n lambda x, y: x * y ** 2 - x ** 2 * y - 2,\n color=YELLOW\n )\n self.add(NumberPlane(), graph)\n```"}]}
{"id": "ManimBench-v1_000299", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SpinInFromNothingExample", "scene_base": "Scene", "num_animations": 3, "num_lines": 8, "has_reasoning": false, "prompt": "Display three squares arranged in a row. Animate the first square spinning into view from nothing with a default rotation. Then animate the second square spinning in with a full 360-degree rotation. Finally, animate the third square spinning into view with its center point highlighted in red.", "code": "from manim import *\n\nclass SpinInFromNothingExample(Scene):\n def construct(self):\n squares = [Square() for _ in range(3)]\n VGroup(*squares).set_x(0).arrange(buff=2)\n self.play(SpinInFromNothing(squares[0]))\n self.play(SpinInFromNothing(squares[1], angle=2 * PI))\n self.play(SpinInFromNothing(squares[2], point_color=RED))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three squares arranged in a row. Animate the first square spinning into view from nothing with a default rotation. Then animate the second square spinning in with a full 360-degree rotation. Finally, animate the third square spinning into view with its center point highlighted in red."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SpinInFromNothingExample(Scene):\n def construct(self):\n squares = [Square() for _ in range(3)]\n VGroup(*squares).set_x(0).arrange(buff=2)\n self.play(SpinInFromNothing(squares[0]))\n self.play(SpinInFromNothing(squares[1], angle=2 * PI))\n self.play(SpinInFromNothing(squares[2], point_color=RED))\n```"}]}
{"id": "ManimBench-v1_000300", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "VariableExample", "scene_base": "Scene", "num_animations": 3, "num_lines": 11, "has_reasoning": false, "prompt": "Display two on-screen variables: one labeled “x” and the other “x²”, both showing values with three decimal places. Initially, “x” is set to 2.0 and “x²” to 4.0. As “x” animates smoothly to 5.0 over two seconds, “x²” updates in real time to reflect the square of “x”, maintaining a dynamic link between the two values.", "code": "from manim import *\n\nclass VariableExample(Scene):\n def construct(self):\n start = 2.0\n\n x_var = Variable(start, 'x', num_decimal_places=3)\n sqr_var = Variable(start**2, 'x^2', num_decimal_places=3)\n Group(x_var, sqr_var).arrange(DOWN)\n\n sqr_var.add_updater(lambda v: v.tracker.set_value(x_var.tracker.get_value()**2))\n\n self.add(x_var, sqr_var)\n self.play(x_var.tracker.animate.set_value(5), run_time=2, rate_func=linear)\n self.wait(0.1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two on-screen variables: one labeled “x” and the other “x²”, both showing values with three decimal places. Initially, “x” is set to 2.0 and “x²” to 4.0. As “x” animates smoothly to 5.0 over two seconds, “x²” updates in real time to reflect the square of “x”, maintaining a dynamic link between the two values."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass VariableExample(Scene):\n def construct(self):\n start = 2.0\n\n x_var = Variable(start, 'x', num_decimal_places=3)\n sqr_var = Variable(start**2, 'x^2', num_decimal_places=3)\n Group(x_var, sqr_var).arrange(DOWN)\n\n sqr_var.add_updater(lambda v: v.tracker.set_value(x_var.tracker.get_value()**2))\n\n self.add(x_var, sqr_var)\n self.play(x_var.tracker.animate.set_value(5), run_time=2, rate_func=linear)\n self.wait(0.1)\n```"}]}
{"id": "ManimBench-v1_000301", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "BraceBPExample", "scene_base": "Scene", "num_animations": 3, "num_lines": 9, "has_reasoning": false, "prompt": "Display a coordinate grid using a number plane. Then, create a brace between two points: one at the origin and the other at position (1, 2). The brace appears connecting these two points diagonally, and the scene pauses for two seconds to show the result.", "code": "from manim import *\n\nclass BraceBPExample(Scene):\n def construct(self):\n p1 = [0,0,0]\n p2 = [1,2,0]\n brace = BraceBetweenPoints(p1,p2)\n self.play(Create(NumberPlane()))\n self.play(Create(brace))\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a coordinate grid using a number plane. Then, create a brace between two points: one at the origin and the other at position (1, 2). The brace appears connecting these two points diagonally, and the scene pauses for two seconds to show the result."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass BraceBPExample(Scene):\n def construct(self):\n p1 = [0,0,0]\n p2 = [1,2,0]\n brace = BraceBetweenPoints(p1,p2)\n self.play(Create(NumberPlane()))\n self.play(Create(brace))\n self.wait(2)\n```"}]}
{"id": "ManimBench-v1_000302", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MatrixExamples", "scene_base": "Scene", "num_animations": 2, "num_lines": 27, "has_reasoning": false, "prompt": "Display six different matrix styles arranged in a grid:\n\n- The first is a 2×2 matrix with elements including the symbol \\( \\pi \\), enclosed in square brackets.\n- The second is a 2×3 matrix with custom spacing and curly braces as brackets. The second column is highlighted with a surrounding rectangle.\n- The third is a 2×2 matrix with elements aligned to the upper-left corner, enclosed in parentheses.\n- The fourth is a 2×2 matrix enclosed in angle brackets.\n- The fifth is a 2×2 matrix with each column colored differently (red and green).\n- The sixth is a 2×2 matrix with each row colored differently (red and green).\n\nAll matrices appear on screen simultaneously without animation.", "code": "from manim import *\n\nclass MatrixExamples(Scene):\n def construct(self):\n m0 = Matrix([[2, r\"\\pi\"], [-1, 1]])\n m1 = Matrix([[2, 0, 4], [-1, 1, 5]],\n v_buff=1.3,\n h_buff=0.8,\n bracket_h_buff=SMALL_BUFF,\n bracket_v_buff=SMALL_BUFF,\n left_bracket=r\"\\{\",\n right_bracket=r\"\\}\")\n m1.add(SurroundingRectangle(m1.get_columns()[1]))\n m2 = Matrix([[2, 1], [-1, 3]],\n element_alignment_corner=UL,\n left_bracket=\"(\",\n right_bracket=\")\")\n m3 = Matrix([[2, 1], [-1, 3]],\n left_bracket=r\"\\langle\",\n right_bracket=r\"\\rangle\")\n m4 = Matrix([[2, 1], [-1, 3]],\n ).set_column_colors(RED, GREEN)\n m5 = Matrix([[2, 1], [-1, 3]],\n ).set_row_colors(RED, GREEN)\n g = Group(\n m0,m1,m2,m3,m4,m5\n ).arrange_in_grid(buff=2)\n self.add(g)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display six different matrix styles arranged in a grid:\n\n- The first is a 2×2 matrix with elements including the symbol \\( \\pi \\), enclosed in square brackets.\n- The second is a 2×3 matrix with custom spacing and curly braces as brackets. The second column is highlighted with a surrounding rectangle.\n- The third is a 2×2 matrix with elements aligned to the upper-left corner, enclosed in parentheses.\n- The fourth is a 2×2 matrix enclosed in angle brackets.\n- The fifth is a 2×2 matrix with each column colored differently (red and green).\n- The sixth is a 2×2 matrix with each row colored differently (red and green).\n\nAll matrices appear on screen simultaneously without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MatrixExamples(Scene):\n def construct(self):\n m0 = Matrix([[2, r\"\\pi\"], [-1, 1]])\n m1 = Matrix([[2, 0, 4], [-1, 1, 5]],\n v_buff=1.3,\n h_buff=0.8,\n bracket_h_buff=SMALL_BUFF,\n bracket_v_buff=SMALL_BUFF,\n left_bracket=r\"\\{\",\n right_bracket=r\"\\}\")\n m1.add(SurroundingRectangle(m1.get_columns()[1]))\n m2 = Matrix([[2, 1], [-1, 3]],\n element_alignment_corner=UL,\n left_bracket=\"(\",\n right_bracket=\")\")\n m3 = Matrix([[2, 1], [-1, 3]],\n left_bracket=r\"\\langle\",\n right_bracket=r\"\\rangle\")\n m4 = Matrix([[2, 1], [-1, 3]],\n ).set_column_colors(RED, GREEN)\n m5 = Matrix([[2, 1], [-1, 3]],\n ).set_row_colors(RED, GREEN)\n g = Group(\n m0,m1,m2,m3,m4,m5\n ).arrange_in_grid(buff=2)\n self.add(g)\n```"}]}
{"id": "ManimBench-v1_000303", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "IndexLabelsMathTex", "scene_base": "Scene", "num_animations": 2, "num_lines": 8, "has_reasoning": false, "prompt": "Display the binomial coefficient \\( \\binom{2n}{n+2} \\) in large font. Index labels are added to each character in the expression for reference. The characters \"2n\" in the numerator are colored yellow, and \"n+2\" in the denominator are colored red.", "code": "from manim import *\n\nclass IndexLabelsMathTex(Scene):\n def construct(self):\n text = MathTex(r\"\\binom{2n}{n+2}\", font_size=96)\n\n # index the first (and only) term of the MathTex mob\n self.add(index_labels(text[0]))\n\n text[0][1:3].set_color(YELLOW)\n text[0][3:6].set_color(RED)\n self.add(text)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the binomial coefficient \\( \\binom{2n}{n+2} \\) in large font. Index labels are added to each character in the expression for reference. The characters \"2n\" in the numerator are colored yellow, and \"n+2\" in the denominator are colored red."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass IndexLabelsMathTex(Scene):\n def construct(self):\n text = MathTex(r\"\\binom{2n}{n+2}\", font_size=96)\n\n # index the first (and only) term of the MathTex mob\n self.add(index_labels(text[0]))\n\n text[0][1:3].set_color(YELLOW)\n text[0][3:6].set_color(RED)\n self.add(text)\n```"}]}
{"id": "ManimBench-v1_000304", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AnimationOverrideExample", "scene_base": "Scene", "num_animations": 4, "num_lines": 25, "has_reasoning": false, "prompt": "Display a circle containing the text “hello!” centered inside it. The circle and text are drawn together. Then, the text is smoothly removed using an animation, leaving only the circle visible. Afterward, the scene pauses briefly.", "code": "from manim import *\n\nclass CircleWithContent(VGroup):\n def __init__(self, content):\n super().__init__()\n self.circle = Circle()\n self.content = content\n self.add(self.circle, content)\n content.move_to(self.circle.get_center())\n\n def clear_content(self):\n self.remove(self.content)\n self.content = None\n\n @override_animate(clear_content)\n def _clear_content_animation(self, anim_args=None):\n if anim_args is None:\n anim_args = {}\n anim = Uncreate(self.content, **anim_args)\n self.clear_content()\n return anim\n\nclass AnimationOverrideExample(Scene):\n def construct(self):\n t = Text(\"hello!\")\n my_mobject = CircleWithContent(t)\n self.play(Create(my_mobject))\n self.play(my_mobject.animate.clear_content())\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a circle containing the text “hello!” centered inside it. The circle and text are drawn together. Then, the text is smoothly removed using an animation, leaving only the circle visible. Afterward, the scene pauses briefly."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CircleWithContent(VGroup):\n def __init__(self, content):\n super().__init__()\n self.circle = Circle()\n self.content = content\n self.add(self.circle, content)\n content.move_to(self.circle.get_center())\n\n def clear_content(self):\n self.remove(self.content)\n self.content = None\n\n @override_animate(clear_content)\n def _clear_content_animation(self, anim_args=None):\n if anim_args is None:\n anim_args = {}\n anim = Uncreate(self.content, **anim_args)\n self.clear_content()\n return anim\n\nclass AnimationOverrideExample(Scene):\n def construct(self):\n t = Text(\"hello!\")\n my_mobject = CircleWithContent(t)\n self.play(Create(my_mobject))\n self.play(my_mobject.animate.clear_content())\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000305", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetEntriesWithoutLabelsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 14, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. Each of the four cell entries is colored differently—blue, green, yellow, and red. The bottom-right cell is also rotated upside down, while the labels remain unchanged.", "code": "from manim import *\n\nclass GetEntriesWithoutLabelsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n ent = table.get_entries_without_labels()\n colors = [BLUE, GREEN, YELLOW, RED]\n for k in range(len(colors)):\n ent[k].set_color(colors[k])\n table.get_entries_without_labels((2,2)).rotate(PI)\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. Each of the four cell entries is colored differently—blue, green, yellow, and red. The bottom-right cell is also rotated upside down, while the labels remain unchanged."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetEntriesWithoutLabelsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n ent = table.get_entries_without_labels()\n colors = [BLUE, GREEN, YELLOW, RED]\n for k in range(len(colors)):\n ent[k].set_color(colors[k])\n table.get_entries_without_labels((2,2)).rotate(PI)\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000306", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AngleFromThreePointsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display two angles formed at the origin: one standard angle between the upward and leftward directions, and a larger red angle with a thicker stroke between the diagonal upper-left and rightward directions, drawn in the opposite (reflex) direction.", "code": "from manim import *\n\nclass AngleFromThreePointsExample(Scene):\n def construct(self):\n sample_angle = Angle.from_three_points(UP, ORIGIN, LEFT)\n red_angle = Angle.from_three_points(LEFT + UP, ORIGIN, RIGHT, radius=.8, quadrant=(-1,-1), color=RED, stroke_width=8, other_angle=True)\n self.add(red_angle, sample_angle)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two angles formed at the origin: one standard angle between the upward and leftward directions, and a larger red angle with a thicker stroke between the diagonal upper-left and rightward directions, drawn in the opposite (reflex) direction."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AngleFromThreePointsExample(Scene):\n def construct(self):\n sample_angle = Angle.from_three_points(UP, ORIGIN, LEFT)\n red_angle = Angle.from_three_points(LEFT + UP, ORIGIN, RIGHT, radius=.8, quadrant=(-1,-1), color=RED, stroke_width=8, other_angle=True)\n self.add(red_angle, sample_angle)\n```"}]}
{"id": "ManimBench-v1_000307", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "UnderlineExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 20, "has_reasoning": false, "prompt": "Display five lines of styled text arranged vertically:\n\n1. The first line shows the word \"bla\" with a green double underline.\n2. The second line displays \"xxx\" with a green single underline, followed by \"aabb\" in a yellow-to-red gradient, and ending with \"y\".\n3. The third line is similar to the second, but the gradient on \"aabb\" is offset slightly to the left, altering the color transition.\n4. The fourth line shows \"xxx\" with a green double underline, followed by \"aabb\" in a yellow-to-red gradient, and ending with \"y\".\n5. The fifth line is like the fourth, but the gradient on \"aabb\" is offset further to the left, shifting the gradient effect more noticeably.\n\nAll lines are centered and stacked vertically on the screen.", "code": "from manim import *\n\nclass UnderlineExample(Scene):\n def construct(self):\n text1 = MarkupText(\n 'bla'\n )\n text2 = MarkupText(\n 'xxxaabby'\n )\n text3 = MarkupText(\n 'xxxaabby'\n )\n text4 = MarkupText(\n 'xxxaabby'\n )\n text5 = MarkupText(\n 'xxxaabby'\n )\n group = VGroup(text1, text2, text3, text4, text5).arrange(DOWN)\n self.add(group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display five lines of styled text arranged vertically:\n\n1. The first line shows the word \"bla\" with a green double underline.\n2. The second line displays \"xxx\" with a green single underline, followed by \"aabb\" in a yellow-to-red gradient, and ending with \"y\".\n3. The third line is similar to the second, but the gradient on \"aabb\" is offset slightly to the left, altering the color transition.\n4. The fourth line shows \"xxx\" with a green double underline, followed by \"aabb\" in a yellow-to-red gradient, and ending with \"y\".\n5. The fifth line is like the fourth, but the gradient on \"aabb\" is offset further to the left, shifting the gradient effect more noticeably.\n\nAll lines are centered and stacked vertically on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass UnderlineExample(Scene):\n def construct(self):\n text1 = MarkupText(\n 'bla'\n )\n text2 = MarkupText(\n 'xxxaabby'\n )\n text3 = MarkupText(\n 'xxxaabby'\n )\n text4 = MarkupText(\n 'xxxaabby'\n )\n text5 = MarkupText(\n 'xxxaabby'\n )\n group = VGroup(text1, text2, text3, text4, text5).arrange(DOWN)\n self.add(group)\n```"}]}
{"id": "ManimBench-v1_000308", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CircularLayout", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a graph with six labeled nodes arranged in a circular layout. The nodes are connected by a combination of sequential and cross-linking edges, forming a loop with additional diagonal connections between non-adjacent nodes. This creates a visually dense and interconnected circular network.", "code": "from manim import *\n\nclass CircularLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"circular\",\n labels=True\n )\n self.add(graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a graph with six labeled nodes arranged in a circular layout. The nodes are connected by a combination of sequential and cross-linking edges, forming a loop with additional diagonal connections between non-adjacent nodes. This creates a visually dense and interconnected circular network."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CircularLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"circular\",\n labels=True\n )\n self.add(graph)\n```"}]}
{"id": "ManimBench-v1_000309", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetHorizontalLinesExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. All horizontal lines in the table, including those separating rows and labels, are colored red to visually emphasize the row divisions.", "code": "from manim import *\n\nclass GetHorizontalLinesExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.get_horizontal_lines().set_color(RED)\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. All horizontal lines in the table, including those separating rows and labels, are colored red to visually emphasize the row divisions."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetHorizontalLinesExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.get_horizontal_lines().set_color(RED)\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000310", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "TangentAnimation", "scene_base": "Scene", "num_animations": 2, "num_lines": 22, "has_reasoning": false, "prompt": "Display a coordinate grid with a red sine curve plotted across it. A blue dot moves smoothly along the curve from left to right, while a yellow tangent line dynamically updates to stay tangent to the curve at the dot’s position. The animation visually demonstrates how the tangent line changes as it follows the sine wave.", "code": "from manim import *\n\nclass TangentAnimation(Scene):\n def construct(self):\n ax = Axes()\n sine = ax.plot(np.sin, color=RED)\n alpha = ValueTracker(0)\n point = always_redraw(\n lambda: Dot(\n sine.point_from_proportion(alpha.get_value()),\n color=BLUE\n )\n )\n tangent = always_redraw(\n lambda: TangentLine(\n sine,\n alpha=alpha.get_value(),\n color=YELLOW,\n length=4\n )\n )\n self.add(ax, sine, point, tangent)\n self.play(alpha.animate.set_value(1), rate_func=linear, run_time=2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a coordinate grid with a red sine curve plotted across it. A blue dot moves smoothly along the curve from left to right, while a yellow tangent line dynamically updates to stay tangent to the curve at the dot’s position. The animation visually demonstrates how the tangent line changes as it follows the sine wave."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass TangentAnimation(Scene):\n def construct(self):\n ax = Axes()\n sine = ax.plot(np.sin, color=RED)\n alpha = ValueTracker(0)\n point = always_redraw(\n lambda: Dot(\n sine.point_from_proportion(alpha.get_value()),\n color=BLUE\n )\n )\n tangent = always_redraw(\n lambda: TangentLine(\n sine,\n alpha=alpha.get_value(),\n color=YELLOW,\n length=4\n )\n )\n self.add(ax, sine, point, tangent)\n self.play(alpha.animate.set_value(1), rate_func=linear, run_time=2)\n```"}]}
{"id": "ManimBench-v1_000311", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AddHighlightedCellExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. The bottom-right cell is highlighted in green to draw attention, while the rest of the table remains unhighlighted.", "code": "from manim import *\n\nclass AddHighlightedCellExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.add_highlighted_cell((2,2), color=GREEN)\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. The bottom-right cell is highlighted in green to draw attention, while the rest of the table remains unhighlighted."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AddHighlightedCellExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n table.add_highlighted_cell((2,2), color=GREEN)\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000312", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ChangeBarValuesExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 12, "has_reasoning": false, "prompt": "Display a bar chart with 11 bars representing values from -10 to 10 in increments of 2. After the chart appears, the bar values are updated to show the reversed sequence (from 10 down to -10). Each bar is labeled with its new value. The chart and updated labels appear without animation.", "code": "from manim import *\n\nclass ChangeBarValuesExample(Scene):\n def construct(self):\n values=[-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10]\n\n chart = BarChart(\n values,\n y_range=[-10, 10, 2],\n y_axis_config={\"font_size\": 24},\n )\n self.add(chart)\n\n chart.change_bar_values(list(reversed(values)))\n self.add(chart.get_bar_labels(font_size=24))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a bar chart with 11 bars representing values from -10 to 10 in increments of 2. After the chart appears, the bar values are updated to show the reversed sequence (from 10 down to -10). Each bar is labeled with its new value. The chart and updated labels appear without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ChangeBarValuesExample(Scene):\n def construct(self):\n values=[-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10]\n\n chart = BarChart(\n values,\n y_range=[-10, 10, 2],\n y_axis_config={\"font_size\": 24},\n )\n self.add(chart)\n\n chart.change_bar_values(list(reversed(values)))\n self.add(chart.get_bar_labels(font_size=24))\n```"}]}
{"id": "ManimBench-v1_000313", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetZAxisLabelExample", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a 3D coordinate system with labeled axes. The z-axis is labeled with the text “\\( z \\)-label” using LaTeX formatting. The camera is set at an angled perspective to clearly show the 3D structure and the position of the z-axis label in space.", "code": "from manim import *\n\nclass GetZAxisLabelExample(ThreeDScene):\n def construct(self):\n ax = ThreeDAxes()\n lab = ax.get_z_axis_label(Tex(\"$z$-label\"))\n self.set_camera_orientation(phi=2*PI/5, theta=PI/5)\n self.add(ax, lab)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D coordinate system with labeled axes. The z-axis is labeled with the text “\\( z \\)-label” using LaTeX formatting. The camera is set at an angled perspective to clearly show the 3D structure and the position of the z-axis label in space."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetZAxisLabelExample(ThreeDScene):\n def construct(self):\n ax = ThreeDAxes()\n lab = ax.get_z_axis_label(Tex(\"$z$-label\"))\n self.set_camera_orientation(phi=2*PI/5, theta=PI/5)\n self.add(ax, lab)\n```"}]}
{"id": "ManimBench-v1_000314", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExamplePoint", "scene_base": "Scene", "num_animations": 3, "num_lines": 11, "has_reasoning": false, "prompt": "Display a dense scatter of 400 small colored points randomly distributed across the screen. The points are placed in two overlapping patterns, each using different scaling factors for their grid-like placement. Each point is randomly colored red, green, blue, or yellow, creating a vibrant, speckled visual effect.", "code": "from manim import *\n\nclass ExamplePoint(Scene):\n def construct(self):\n colorList = [RED, GREEN, BLUE, YELLOW]\n for i in range(200):\n point = Point(location=[0.63 * np.random.randint(-4, 4), 0.37 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList))\n self.add(point)\n for i in range(200):\n point = Point(location=[0.37 * np.random.randint(-4, 4), 0.63 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList))\n self.add(point)\n self.add(point)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a dense scatter of 400 small colored points randomly distributed across the screen. The points are placed in two overlapping patterns, each using different scaling factors for their grid-like placement. Each point is randomly colored red, green, blue, or yellow, creating a vibrant, speckled visual effect."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExamplePoint(Scene):\n def construct(self):\n colorList = [RED, GREEN, BLUE, YELLOW]\n for i in range(200):\n point = Point(location=[0.63 * np.random.randint(-4, 4), 0.37 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList))\n self.add(point)\n for i in range(200):\n point = Point(location=[0.37 * np.random.randint(-4, 4), 0.63 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList))\n self.add(point)\n self.add(point)\n```"}]}
{"id": "ManimBench-v1_000315", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DeterminantOfAMatrix", "scene_base": "Scene", "num_animations": 2, "num_lines": 12, "has_reasoning": false, "prompt": "Display a 2×2 matrix \n\\[\n\\begin{bmatrix}\n2 & 0 \\\\\n-1 & 1\n\\end{bmatrix}\n\\] \nfollowed by a determinant expression showing that its determinant is 3. Both the matrix and the determinant text appear on screen simultaneously without animation.", "code": "from manim import *\n\nclass DeterminantOfAMatrix(Scene):\n def construct(self):\n matrix = Matrix([\n [2, 0],\n [-1, 1]\n ])\n\n # scaling down the `det` string\n det = get_det_text(matrix,\n determinant=3,\n initial_scale_factor=1)\n\n # must add the matrix\n self.add(matrix)\n self.add(det)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 matrix \n\\[\n\\begin{bmatrix}\n2 & 0 \\\\\n-1 & 1\n\\end{bmatrix}\n\\] \nfollowed by a determinant expression showing that its determinant is 3. Both the matrix and the determinant text appear on screen simultaneously without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DeterminantOfAMatrix(Scene):\n def construct(self):\n matrix = Matrix([\n [2, 0],\n [-1, 1]\n ])\n\n # scaling down the `det` string\n det = get_det_text(matrix,\n determinant=3,\n initial_scale_factor=1)\n\n # must add the matrix\n self.add(matrix)\n self.add(det)\n```"}]}
{"id": "ManimBench-v1_000316", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetColLabelsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 12, "has_reasoning": false, "prompt": "Display a 2×2 table with row and column labels. The column labels “C1” and “C2” are each assigned a randomly chosen bright color, making them visually distinct from the rest of the table.", "code": "from manim import *\n\nclass GetColLabelsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n lab = table.get_col_labels()\n for item in lab:\n item.set_color(random_bright_color())\n self.add(table)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 table with row and column labels. The column labels “C1” and “C2” are each assigned a randomly chosen bright color, making them visually distinct from the rest of the table."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetColLabelsExample(Scene):\n def construct(self):\n table = Table(\n [[\"First\", \"Second\"],\n [\"Third\",\"Fourth\"]],\n row_labels=[Text(\"R1\"), Text(\"R2\")],\n col_labels=[Text(\"C1\"), Text(\"C2\")])\n lab = table.get_col_labels()\n for item in lab:\n item.set_color(random_bright_color())\n self.add(table)\n```"}]}
{"id": "ManimBench-v1_000317", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ParaSurface", "scene_base": "ThreeDScene", "num_animations": 1, "num_lines": 14, "has_reasoning": false, "prompt": "Display a 3D scene with a coordinate axis system and a curved surface resembling a twisted, vertically stretched ring. The surface is generated using a parametric function and appears in the center of the scene, with the camera angled from above and to the side to highlight its shape.", "code": "from manim import *\n\nclass ParaSurface(ThreeDScene):\n def func(self, u, v):\n return np.array([np.cos(u) * np.cos(v), np.cos(u) * np.sin(v), u])\n\n def construct(self):\n axes = ThreeDAxes(x_range=[-4,4], x_length=8)\n surface = Surface(\n lambda u, v: axes.c2p(*self.func(u, v)),\n u_range=[-PI, PI],\n v_range=[0, TAU],\n resolution=8,\n )\n self.set_camera_orientation(theta=70 * DEGREES, phi=75 * DEGREES)\n self.add(axes, surface)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 3D scene with a coordinate axis system and a curved surface resembling a twisted, vertically stretched ring. The surface is generated using a parametric function and appears in the center of the scene, with the camera angled from above and to the side to highlight its shape."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ParaSurface(ThreeDScene):\n def func(self, u, v):\n return np.array([np.cos(u) * np.cos(v), np.cos(u) * np.sin(v), u])\n\n def construct(self):\n axes = ThreeDAxes(x_range=[-4,4], x_length=8)\n surface = Surface(\n lambda u, v: axes.c2p(*self.func(u, v)),\n u_range=[-PI, PI],\n v_range=[0, TAU],\n resolution=8,\n )\n self.set_camera_orientation(theta=70 * DEGREES, phi=75 * DEGREES)\n self.add(axes, surface)\n```"}]}
{"id": "ManimBench-v1_000318", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PlotExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 25, "has_reasoning": false, "prompt": "Display three coordinate axes arranged in a triangular layout: one in the upper left, one in the upper right, and one along the bottom. Each axis shows a plot of the logarithmic function \\( y = \\log(x) \\), but with different rendering styles:\n\n- The top-left graph shows a smooth red curve with default interpolation.\n- The top-right graph displays a choppy orange curve due to disabled smoothing.\n- The bottom graph presents a highly detailed green curve using a very fine step size for better accuracy.\n\nThis scene visually compares the effects of interpolation and sampling density on graph quality.", "code": "from manim import *\n\nclass PlotExample(Scene):\n def construct(self):\n # construct the axes\n ax_1 = Axes(\n x_range=[0.001, 6],\n y_range=[-8, 2],\n x_length=5,\n y_length=3,\n tips=False,\n )\n ax_2 = ax_1.copy()\n ax_3 = ax_1.copy()\n\n # position the axes\n ax_1.to_corner(UL)\n ax_2.to_corner(UR)\n ax_3.to_edge(DOWN)\n axes = VGroup(ax_1, ax_2, ax_3)\n\n # create the logarithmic curves\n def log_func(x):\n return np.log(x)\n\n # a curve without adjustments; poor interpolation.\n curve_1 = ax_1.plot(log_func, color=PURE_RED)\n\n # disabling interpolation makes the graph look choppy as not enough\n # inputs are available\n curve_2 = ax_2.plot(log_func, use_smoothing=False, color=ORANGE)\n\n # taking more inputs of the curve by specifying a step for the\n # x_range yields expected results, but increases rendering time.\n curve_3 = ax_3.plot(\n log_func, x_range=(0.001, 6, 0.001), color=PURE_GREEN\n )\n\n curves = VGroup(curve_1, curve_2, curve_3)\n\n self.add(axes, curves)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three coordinate axes arranged in a triangular layout: one in the upper left, one in the upper right, and one along the bottom. Each axis shows a plot of the logarithmic function \\( y = \\log(x) \\), but with different rendering styles:\n\n- The top-left graph shows a smooth red curve with default interpolation.\n- The top-right graph displays a choppy orange curve due to disabled smoothing.\n- The bottom graph presents a highly detailed green curve using a very fine step size for better accuracy.\n\nThis scene visually compares the effects of interpolation and sampling density on graph quality."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PlotExample(Scene):\n def construct(self):\n # construct the axes\n ax_1 = Axes(\n x_range=[0.001, 6],\n y_range=[-8, 2],\n x_length=5,\n y_length=3,\n tips=False,\n )\n ax_2 = ax_1.copy()\n ax_3 = ax_1.copy()\n\n # position the axes\n ax_1.to_corner(UL)\n ax_2.to_corner(UR)\n ax_3.to_edge(DOWN)\n axes = VGroup(ax_1, ax_2, ax_3)\n\n # create the logarithmic curves\n def log_func(x):\n return np.log(x)\n\n # a curve without adjustments; poor interpolation.\n curve_1 = ax_1.plot(log_func, color=PURE_RED)\n\n # disabling interpolation makes the graph look choppy as not enough\n # inputs are available\n curve_2 = ax_2.plot(log_func, use_smoothing=False, color=ORANGE)\n\n # taking more inputs of the curve by specifying a step for the\n # x_range yields expected results, but increases rendering time.\n curve_3 = ax_3.plot(\n log_func, x_range=(0.001, 6, 0.001), color=PURE_GREEN\n )\n\n curves = VGroup(curve_1, curve_2, curve_3)\n\n self.add(axes, curves)\n```"}]}
{"id": "ManimBench-v1_000319", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "WarpSquare", "scene_base": "Scene", "num_animations": 2, "num_lines": 10, "has_reasoning": false, "prompt": "Display a square at the center of the screen, then animate it being warped by a complex exponential transformation. The square stretches and curves dramatically, creating a visually striking distortion that maps each point of the square through the exponential function in the complex plane.", "code": "from manim import *\n\nclass WarpSquare(Scene):\n def construct(self):\n square = Square()\n self.play(\n ApplyPointwiseFunction(\n lambda point: complex_to_R3(np.exp(R3_to_complex(point))), square\n )\n )\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square at the center of the screen, then animate it being warped by a complex exponential transformation. The square stretches and curves dramatically, creating a visually striking distortion that maps each point of the square through the exponential function in the complex plane."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass WarpSquare(Scene):\n def construct(self):\n square = Square()\n self.play(\n ApplyPointwiseFunction(\n lambda point: complex_to_R3(np.exp(R3_to_complex(point))), square\n )\n )\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000320", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DisableLigature", "scene_base": "Scene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display the phrase \"fl ligature\" twice in large font, stacked vertically with some spacing. The top version uses a typographic ligature for \"fl\", while the bottom version disables ligatures, showing the \"f\" and \"l\" as separate characters.", "code": "from manim import *\n\nclass DisableLigature(Scene):\n def construct(self):\n li = Text(\"fl ligature\",font_size=96)\n nli = Text(\"fl ligature\", disable_ligatures=True, font_size=96)\n self.add(Group(li, nli).arrange(DOWN, buff=.8))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the phrase \"fl ligature\" twice in large font, stacked vertically with some spacing. The top version uses a typographic ligature for \"fl\", while the bottom version disables ligatures, showing the \"f\" and \"l\" as separate characters."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DisableLigature(Scene):\n def construct(self):\n li = Text(\"fl ligature\",font_size=96)\n nli = Text(\"fl ligature\", disable_ligatures=True, font_size=96)\n self.add(Group(li, nli).arrange(DOWN, buff=.8))\n```"}]}
{"id": "ManimBench-v1_000321", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "LaggedStartMapExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 16, "has_reasoning": false, "prompt": "Display a grid of 35 dots arranged in 5 rows and 7 columns, with a title \"LaggedStartMap\" at the top. A yellow ripple effect animates across the dots and the title, where each element briefly changes to yellow and then returns to its original color. The effect is staggered with a lag ratio of 0.1, creating a wave-like motion.", "code": "from manim import *\n\nclass LaggedStartMapExample(Scene):\n def construct(self):\n title = Tex(\"LaggedStartMap\").to_edge(UP, buff=LARGE_BUFF)\n dots = VGroup(\n *[Dot(radius=0.16) for _ in range(35)]\n ).arrange_in_grid(rows=5, cols=7, buff=MED_LARGE_BUFF)\n self.add(dots, title)\n\n # Animate yellow ripple effect\n for mob in dots, title:\n self.play(LaggedStartMap(\n ApplyMethod, mob,\n lambda m : (m.set_color, YELLOW),\n lag_ratio = 0.1,\n rate_func = there_and_back,\n run_time = 2\n ))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a grid of 35 dots arranged in 5 rows and 7 columns, with a title \"LaggedStartMap\" at the top. A yellow ripple effect animates across the dots and the title, where each element briefly changes to yellow and then returns to its original color. The effect is staggered with a lag ratio of 0.1, creating a wave-like motion."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LaggedStartMapExample(Scene):\n def construct(self):\n title = Tex(\"LaggedStartMap\").to_edge(UP, buff=LARGE_BUFF)\n dots = VGroup(\n *[Dot(radius=0.16) for _ in range(35)]\n ).arrange_in_grid(rows=5, cols=7, buff=MED_LARGE_BUFF)\n self.add(dots, title)\n\n # Animate yellow ripple effect\n for mob in dots, title:\n self.play(LaggedStartMap(\n ApplyMethod, mob,\n lambda m : (m.set_color, YELLOW),\n lag_ratio = 0.1,\n rate_func = there_and_back,\n run_time = 2\n ))\n```"}]}
{"id": "ManimBench-v1_000322", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ComplexPlaneExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 15, "has_reasoning": false, "prompt": "Display a complex plane with labeled coordinates, then show two yellow dots: one at the position representing \\(2 + i\\) and another at \\(-3 - 2i\\). Each dot is labeled with its corresponding complex number, placed just above and to the right of the dot.", "code": "from manim import *\n\nclass ComplexPlaneExample(Scene):\n def construct(self):\n plane = ComplexPlane().add_coordinates()\n self.add(plane)\n d1 = Dot(plane.n2p(2 + 1j), color=YELLOW)\n d2 = Dot(plane.n2p(-3 - 2j), color=YELLOW)\n label1 = MathTex(\"2+i\").next_to(d1, UR, 0.1)\n label2 = MathTex(\"-3-2i\").next_to(d2, UR, 0.1)\n self.add(\n d1,\n label1,\n d2,\n label2,\n )", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a complex plane with labeled coordinates, then show two yellow dots: one at the position representing \\(2 + i\\) and another at \\(-3 - 2i\\). Each dot is labeled with its corresponding complex number, placed just above and to the right of the dot."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ComplexPlaneExample(Scene):\n def construct(self):\n plane = ComplexPlane().add_coordinates()\n self.add(plane)\n d1 = Dot(plane.n2p(2 + 1j), color=YELLOW)\n d2 = Dot(plane.n2p(-3 - 2j), color=YELLOW)\n label1 = MathTex(\"2+i\").next_to(d1, UR, 0.1)\n label2 = MathTex(\"-3-2i\").next_to(d2, UR, 0.1)\n self.add(\n d1,\n label1,\n d2,\n label2,\n )\n```"}]}
{"id": "ManimBench-v1_000323", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "RestoreExample", "scene_base": "Scene", "num_animations": 5, "num_lines": 10, "has_reasoning": false, "prompt": "Display a square at the center of the screen. It fades in, then undergoes a series of transformations: it changes color to purple, becomes semi-transparent, shifts to the left, and scales up. Next, it moves downward and rotates slightly, only displaying a upper half (upper triangle) of the square. After a brief pause, the square smoothly returns to its original appearance and position using a restore animation.", "code": "from manim import *\n\nclass RestoreExample(Scene):\n def construct(self):\n s = Square()\n s.save_state()\n self.play(FadeIn(s))\n self.play(s.animate.set_color(PURPLE).set_opacity(0.5).shift(2*LEFT).scale(3))\n self.play(s.animate.shift(5*DOWN).rotate(PI/4))\n self.wait()\n self.play(Restore(s), run_time=2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square at the center of the screen. It fades in, then undergoes a series of transformations: it changes color to purple, becomes semi-transparent, shifts to the left, and scales up. Next, it moves downward and rotates slightly, only displaying a upper half (upper triangle) of the square. After a brief pause, the square smoothly returns to its original appearance and position using a restore animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass RestoreExample(Scene):\n def construct(self):\n s = Square()\n s.save_state()\n self.play(FadeIn(s))\n self.play(s.animate.set_color(PURPLE).set_opacity(0.5).shift(2*LEFT).scale(3))\n self.play(s.animate.shift(5*DOWN).rotate(PI/4))\n self.wait()\n self.play(Restore(s), run_time=2)\n```"}]}
{"id": "ManimBench-v1_000324", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "VariablesWithValueTracker", "scene_base": "Scene", "num_animations": 10, "num_lines": 31, "has_reasoning": false, "prompt": "Display three on-screen variables with animated updates:\n\n1. A decimal variable labeled “var” starts at 0.5, with the label in red and the value in green. It animates to 10.5.\n2. An integer variable labeled “int_var” appears below, also with red and green styling, and animates from 0 to 10.\n3. A third variable labeled with a subscripted math expression “\\( a_i \\)” appears below the others, displaying a static value of 10.\n\nEach variable is introduced with a writing animation and spaced vertically.", "code": "from manim import *\n\nclass VariablesWithValueTracker(Scene):\n def construct(self):\n var = 0.5\n on_screen_var = Variable(var, Text(\"var\"), num_decimal_places=3)\n\n # You can also change the colours for the label and value\n on_screen_var.label.set_color(RED)\n on_screen_var.value.set_color(GREEN)\n\n self.play(Write(on_screen_var))\n # The above line will just display the variable with\n # its initial value on the screen. If you also wish to\n # update it, you can do so by accessing the `tracker` attribute\n self.wait()\n var_tracker = on_screen_var.tracker\n var = 10.5\n self.play(var_tracker.animate.set_value(var))\n self.wait()\n\n int_var = 0\n on_screen_int_var = Variable(\n int_var, Text(\"int_var\"), var_type=Integer\n ).next_to(on_screen_var, DOWN)\n on_screen_int_var.label.set_color(RED)\n on_screen_int_var.value.set_color(GREEN)\n\n self.play(Write(on_screen_int_var))\n self.wait()\n var_tracker = on_screen_int_var.tracker\n var = 10.5\n self.play(var_tracker.animate.set_value(var))\n self.wait()\n\n # If you wish to have a somewhat more complicated label for your\n # variable with subscripts, superscripts, etc. the default class\n # for the label is MathTex\n subscript_label_var = 10\n on_screen_subscript_var = Variable(subscript_label_var, \"{a}_{i}\").next_to(\n on_screen_int_var, DOWN\n )\n self.play(Write(on_screen_subscript_var))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three on-screen variables with animated updates:\n\n1. A decimal variable labeled “var” starts at 0.5, with the label in red and the value in green. It animates to 10.5.\n2. An integer variable labeled “int_var” appears below, also with red and green styling, and animates from 0 to 10.\n3. A third variable labeled with a subscripted math expression “\\( a_i \\)” appears below the others, displaying a static value of 10.\n\nEach variable is introduced with a writing animation and spaced vertically."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass VariablesWithValueTracker(Scene):\n def construct(self):\n var = 0.5\n on_screen_var = Variable(var, Text(\"var\"), num_decimal_places=3)\n\n # You can also change the colours for the label and value\n on_screen_var.label.set_color(RED)\n on_screen_var.value.set_color(GREEN)\n\n self.play(Write(on_screen_var))\n # The above line will just display the variable with\n # its initial value on the screen. If you also wish to\n # update it, you can do so by accessing the `tracker` attribute\n self.wait()\n var_tracker = on_screen_var.tracker\n var = 10.5\n self.play(var_tracker.animate.set_value(var))\n self.wait()\n\n int_var = 0\n on_screen_int_var = Variable(\n int_var, Text(\"int_var\"), var_type=Integer\n ).next_to(on_screen_var, DOWN)\n on_screen_int_var.label.set_color(RED)\n on_screen_int_var.value.set_color(GREEN)\n\n self.play(Write(on_screen_int_var))\n self.wait()\n var_tracker = on_screen_int_var.tracker\n var = 10.5\n self.play(var_tracker.animate.set_value(var))\n self.wait()\n\n # If you wish to have a somewhat more complicated label for your\n # variable with subscripts, superscripts, etc. the default class\n # for the label is MathTex\n subscript_label_var = 10\n on_screen_subscript_var = Variable(subscript_label_var, \"{a}_{i}\").next_to(\n on_screen_int_var, DOWN\n )\n self.play(Write(on_screen_subscript_var))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000325", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SpectralLayout", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a graph with six labeled nodes arranged using the spectral layout, which positions nodes based on the eigenvectors of the graph's Laplacian matrix. The nodes are connected in a loop with additional cross-links between non-adjacent nodes, forming a dense and structured network. The layout emphasizes the graph's underlying connectivity patterns through a linear or curved arrangement.", "code": "from manim import *\n\nclass SpectralLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"spectral\",\n labels=True\n )\n self.add(graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a graph with six labeled nodes arranged using the spectral layout, which positions nodes based on the eigenvectors of the graph's Laplacian matrix. The nodes are connected in a loop with additional cross-links between non-adjacent nodes, forming a dense and structured network. The layout emphasizes the graph's underlying connectivity patterns through a linear or curved arrangement."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SpectralLayout(Scene):\n def construct(self):\n graph = Graph(\n [1, 2, 3, 4, 5, 6],\n [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 1), (5, 1), (1, 3), (3, 5)],\n layout=\"spectral\",\n labels=True\n )\n self.add(graph)\n```"}]}
{"id": "ManimBench-v1_000326", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetYAxisLabelExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 11, "has_reasoning": false, "prompt": "Display a set of coordinate axes ranging from 0 to 8 on the x-axis and 0 to 5 on the y-axis. A label reading “\\( y \\)-values” is placed to the left of the y-axis, rotated vertically and slightly offset outward to clearly indicate the axis it describes.", "code": "from manim import *\n\nclass GetYAxisLabelExample(Scene):\n def construct(self):\n ax = Axes(x_range=(0, 8), y_range=(0, 5), x_length=8, y_length=5)\n y_label = ax.get_y_axis_label(\n Tex(\"$y$-values\").scale(0.65).rotate(90 * DEGREES),\n edge=LEFT,\n direction=LEFT,\n buff=0.3,\n )\n self.add(ax, y_label)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes ranging from 0 to 8 on the x-axis and 0 to 5 on the y-axis. A label reading “\\( y \\)-values” is placed to the left of the y-axis, rotated vertically and slightly offset outward to clearly indicate the axis it describes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetYAxisLabelExample(Scene):\n def construct(self):\n ax = Axes(x_range=(0, 8), y_range=(0, 5), x_length=8, y_length=5)\n y_label = ax.get_y_axis_label(\n Tex(\"$y$-values\").scale(0.65).rotate(90 * DEGREES),\n edge=LEFT,\n direction=LEFT,\n buff=0.3,\n )\n self.add(ax, y_label)\n```"}]}
{"id": "ManimBench-v1_000327", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MovingDiGraph", "scene_base": "Scene", "num_animations": 3, "num_lines": 14, "has_reasoning": false, "prompt": "Display a directed graph with four numbered nodes connected by arrows representing edges. Initially, the graph appears in a default layout. Then, each node animates to a new position in 3D space: node 1 moves to the upper right, node 2 to the upper left and slightly forward, node 3 to the lower right and back, and node 4 to the lower left. The edges adjust dynamically to maintain the connections between the repositioned nodes.", "code": "from manim import *\n\nclass MovingDiGraph(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4]\n edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]\n\n g = DiGraph(vertices, edges)\n\n self.add(g)\n self.play(\n g[1].animate.move_to([1, 1, 1]),\n g[2].animate.move_to([-1, 1, 2]),\n g[3].animate.move_to([1, -1, -1]),\n g[4].animate.move_to([-1, -1, 0]),\n )\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a directed graph with four numbered nodes connected by arrows representing edges. Initially, the graph appears in a default layout. Then, each node animates to a new position in 3D space: node 1 moves to the upper right, node 2 to the upper left and slightly forward, node 3 to the lower right and back, and node 4 to the lower left. The edges adjust dynamically to maintain the connections between the repositioned nodes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MovingDiGraph(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4]\n edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]\n\n g = DiGraph(vertices, edges)\n\n self.add(g)\n self.play(\n g[1].animate.move_to([1, 1, 1]),\n g[2].animate.move_to([-1, 1, 2]),\n g[3].animate.move_to([1, -1, -1]),\n g[4].animate.move_to([-1, -1, 0]),\n )\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000328", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MoveToTargetExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 9, "has_reasoning": false, "prompt": "Display a circle at the center of the screen. It then animates by changing its fill color to semi-transparent green, shrinking to half its size, and moving diagonally up and to the right, smoothly transitioning to its new appearance and position.", "code": "from manim import *\n\nclass MoveToTargetExample(Scene):\n def construct(self):\n c = Circle()\n\n c.generate_target()\n c.target.set_fill(color=GREEN, opacity=0.5)\n c.target.shift(2*RIGHT + UP).scale(0.5)\n\n self.add(c)\n self.play(MoveToTarget(c))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a circle at the center of the screen. It then animates by changing its fill color to semi-transparent green, shrinking to half its size, and moving diagonally up and to the right, smoothly transitioning to its new appearance and position."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MoveToTargetExample(Scene):\n def construct(self):\n c = Circle()\n\n c.generate_target()\n c.target.set_fill(color=GREEN, opacity=0.5)\n c.target.shift(2*RIGHT + UP).scale(0.5)\n\n self.add(c)\n self.play(MoveToTarget(c))\n```"}]}
{"id": "ManimBench-v1_000329", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "InsertingTextExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 13, "has_reasoning": false, "prompt": "Display the word “Inserting” in purple text on the left side of the screen, with a grey cursor positioned at the start. Animate the text being typed out character by character with the cursor moving along, then make the cursor blink twice.", "code": "from manim import *\n\nclass InsertingTextExample(Scene):\n def construct(self):\n text = Text(\"Inserting\", color=PURPLE).scale(1.5).to_edge(LEFT)\n cursor = Rectangle(\n color = GREY_A,\n fill_color = GREY_A,\n fill_opacity = 1.0,\n height = 1.1,\n width = 0.5,\n ).move_to(text[0]) # Position the cursor\n\n self.play(TypeWithCursor(text, cursor))\n self.play(Blink(cursor, blinks=2))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display the word “Inserting” in purple text on the left side of the screen, with a grey cursor positioned at the start. Animate the text being typed out character by character with the cursor moving along, then make the cursor blink twice."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass InsertingTextExample(Scene):\n def construct(self):\n text = Text(\"Inserting\", color=PURPLE).scale(1.5).to_edge(LEFT)\n cursor = Rectangle(\n color = GREY_A,\n fill_color = GREY_A,\n fill_opacity = 1.0,\n height = 1.1,\n width = 0.5,\n ).move_to(text[0]) # Position the cursor\n\n self.play(TypeWithCursor(text, cursor))\n self.play(Blink(cursor, blinks=2))\n```"}]}
{"id": "ManimBench-v1_000330", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MovingSquareWithUpdaters", "scene_base": "Scene", "num_animations": 3, "num_lines": 21, "has_reasoning": false, "prompt": "Display a square starting at the top edge of the screen with a decimal number next to it. As the square moves down and then back up over five seconds, the decimal dynamically updates to show the square’s vertical position, formatted with three decimal places and labeled in “M-Units.” The number smoothly follows the square’s movement throughout the animation.", "code": "from manim import *\n\nclass MovingSquareWithUpdaters(Scene):\n def construct(self):\n decimal = DecimalNumber(\n 0,\n show_ellipsis=True,\n num_decimal_places=3,\n include_sign=True,\n unit=r\"\\text{M-Units}\",\n unit_buff_per_font_unit=0.003\n )\n square = Square().to_edge(UP)\n\n decimal.add_updater(lambda d: d.next_to(square, RIGHT))\n decimal.add_updater(lambda d: d.set_value(square.get_center()[1]))\n self.add(square, decimal)\n self.play(\n square.animate.to_edge(DOWN),\n rate_func=there_and_back,\n run_time=5,\n )\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square starting at the top edge of the screen with a decimal number next to it. As the square moves down and then back up over five seconds, the decimal dynamically updates to show the square’s vertical position, formatted with three decimal places and labeled in “M-Units.” The number smoothly follows the square’s movement throughout the animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MovingSquareWithUpdaters(Scene):\n def construct(self):\n decimal = DecimalNumber(\n 0,\n show_ellipsis=True,\n num_decimal_places=3,\n include_sign=True,\n unit=r\"\\text{M-Units}\",\n unit_buff_per_font_unit=0.003\n )\n square = Square().to_edge(UP)\n\n decimal.add_updater(lambda d: d.next_to(square, RIGHT))\n decimal.add_updater(lambda d: d.set_value(square.get_center()[1]))\n self.add(square, decimal)\n self.play(\n square.animate.to_edge(DOWN),\n rate_func=there_and_back,\n run_time=5,\n )\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000331", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ToyExample", "scene_base": "Scene", "num_animations": 6, "num_lines": 13, "has_reasoning": false, "prompt": "Display a semi-transparent orange square. Over three seconds, transform it into a semi-transparent blue circle. Then, create a small dot that stays just below the circle as it moves. Animate the circle shifting to the right, with the dot following it. Finally, fade out both the circle and the dot.", "code": "from manim import *\n\nclass ToyExample(Scene):\n def construct(self):\n orange_square = Square(color=ORANGE, fill_opacity=0.5)\n blue_circle = Circle(color=BLUE, fill_opacity=0.5)\n self.add(orange_square)\n self.play(ReplacementTransform(orange_square, blue_circle, run_time=3))\n small_dot = Dot()\n small_dot.add_updater(lambda mob: mob.next_to(blue_circle, DOWN))\n self.play(Create(small_dot))\n self.play(blue_circle.animate.shift(RIGHT))\n self.wait()\n self.play(FadeOut(blue_circle, small_dot))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a semi-transparent orange square. Over three seconds, transform it into a semi-transparent blue circle. Then, create a small dot that stays just below the circle as it moves. Animate the circle shifting to the right, with the dot following it. Finally, fade out both the circle and the dot."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ToyExample(Scene):\n def construct(self):\n orange_square = Square(color=ORANGE, fill_opacity=0.5)\n blue_circle = Circle(color=BLUE, fill_opacity=0.5)\n self.add(orange_square)\n self.play(ReplacementTransform(orange_square, blue_circle, run_time=3))\n small_dot = Dot()\n small_dot.add_updater(lambda mob: mob.next_to(blue_circle, DOWN))\n self.play(Create(small_dot))\n self.play(blue_circle.animate.shift(RIGHT))\n self.wait()\n self.play(FadeOut(blue_circle, small_dot))\n```"}]}
{"id": "ManimBench-v1_000332", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SquareExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display three squares stacked vertically:\n\n1. A large square at the bottom.\n2. A medium-sized square placed directly above the large one.\n3. A small square positioned above the medium one.\n\nEach square is centered horizontally and aligned vertically with even spacing.", "code": "from manim import *\n\nclass SquareExample(Scene):\n def construct(self):\n square_1 = Square(side_length=2.0).shift(DOWN)\n square_2 = Square(side_length=1.0).next_to(square_1, direction=UP)\n square_3 = Square(side_length=0.5).next_to(square_2, direction=UP)\n self.add(square_1, square_2, square_3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three squares stacked vertically:\n\n1. A large square at the bottom.\n2. A medium-sized square placed directly above the large one.\n3. A small square positioned above the medium one.\n\nEach square is centered horizontally and aligned vertically with even spacing."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SquareExample(Scene):\n def construct(self):\n square_1 = Square(side_length=2.0).shift(DOWN)\n square_2 = Square(side_length=1.0).next_to(square_1, direction=UP)\n square_3 = Square(side_length=0.5).next_to(square_2, direction=UP)\n self.add(square_1, square_2, square_3)\n```"}]}
{"id": "ManimBench-v1_000333", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MobjectScaleExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 9, "has_reasoning": false, "prompt": "Display four instances of the letter \"F\" arranged horizontally with large spacing between them. The first \"F\" is at normal size, the second is twice as large, the third is half the size, and the fourth is flipped due to being scaled by a negative factor.", "code": "from manim import *\n\nclass MobjectScaleExample(Scene):\n def construct(self):\n f1 = Text(\"F\")\n f2 = Text(\"F\").scale(2)\n f3 = Text(\"F\").scale(0.5)\n f4 = Text(\"F\").scale(-1)\n\n vgroup = VGroup(f1, f2, f3, f4).arrange(6 * RIGHT)\n self.add(vgroup)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display four instances of the letter \"F\" arranged horizontally with large spacing between them. The first \"F\" is at normal size, the second is twice as large, the third is half the size, and the fourth is flipped due to being scaled by a negative factor."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MobjectScaleExample(Scene):\n def construct(self):\n f1 = Text(\"F\")\n f2 = Text(\"F\").scale(2)\n f3 = Text(\"F\").scale(0.5)\n f4 = Text(\"F\").scale(-1)\n\n vgroup = VGroup(f1, f2, f3, f4).arrange(6 * RIGHT)\n self.add(vgroup)\n```"}]}
{"id": "ManimBench-v1_000334", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "TextAlignment", "scene_base": "Scene", "num_animations": 2, "num_lines": 14, "has_reasoning": false, "prompt": "Display a white title reading \"K-means clustering and Logistic Regression\" scaled down and positioned at the top of the screen. Below it, in the bottom-right quadrant, show a vertically arranged list of four white text items: \n\n- \"1. Measuring\"\n- \"2. Clustering\"\n- \"3. Regression\"\n- \"4. Prediction\"\n\nAll above are semi-transparent except for \"2. Clustering\", which is fully opaque, stressing it out over others.", "code": "from manim import *\n\nclass TextAlignment(Scene):\n def construct(self):\n title = Text(\"K-means clustering and Logistic Regression\", color=WHITE)\n title.scale(0.75)\n self.add(title.to_edge(UP))\n\n t1 = Text(\"1. Measuring\").set_color(WHITE)\n\n t2 = Text(\"2. Clustering\").set_color(WHITE)\n\n t3 = Text(\"3. Regression\").set_color(WHITE)\n\n t4 = Text(\"4. Prediction\").set_color(WHITE)\n\n x = VGroup(t1, t2, t3, t4).arrange(direction=DOWN, aligned_edge=LEFT).scale(0.7).next_to(ORIGIN,DR)\n x.set_opacity(0.5)\n x.submobjects[1].set_opacity(1)\n self.add(x)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a white title reading \"K-means clustering and Logistic Regression\" scaled down and positioned at the top of the screen. Below it, in the bottom-right quadrant, show a vertically arranged list of four white text items: \n\n- \"1. Measuring\"\n- \"2. Clustering\"\n- \"3. Regression\"\n- \"4. Prediction\"\n\nAll above are semi-transparent except for \"2. Clustering\", which is fully opaque, stressing it out over others."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass TextAlignment(Scene):\n def construct(self):\n title = Text(\"K-means clustering and Logistic Regression\", color=WHITE)\n title.scale(0.75)\n self.add(title.to_edge(UP))\n\n t1 = Text(\"1. Measuring\").set_color(WHITE)\n\n t2 = Text(\"2. Clustering\").set_color(WHITE)\n\n t3 = Text(\"3. Regression\").set_color(WHITE)\n\n t4 = Text(\"4. Prediction\").set_color(WHITE)\n\n x = VGroup(t1, t2, t3, t4).arrange(direction=DOWN, aligned_edge=LEFT).scale(0.7).next_to(ORIGIN,DR)\n x.set_opacity(0.5)\n x.submobjects[1].set_opacity(1)\n self.add(x)\n```"}]}
{"id": "ManimBench-v1_000335", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ChangingZoomScale", "scene_base": "ZoomedScene", "num_animations": 6, "num_lines": 24, "has_reasoning": false, "prompt": "Display a green dot at the center of the screen. After a short pause, zooming functionality is activated (though not animated), preparing a magnified view. Then, the dot smoothly shifts to the left while the zoomed-in view follows the motion, highlighting the movement in detail.", "code": "from manim import *\n\nclass ChangingZoomScale(ZoomedScene):\n def __init__(self, **kwargs):\n ZoomedScene.__init__(\n self,\n zoom_factor=0.3,\n zoomed_display_height=1,\n zoomed_display_width=3,\n image_frame_stroke_width=20,\n zoomed_camera_config={\n \"default_frame_stroke_width\": 3,\n },\n **kwargs\n )\n\n def construct(self):\n dot = Dot().set_color(GREEN)\n sq = Circle(fill_opacity=1, radius=0.2).next_to(dot, RIGHT)\n self.add(dot, sq)\n self.wait(1)\n self.activate_zooming(animate=False)\n self.wait(1)\n self.play(dot.animate.shift(LEFT * 0.3))\n\n self.play(self.zoomed_camera.frame.animate.scale(4))\n self.play(self.zoomed_camera.frame.animate.shift(0.5 * DOWN))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a green dot at the center of the screen. After a short pause, zooming functionality is activated (though not animated), preparing a magnified view. Then, the dot smoothly shifts to the left while the zoomed-in view follows the motion, highlighting the movement in detail."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ChangingZoomScale(ZoomedScene):\n def __init__(self, **kwargs):\n ZoomedScene.__init__(\n self,\n zoom_factor=0.3,\n zoomed_display_height=1,\n zoomed_display_width=3,\n image_frame_stroke_width=20,\n zoomed_camera_config={\n \"default_frame_stroke_width\": 3,\n },\n **kwargs\n )\n\n def construct(self):\n dot = Dot().set_color(GREEN)\n sq = Circle(fill_opacity=1, radius=0.2).next_to(dot, RIGHT)\n self.add(dot, sq)\n self.wait(1)\n self.activate_zooming(animate=False)\n self.wait(1)\n self.play(dot.animate.shift(LEFT * 0.3))\n\n self.play(self.zoomed_camera.frame.animate.scale(4))\n self.play(self.zoomed_camera.frame.animate.shift(0.5 * DOWN))\n```"}]}
{"id": "ManimBench-v1_000336", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetBarLabelsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a vertical bar chart with ten bars representing values from 10 down to 1. Each bar is labeled with its corresponding value using white mathematical text in a large font. The chart and labels appear on screen simultaneously without animation.", "code": "from manim import *\n\nclass GetBarLabelsExample(Scene):\n def construct(self):\n chart = BarChart(values=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], y_range=[0, 10, 1])\n\n c_bar_lbls = chart.get_bar_labels(\n color=WHITE, label_constructor=MathTex, font_size=36\n )\n\n self.add(chart, c_bar_lbls)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a vertical bar chart with ten bars representing values from 10 down to 1. Each bar is labeled with its corresponding value using white mathematical text in a large font. The chart and labels appear on screen simultaneously without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetBarLabelsExample(Scene):\n def construct(self):\n chart = BarChart(values=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], y_range=[0, 10, 1])\n\n c_bar_lbls = chart.get_bar_labels(\n color=WHITE, label_constructor=MathTex, font_size=36\n )\n\n self.add(chart, c_bar_lbls)\n```"}]}
{"id": "ManimBench-v1_000337", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PointsAsCornersExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 13, "has_reasoning": false, "prompt": "Display a red outline formed by connecting a sequence of corner points. The shape starts by tracing a square clockwise from the top right, then draws two diagonal lines forming an \"X\" across the bottom half. The entire shape is scaled up to appear larger on the screen.", "code": "from manim import *\n\nclass PointsAsCornersExample(Scene):\n def construct(self):\n corners = (\n # create square\n UR, UL,\n DL, DR,\n UR,\n # create crosses\n DL, UL,\n DR\n )\n vmob = VMobject(stroke_color=RED)\n vmob.set_points_as_corners(corners).scale(2)\n self.add(vmob)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red outline formed by connecting a sequence of corner points. The shape starts by tracing a square clockwise from the top right, then draws two diagonal lines forming an \"X\" across the bottom half. The entire shape is scaled up to appear larger on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PointsAsCornersExample(Scene):\n def construct(self):\n corners = (\n # create square\n UR, UL,\n DL, DR,\n UR,\n # create crosses\n DL, UL,\n DR\n )\n vmob = VMobject(stroke_color=RED)\n vmob.set_points_as_corners(corners).scale(2)\n self.add(vmob)\n```"}]}
{"id": "ManimBench-v1_000338", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "TLabelExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display a set of axes with a blue line representing the function \\( y = x \\). At the point where \\( x = 4 \\), a vertical dashed line and a horizontal dashed line intersect the graph, forming a \"T\" shape. A label reading \"x-value\" is placed near this intersection to indicate the corresponding point on the graph.", "code": "from manim import *\n\nclass TLabelExample(Scene):\n def construct(self):\n # defines the axes and linear function\n axes = Axes(x_range=[-1, 10], y_range=[-1, 10], x_length=9, y_length=6)\n func = axes.plot(lambda x: x, color=BLUE)\n # creates the T_label\n t_label = axes.get_T_label(x_val=4, graph=func, label=Tex(\"x-value\"))\n self.add(axes, func, t_label)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of axes with a blue line representing the function \\( y = x \\). At the point where \\( x = 4 \\), a vertical dashed line and a horizontal dashed line intersect the graph, forming a \"T\" shape. A label reading \"x-value\" is placed near this intersection to indicate the corresponding point on the graph."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass TLabelExample(Scene):\n def construct(self):\n # defines the axes and linear function\n axes = Axes(x_range=[-1, 10], y_range=[-1, 10], x_length=9, y_length=6)\n func = axes.plot(lambda x: x, color=BLUE)\n # creates the T_label\n t_label = axes.get_T_label(x_val=4, graph=func, label=Tex(\"x-value\"))\n self.add(axes, func, t_label)\n```"}]}
{"id": "ManimBench-v1_000339", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MovingZoomedSceneAround", "scene_base": "ZoomedScene", "num_animations": 13, "num_lines": 54, "has_reasoning": false, "prompt": "Display a white dot shifted to the upper left. Firstly, display a purple rectangle around the dot and word \"Frame\" around that dot. The display a small red-framed inset springing up below, showing a close-up of whatever the purpose box encloses. Show \"Zoomed camera\" under this red-framed inset. The inset operates as a maginifier to the earlier purple rectangle. The inset briefly doubles in size for emphasis before the purple box drifts downward, shifting the zoom focus. Finally, fold the inset back into the purple rectangle gently erasing both frames, leaving only the original dot.", "code": "from manim import *\n\nclass MovingZoomedSceneAround(ZoomedScene):\n# contributed by TheoremofBeethoven, www.youtube.com/c/TheoremofBeethoven\n def __init__(self, **kwargs):\n ZoomedScene.__init__(\n self,\n zoom_factor=0.3,\n zoomed_display_height=1,\n zoomed_display_width=6,\n image_frame_stroke_width=20,\n zoomed_camera_config={\n \"default_frame_stroke_width\": 3,\n },\n **kwargs\n )\n\n def construct(self):\n dot = Dot().shift(UL * 2)\n image = ImageMobject(np.uint8([[0, 100, 30, 200],\n [255, 0, 5, 33]]))\n image.height = 7\n frame_text = Text(\"Frame\", color=PURPLE, font_size=67)\n zoomed_camera_text = Text(\"Zoomed camera\", color=RED, font_size=67)\n\n self.add(image, dot)\n zoomed_camera = self.zoomed_camera\n zoomed_display = self.zoomed_display\n frame = zoomed_camera.frame\n zoomed_display_frame = zoomed_display.display_frame\n\n frame.move_to(dot)\n frame.set_color(PURPLE)\n zoomed_display_frame.set_color(RED)\n zoomed_display.shift(DOWN)\n\n zd_rect = BackgroundRectangle(zoomed_display, fill_opacity=0, buff=MED_SMALL_BUFF)\n self.add_foreground_mobject(zd_rect)\n\n unfold_camera = UpdateFromFunc(zd_rect, lambda rect: rect.replace(zoomed_display))\n\n frame_text.next_to(frame, DOWN)\n\n self.play(Create(frame), FadeIn(frame_text, shift=UP))\n self.activate_zooming()\n\n self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera)\n zoomed_camera_text.next_to(zoomed_display_frame, DOWN)\n self.play(FadeIn(zoomed_camera_text, shift=UP))\n # Scale in x y z\n scale_factor = [0.5, 1.5, 0]\n self.play(\n frame.animate.scale(scale_factor),\n zoomed_display.animate.scale(scale_factor),\n FadeOut(zoomed_camera_text),\n FadeOut(frame_text)\n )\n self.wait()\n self.play(ScaleInPlace(zoomed_display, 2))\n self.wait()\n self.play(frame.animate.shift(2.5 * DOWN))\n self.wait()\n self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera, rate_func=lambda t: smooth(1 - t))\n self.play(Uncreate(zoomed_display_frame), FadeOut(frame))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a white dot shifted to the upper left. Firstly, display a purple rectangle around the dot and word \"Frame\" around that dot. The display a small red-framed inset springing up below, showing a close-up of whatever the purpose box encloses. Show \"Zoomed camera\" under this red-framed inset. The inset operates as a maginifier to the earlier purple rectangle. The inset briefly doubles in size for emphasis before the purple box drifts downward, shifting the zoom focus. Finally, fold the inset back into the purple rectangle gently erasing both frames, leaving only the original dot."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MovingZoomedSceneAround(ZoomedScene):\n# contributed by TheoremofBeethoven, www.youtube.com/c/TheoremofBeethoven\n def __init__(self, **kwargs):\n ZoomedScene.__init__(\n self,\n zoom_factor=0.3,\n zoomed_display_height=1,\n zoomed_display_width=6,\n image_frame_stroke_width=20,\n zoomed_camera_config={\n \"default_frame_stroke_width\": 3,\n },\n **kwargs\n )\n\n def construct(self):\n dot = Dot().shift(UL * 2)\n image = ImageMobject(np.uint8([[0, 100, 30, 200],\n [255, 0, 5, 33]]))\n image.height = 7\n frame_text = Text(\"Frame\", color=PURPLE, font_size=67)\n zoomed_camera_text = Text(\"Zoomed camera\", color=RED, font_size=67)\n\n self.add(image, dot)\n zoomed_camera = self.zoomed_camera\n zoomed_display = self.zoomed_display\n frame = zoomed_camera.frame\n zoomed_display_frame = zoomed_display.display_frame\n\n frame.move_to(dot)\n frame.set_color(PURPLE)\n zoomed_display_frame.set_color(RED)\n zoomed_display.shift(DOWN)\n\n zd_rect = BackgroundRectangle(zoomed_display, fill_opacity=0, buff=MED_SMALL_BUFF)\n self.add_foreground_mobject(zd_rect)\n\n unfold_camera = UpdateFromFunc(zd_rect, lambda rect: rect.replace(zoomed_display))\n\n frame_text.next_to(frame, DOWN)\n\n self.play(Create(frame), FadeIn(frame_text, shift=UP))\n self.activate_zooming()\n\n self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera)\n zoomed_camera_text.next_to(zoomed_display_frame, DOWN)\n self.play(FadeIn(zoomed_camera_text, shift=UP))\n # Scale in x y z\n scale_factor = [0.5, 1.5, 0]\n self.play(\n frame.animate.scale(scale_factor),\n zoomed_display.animate.scale(scale_factor),\n FadeOut(zoomed_camera_text),\n FadeOut(frame_text)\n )\n self.wait()\n self.play(ScaleInPlace(zoomed_display, 2))\n self.wait()\n self.play(frame.animate.shift(2.5 * DOWN))\n self.wait()\n self.play(self.get_zoomed_display_pop_out_animation(), unfold_camera, rate_func=lambda t: smooth(1 - t))\n self.play(Uncreate(zoomed_display_frame), FadeOut(frame))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000340", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "InvertSumobjectsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a row of evenly spaced dots extending horizontally across the screen. Below it, a second row appears, which is an inverted version of the first—meaning the order of the dots is reversed. Both rows are written onto the screen simultaneously.", "code": "from manim import *\n\nclass InvertSumobjectsExample(Scene):\n def construct(self):\n s = VGroup(*[Dot().shift(i*0.1*RIGHT) for i in range(-20,20)])\n s2 = s.copy()\n s2.invert()\n s2.shift(DOWN)\n self.play(Write(s), Write(s2))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a row of evenly spaced dots extending horizontally across the screen. Below it, a second row appears, which is an inverted version of the first—meaning the order of the dots is reversed. Both rows are written onto the screen simultaneously."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass InvertSumobjectsExample(Scene):\n def construct(self):\n s = VGroup(*[Dot().shift(i*0.1*RIGHT) for i in range(-20,20)])\n s2 = s.copy()\n s2.invert()\n s2.shift(DOWN)\n self.play(Write(s), Write(s2))\n```"}]}
{"id": "ManimBench-v1_000341", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CoordSysExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 33, "has_reasoning": false, "prompt": "Display a coordinate grid ranging from 0 to 1 on both axes, with tick marks every 0.05 units and labeled every 0.1 units. The x- and y-axes are labeled \"x\" and \"y\" respectively. A series of white graphs are plotted: one set for \\( y = x^n \\) and another for \\( y = x^{1/n} \\), where \\( n \\) ranges from 1 to 20 in steps of 0.5. At the point (1, 1), a yellow dot is placed, with blue horizontal and vertical lines intersecting at that point, and a label \"(1,1)\" appears nearby. A title above the scene describes the plotted functions.", "code": "from manim import *\n\nclass CoordSysExample(Scene):\n def construct(self):\n # the location of the ticks depends on the x_range and y_range.\n grid = Axes(\n x_range=[0, 1, 0.05], # step size determines num_decimal_places.\n y_range=[0, 1, 0.05],\n x_length=9,\n y_length=5.5,\n axis_config={\n \"numbers_to_include\": np.arange(0, 1 + 0.1, 0.1),\n \"font_size\": 24,\n },\n tips=False,\n )\n\n # Labels for the x-axis and y-axis.\n y_label = grid.get_y_axis_label(\"y\", edge=LEFT, direction=LEFT, buff=0.4)\n x_label = grid.get_x_axis_label(\"x\")\n grid_labels = VGroup(x_label, y_label)\n\n graphs = VGroup()\n for n in np.arange(1, 20 + 0.5, 0.5):\n graphs += grid.plot(lambda x: x ** n, color=WHITE)\n graphs += grid.plot(\n lambda x: x ** (1 / n), color=WHITE, use_smoothing=False\n )\n\n # Extra lines and labels for point (1,1)\n graphs += grid.get_horizontal_line(grid @ (1, 1, 0), color=BLUE)\n graphs += grid.get_vertical_line(grid @ (1, 1, 0), color=BLUE)\n graphs += Dot(point=grid @ (1, 1, 0), color=YELLOW)\n graphs += Tex(\"(1,1)\").scale(0.75).next_to(grid @ (1, 1, 0))\n title = Title(\n # spaces between braces to prevent SyntaxError\n r\"Graphs of $y=x^{ {1}\\over{n} }$ and $y=x^n (n=1,2,3,...,20)$\",\n include_underline=False,\n font_size=40,\n )\n\n self.add(title, graphs, grid, grid_labels)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a coordinate grid ranging from 0 to 1 on both axes, with tick marks every 0.05 units and labeled every 0.1 units. The x- and y-axes are labeled \"x\" and \"y\" respectively. A series of white graphs are plotted: one set for \\( y = x^n \\) and another for \\( y = x^{1/n} \\), where \\( n \\) ranges from 1 to 20 in steps of 0.5. At the point (1, 1), a yellow dot is placed, with blue horizontal and vertical lines intersecting at that point, and a label \"(1,1)\" appears nearby. A title above the scene describes the plotted functions."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CoordSysExample(Scene):\n def construct(self):\n # the location of the ticks depends on the x_range and y_range.\n grid = Axes(\n x_range=[0, 1, 0.05], # step size determines num_decimal_places.\n y_range=[0, 1, 0.05],\n x_length=9,\n y_length=5.5,\n axis_config={\n \"numbers_to_include\": np.arange(0, 1 + 0.1, 0.1),\n \"font_size\": 24,\n },\n tips=False,\n )\n\n # Labels for the x-axis and y-axis.\n y_label = grid.get_y_axis_label(\"y\", edge=LEFT, direction=LEFT, buff=0.4)\n x_label = grid.get_x_axis_label(\"x\")\n grid_labels = VGroup(x_label, y_label)\n\n graphs = VGroup()\n for n in np.arange(1, 20 + 0.5, 0.5):\n graphs += grid.plot(lambda x: x ** n, color=WHITE)\n graphs += grid.plot(\n lambda x: x ** (1 / n), color=WHITE, use_smoothing=False\n )\n\n # Extra lines and labels for point (1,1)\n graphs += grid.get_horizontal_line(grid @ (1, 1, 0), color=BLUE)\n graphs += grid.get_vertical_line(grid @ (1, 1, 0), color=BLUE)\n graphs += Dot(point=grid @ (1, 1, 0), color=YELLOW)\n graphs += Tex(\"(1,1)\").scale(0.75).next_to(grid @ (1, 1, 0))\n title = Title(\n # spaces between braces to prevent SyntaxError\n r\"Graphs of $y=x^{ {1}\\over{n} }$ and $y=x^n (n=1,2,3,...,20)$\",\n include_underline=False,\n font_size=40,\n )\n\n self.add(title, graphs, grid, grid_labels)\n```"}]}
{"id": "ManimBench-v1_000342", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DotExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display three dots arranged horizontally across the screen: a small dot on the left, a default-sized dot in the center, and another default-sized dot on the right.", "code": "from manim import *\n\nclass DotExample(Scene):\n def construct(self):\n dot1 = Dot(point=LEFT, radius=0.08)\n dot2 = Dot(point=ORIGIN)\n dot3 = Dot(point=RIGHT)\n self.add(dot1,dot2,dot3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display three dots arranged horizontally across the screen: a small dot on the left, a default-sized dot in the center, and another default-sized dot on the right."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DotExample(Scene):\n def construct(self):\n dot1 = Dot(point=LEFT, radius=0.08)\n dot2 = Dot(point=ORIGIN)\n dot3 = Dot(point=RIGHT)\n self.add(dot1,dot2,dot3)\n```"}]}
{"id": "ManimBench-v1_000343", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetXAxisLabelExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a set of coordinate axes ranging from 0 to 8 on the x-axis and 0 to 5 on the y-axis. A label reading “\\( x \\)-values” is placed below the x-axis, centered and slightly offset downward to clearly indicate the axis it describes.", "code": "from manim import *\n\nclass GetXAxisLabelExample(Scene):\n def construct(self):\n ax = Axes(x_range=(0, 8), y_range=(0, 5), x_length=8, y_length=5)\n x_label = ax.get_x_axis_label(\n Tex(\"$x$-values\").scale(0.65), edge=DOWN, direction=DOWN, buff=0.5\n )\n self.add(ax, x_label)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes ranging from 0 to 8 on the x-axis and 0 to 5 on the y-axis. A label reading “\\( x \\)-values” is placed below the x-axis, centered and slightly offset downward to clearly indicate the axis it describes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetXAxisLabelExample(Scene):\n def construct(self):\n ax = Axes(x_range=(0, 8), y_range=(0, 5), x_length=8, y_length=5)\n x_label = ax.get_x_axis_label(\n Tex(\"$x$-values\").scale(0.65), edge=DOWN, direction=DOWN, buff=0.5\n )\n self.add(ax, x_label)\n```"}]}
{"id": "ManimBench-v1_000344", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ArcPolygonExample", "scene_base": "Scene", "num_animations": 2, "num_lines": 15, "has_reasoning": false, "prompt": "Display a filled purple Reuleaux triangle with thick blue edges, formed by three curved arcs connecting three points in an equilateral triangle layout. The arcs have no visible stroke, and the shape fades into view at the center of the screen.", "code": "from manim import *\n\nclass ArcPolygonExample(Scene):\n def construct(self):\n arc_conf = {\"stroke_width\": 0}\n poly_conf = {\"stroke_width\": 10, \"stroke_color\": BLUE,\n \"fill_opacity\": 1, \"color\": PURPLE}\n a = [-1, 0, 0]\n b = [1, 0, 0]\n c = [0, np.sqrt(3), 0]\n arc0 = ArcBetweenPoints(a, b, radius=2, **arc_conf)\n arc1 = ArcBetweenPoints(b, c, radius=2, **arc_conf)\n arc2 = ArcBetweenPoints(c, a, radius=2, **arc_conf)\n reuleaux_tri = ArcPolygonFromArcs(arc0, arc1, arc2, **poly_conf)\n self.play(FadeIn(reuleaux_tri))\n self.wait(2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a filled purple Reuleaux triangle with thick blue edges, formed by three curved arcs connecting three points in an equilateral triangle layout. The arcs have no visible stroke, and the shape fades into view at the center of the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArcPolygonExample(Scene):\n def construct(self):\n arc_conf = {\"stroke_width\": 0}\n poly_conf = {\"stroke_width\": 10, \"stroke_color\": BLUE,\n \"fill_opacity\": 1, \"color\": PURPLE}\n a = [-1, 0, 0]\n b = [1, 0, 0]\n c = [0, np.sqrt(3), 0]\n arc0 = ArcBetweenPoints(a, b, radius=2, **arc_conf)\n arc1 = ArcBetweenPoints(b, c, radius=2, **arc_conf)\n arc2 = ArcBetweenPoints(c, a, radius=2, **arc_conf)\n reuleaux_tri = ArcPolygonFromArcs(arc0, arc1, arc2, **poly_conf)\n self.play(FadeIn(reuleaux_tri))\n self.wait(2)\n```"}]}
{"id": "ManimBench-v1_000345", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CustomLayoutExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 31, "has_reasoning": false, "prompt": "Display a graph with seven labeled nodes arranged using a custom grid-like layout. The nodes are positioned in a staggered 4-column format, centered both horizontally and vertically. Edges connect the nodes to form a branching structure with additional horizontal connections, creating a visually structured and symmetric network.", "code": "from typing import Any\nfrom manim import *\n\nclass CustomLayoutExample(Scene):\n def construct(self):\n import numpy as np\n import networkx as nx\n\n # create custom layout\n def custom_layout(\n graph: nx.Graph,\n scale: float | tuple[float, float, float] = 2,\n n: int | None = None,\n *args: Any,\n **kwargs: Any,\n ):\n nodes = sorted(list(graph))\n height = len(nodes) // n\n return {\n node: (scale * np.array([\n (i % n) - (n-1)/2,\n -(i // n) + height/2,\n 0\n ])) for i, node in enumerate(graph)\n }\n\n # draw graph\n n = 4\n graph = Graph(\n [i for i in range(4 * 2 - 1)],\n [(0, 1), (0, 4), (1, 2), (1, 5), (2, 3), (2, 6), (4, 5), (5, 6)],\n labels=True,\n layout=custom_layout,\n layout_config={'n': n}\n )\n self.add(graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a graph with seven labeled nodes arranged using a custom grid-like layout. The nodes are positioned in a staggered 4-column format, centered both horizontally and vertically. Edges connect the nodes to form a branching structure with additional horizontal connections, creating a visually structured and symmetric network."}, {"role": "assistant", "content": "```python\nfrom typing import Any\nfrom manim import *\n\nclass CustomLayoutExample(Scene):\n def construct(self):\n import numpy as np\n import networkx as nx\n\n # create custom layout\n def custom_layout(\n graph: nx.Graph,\n scale: float | tuple[float, float, float] = 2,\n n: int | None = None,\n *args: Any,\n **kwargs: Any,\n ):\n nodes = sorted(list(graph))\n height = len(nodes) // n\n return {\n node: (scale * np.array([\n (i % n) - (n-1)/2,\n -(i // n) + height/2,\n 0\n ])) for i, node in enumerate(graph)\n }\n\n # draw graph\n n = 4\n graph = Graph(\n [i for i in range(4 * 2 - 1)],\n [(0, 1), (0, 4), (1, 2), (1, 5), (2, 3), (2, 6), (4, 5), (5, 6)],\n labels=True,\n layout=custom_layout,\n layout_config={'n': n}\n )\n self.add(graph)\n```"}]}
{"id": "ManimBench-v1_000346", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CounterclockwiseTransform_vs_Transform", "scene_base": "Scene", "num_animations": 5, "num_lines": 17, "has_reasoning": false, "prompt": "Display two vertically arranged groups side by side: on the left, a red label \"CounterclockwiseTransform\" with the numbers 3.141 and 1.618 stacked above it; on the right, a blue label \"Transform\" with the numbers 1.618 and 3.141 stacked above it. First, the top number in the left group transforms into the bottom number using a counterclockwise spinning motion. Then, the top number in the right group transforms into the bottom number with a direct, straight morphing animation.", "code": "from manim import *\n\nclass CounterclockwiseTransform_vs_Transform(Scene):\n def construct(self):\n # set up the numbers\n c_transform = VGroup(DecimalNumber(number=3.141, num_decimal_places=3), DecimalNumber(number=1.618, num_decimal_places=3))\n text_1 = Text(\"CounterclockwiseTransform\", color=RED)\n c_transform.add(text_1)\n\n transform = VGroup(DecimalNumber(number=1.618, num_decimal_places=3), DecimalNumber(number=3.141, num_decimal_places=3))\n text_2 = Text(\"Transform\", color=BLUE)\n transform.add(text_2)\n\n ints = VGroup(c_transform, transform)\n texts = VGroup(text_1, text_2).scale(0.75)\n c_transform.arrange(direction=UP, buff=1)\n transform.arrange(direction=UP, buff=1)\n\n ints.arrange(buff=2)\n self.add(ints, texts)\n\n # The mobs move in clockwise direction for ClockwiseTransform()\n self.play(CounterclockwiseTransform(c_transform[0], c_transform[1]))\n\n # The mobs move straight up for Transform()\n self.play(Transform(transform[0], transform[1]))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two vertically arranged groups side by side: on the left, a red label \"CounterclockwiseTransform\" with the numbers 3.141 and 1.618 stacked above it; on the right, a blue label \"Transform\" with the numbers 1.618 and 3.141 stacked above it. First, the top number in the left group transforms into the bottom number using a counterclockwise spinning motion. Then, the top number in the right group transforms into the bottom number with a direct, straight morphing animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CounterclockwiseTransform_vs_Transform(Scene):\n def construct(self):\n # set up the numbers\n c_transform = VGroup(DecimalNumber(number=3.141, num_decimal_places=3), DecimalNumber(number=1.618, num_decimal_places=3))\n text_1 = Text(\"CounterclockwiseTransform\", color=RED)\n c_transform.add(text_1)\n\n transform = VGroup(DecimalNumber(number=1.618, num_decimal_places=3), DecimalNumber(number=3.141, num_decimal_places=3))\n text_2 = Text(\"Transform\", color=BLUE)\n transform.add(text_2)\n\n ints = VGroup(c_transform, transform)\n texts = VGroup(text_1, text_2).scale(0.75)\n c_transform.arrange(direction=UP, buff=1)\n transform.arrange(direction=UP, buff=1)\n\n ints.arrange(buff=2)\n self.add(ints, texts)\n\n # The mobs move in clockwise direction for ClockwiseTransform()\n self.play(CounterclockwiseTransform(c_transform[0], c_transform[1]))\n\n # The mobs move straight up for Transform()\n self.play(Transform(transform[0], transform[1]))\n```"}]}
{"id": "ManimBench-v1_000347", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AntiderivativeExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a set of coordinate axes with two curves:\n\n- A red curve representing the function \\( f(x) = \\frac{x^2 - 2}{3} \\).\n- A blue curve representing the antiderivative of that function, automatically computed and plotted based on the red curve.\n\nThis scene visually demonstrates the relationship between a function and its antiderivative.", "code": "from manim import *\n\nclass AntiderivativeExample(Scene):\n def construct(self):\n ax = Axes()\n graph1 = ax.plot(\n lambda x: (x ** 2 - 2) / 3,\n color=RED,\n )\n graph2 = ax.plot_antiderivative_graph(graph1, color=BLUE)\n self.add(ax, graph1, graph2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes with two curves:\n\n- A red curve representing the function \\( f(x) = \\frac{x^2 - 2}{3} \\).\n- A blue curve representing the antiderivative of that function, automatically computed and plotted based on the red curve.\n\nThis scene visually demonstrates the relationship between a function and its antiderivative."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AntiderivativeExample(Scene):\n def construct(self):\n ax = Axes()\n graph1 = ax.plot(\n lambda x: (x ** 2 - 2) / 3,\n color=RED,\n )\n graph2 = ax.plot_antiderivative_graph(graph1, color=BLUE)\n self.add(ax, graph1, graph2)\n```"}]}
{"id": "ManimBench-v1_000348", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetAreaExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 12, "has_reasoning": false, "prompt": "Display a set of coordinate axes with labeled ticks, then plot the curve \\( y = 2\\sin(x) \\) in dark blue. Highlight the area under the curve between \\( x = \\frac{\\pi}{2} \\) and \\( x = \\frac{3\\pi}{2} \\) using a solid green fill to visually represent the integral over that interval.", "code": "from manim import *\n\nclass GetAreaExample(Scene):\n def construct(self):\n ax = Axes().add_coordinates()\n curve = ax.plot(lambda x: 2 * np.sin(x), color=DARK_BLUE)\n area = ax.get_area(\n curve,\n x_range=(PI / 2, 3 * PI / 2),\n color=(GREEN_B, GREEN_D),\n opacity=1,\n )\n\n self.add(ax, curve, area)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes with labeled ticks, then plot the curve \\( y = 2\\sin(x) \\) in dark blue. Highlight the area under the curve between \\( x = \\frac{\\pi}{2} \\) and \\( x = \\frac{3\\pi}{2} \\) using a solid green fill to visually represent the integral over that interval."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetAreaExample(Scene):\n def construct(self):\n ax = Axes().add_coordinates()\n curve = ax.plot(lambda x: 2 * np.sin(x), color=DARK_BLUE)\n area = ax.get_area(\n curve,\n x_range=(PI / 2, 3 * PI / 2),\n color=(GREEN_B, GREEN_D),\n opacity=1,\n )\n\n self.add(ax, curve, area)\n```"}]}
{"id": "ManimBench-v1_000349", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MatchPointsScene", "scene_base": "Scene", "num_animations": 4, "num_lines": 9, "has_reasoning": false, "prompt": "Display a red circle with partial transparency at the center of the screen. After a brief pause, the circle smoothly morphs into the shape of a blue square with lower opacity, matching the square’s points as closely as possible during the transformation.", "code": "from manim import *\n\nclass MatchPointsScene(Scene):\n def construct(self):\n circ = Circle(fill_color=RED, fill_opacity=0.8)\n square = Square(fill_color=BLUE, fill_opacity=0.2)\n self.add(circ)\n self.wait(0.5)\n self.play(circ.animate.match_points(square))\n self.wait(0.5)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red circle with partial transparency at the center of the screen. After a brief pause, the circle smoothly morphs into the shape of a blue square with lower opacity, matching the square’s points as closely as possible during the transformation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MatchPointsScene(Scene):\n def construct(self):\n circ = Circle(fill_color=RED, fill_opacity=0.8)\n square = Square(fill_color=BLUE, fill_opacity=0.2)\n self.add(circ)\n self.wait(0.5)\n self.play(circ.animate.match_points(square))\n self.wait(0.5)\n```"}]}
{"id": "ManimBench-v1_000350", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GraphAutoPosition", "scene_base": "Scene", "num_animations": 1, "num_lines": 16, "has_reasoning": false, "prompt": "Display eight versions of the same graph, each with eight nodes and a set of edges, arranged in three rows. Each graph uses a different automatic layout algorithm: spring, circular, kamada_kawai, planar, random, shell, spectral, and spiral. The graphs are scaled down and positioned side by side in rows to visually compare how each layout arranges the same graph structure.", "code": "from manim import *\n\nclass GraphAutoPosition(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4, 5, 6, 7, 8]\n edges = [(1, 7), (1, 8), (2, 3), (2, 4), (2, 5),\n (2, 8), (3, 4), (6, 1), (6, 2),\n (6, 3), (7, 2), (7, 4)]\n autolayouts = [\"spring\", \"circular\", \"kamada_kawai\",\n \"planar\", \"random\", \"shell\",\n \"spectral\", \"spiral\"]\n graphs = [Graph(vertices, edges, layout=lt).scale(0.5)\n for lt in autolayouts]\n r1 = VGroup(*graphs[:3]).arrange()\n r2 = VGroup(*graphs[3:6]).arrange()\n r3 = VGroup(*graphs[6:]).arrange()\n self.add(VGroup(r1, r2, r3).arrange(direction=DOWN))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display eight versions of the same graph, each with eight nodes and a set of edges, arranged in three rows. Each graph uses a different automatic layout algorithm: spring, circular, kamada_kawai, planar, random, shell, spectral, and spiral. The graphs are scaled down and positioned side by side in rows to visually compare how each layout arranges the same graph structure."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GraphAutoPosition(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4, 5, 6, 7, 8]\n edges = [(1, 7), (1, 8), (2, 3), (2, 4), (2, 5),\n (2, 8), (3, 4), (6, 1), (6, 2),\n (6, 3), (7, 2), (7, 4)]\n autolayouts = [\"spring\", \"circular\", \"kamada_kawai\",\n \"planar\", \"random\", \"shell\",\n \"spectral\", \"spiral\"]\n graphs = [Graph(vertices, edges, layout=lt).scale(0.5)\n for lt in autolayouts]\n r1 = VGroup(*graphs[:3]).arrange()\n r2 = VGroup(*graphs[3:6]).arrange()\n r3 = VGroup(*graphs[6:]).arrange()\n self.add(VGroup(r1, r2, r3).arrange(direction=DOWN))\n```"}]}
{"id": "ManimBench-v1_000351", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SurroundingRectExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 14, "has_reasoning": false, "prompt": "Display a scene with two main sections arranged vertically:\n\n1. At the top, a title reading “A Quote from Newton” is shown. Below it, a blue-colored quote is displayed: \n *“If I have seen further than others, it is by standing upon the shoulders of giants.”* \n This quote is enclosed in a yellow rectangular border with extra padding.\n\n2. Below the quote, a large “Hello World” message is shown in LaTeX style, surrounded by a rounded rectangle.\n\nBoth sections are centered and neatly spaced for clarity.", "code": "from manim import *\n\nclass SurroundingRectExample(Scene):\n def construct(self):\n title = Title(\"A Quote from Newton\")\n quote = Text(\n \"If I have seen further than others, \\n\"\n \"it is by standing upon the shoulders of giants.\",\n color=BLUE,\n ).scale(0.75)\n box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)\n\n t2 = Tex(r\"Hello World\").scale(1.5)\n box2 = SurroundingRectangle(t2, corner_radius=0.2)\n mobjects = VGroup(VGroup(box, quote), VGroup(t2, box2)).arrange(DOWN)\n self.add(title, mobjects)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a scene with two main sections arranged vertically:\n\n1. At the top, a title reading “A Quote from Newton” is shown. Below it, a blue-colored quote is displayed: \n *“If I have seen further than others, it is by standing upon the shoulders of giants.”* \n This quote is enclosed in a yellow rectangular border with extra padding.\n\n2. Below the quote, a large “Hello World” message is shown in LaTeX style, surrounded by a rounded rectangle.\n\nBoth sections are centered and neatly spaced for clarity."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SurroundingRectExample(Scene):\n def construct(self):\n title = Title(\"A Quote from Newton\")\n quote = Text(\n \"If I have seen further than others, \\n\"\n \"it is by standing upon the shoulders of giants.\",\n color=BLUE,\n ).scale(0.75)\n box = SurroundingRectangle(quote, color=YELLOW, buff=MED_LARGE_BUFF)\n\n t2 = Tex(r\"Hello World\").scale(1.5)\n box2 = SurroundingRectangle(t2, corner_radius=0.2)\n mobjects = VGroup(VGroup(box, quote), VGroup(t2, box2)).arrange(DOWN)\n self.add(title, mobjects)\n```"}]}
{"id": "ManimBench-v1_000352", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "BasicMarkupExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 12, "has_reasoning": false, "prompt": "Display five lines of styled text arranged vertically:\n\n1. The first line shows \"foo\" in bold, \"bar\" in italics, and \"foobar\" in bold italics.\n2. The second line shows \"foo\" with a strikethrough, \"bar\" underlined, \"big\" in larger font, and \"small\" in smaller font.\n3. The third line displays chemical formulas: \"H₂O\" with the \"2\" as a subscript, and \"H₃O⁺\" with the \"3\" as a subscript and \"+\" as a superscript.\n4. The fourth line reads \"type help for help\" with \"help\" in monospaced font.\n5. The fifth line shows \"foo\" with a double underline and \"bar\" with a red squiggly underline indicating an error.\n\nAll lines are centered and stacked vertically on the screen.", "code": "from manim import *\n\nclass BasicMarkupExample(Scene):\n def construct(self):\n text1 = MarkupText(\"foo bar foobar\")\n text2 = MarkupText(\"foo bar big small\")\n text3 = MarkupText(\"H2O and H3O+\")\n text4 = MarkupText(\"type help for help\")\n text5 = MarkupText(\n 'foo bar'\n )\n group = VGroup(text1, text2, text3, text4, text5).arrange(DOWN)\n self.add(group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display five lines of styled text arranged vertically:\n\n1. The first line shows \"foo\" in bold, \"bar\" in italics, and \"foobar\" in bold italics.\n2. The second line shows \"foo\" with a strikethrough, \"bar\" underlined, \"big\" in larger font, and \"small\" in smaller font.\n3. The third line displays chemical formulas: \"H₂O\" with the \"2\" as a subscript, and \"H₃O⁺\" with the \"3\" as a subscript and \"+\" as a superscript.\n4. The fourth line reads \"type help for help\" with \"help\" in monospaced font.\n5. The fifth line shows \"foo\" with a double underline and \"bar\" with a red squiggly underline indicating an error.\n\nAll lines are centered and stacked vertically on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass BasicMarkupExample(Scene):\n def construct(self):\n text1 = MarkupText(\"foo bar foobar\")\n text2 = MarkupText(\"foo bar big small\")\n text3 = MarkupText(\"H2O and H3O+\")\n text4 = MarkupText(\"type help for help\")\n text5 = MarkupText(\n 'foo bar'\n )\n group = VGroup(text1, text2, text3, text4, text5).arrange(DOWN)\n self.add(group)\n```"}]}
{"id": "ManimBench-v1_000353", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CodeFromString", "scene_base": "Scene", "num_animations": 1, "num_lines": 17, "has_reasoning": false, "prompt": "Display a styled code window containing Python code that defines a simple Manim scene. The code shows a square fading in, scaling up by a factor of two, and then pausing. The code is rendered with syntax highlighting and a maroon-colored window frame. It is a screenshot of a code editor with macOS-style window containing Manim code.", "code": "from manim import *\n\nclass CodeFromString(Scene):\n def construct(self):\n code = '''from manim import Scene, Square\n\nclass FadeInSquare(Scene):\n def construct(self):\n s = Square()\n self.play(FadeIn(s))\n self.play(s.animate.scale(2))\n self.wait()'''\n\n rendered_code = Code(\n code_string=code,\n language=\"python\",\n background=\"window\",\n background_config={\"stroke_color\": \"maroon\"},\n )\n self.add(rendered_code)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a styled code window containing Python code that defines a simple Manim scene. The code shows a square fading in, scaling up by a factor of two, and then pausing. The code is rendered with syntax highlighting and a maroon-colored window frame. It is a screenshot of a code editor with macOS-style window containing Manim code."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CodeFromString(Scene):\n def construct(self):\n code = '''from manim import Scene, Square\n\nclass FadeInSquare(Scene):\n def construct(self):\n s = Square()\n self.play(FadeIn(s))\n self.play(s.animate.scale(2))\n self.wait()'''\n\n rendered_code = Code(\n code_string=code,\n language=\"python\",\n background=\"window\",\n background_config={\"stroke_color\": \"maroon\"},\n )\n self.add(rendered_code)\n```"}]}
{"id": "ManimBench-v1_000354", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "HomotopyExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 12, "has_reasoning": false, "prompt": "Display a square at the center of the screen, then animate it with a smooth transformation: first, the top and bottom edges ripple slightly in a sine wave pattern, and then the entire square continues to undulate with a traveling wave effect across its shape, creating a dynamic, wavy distortion over time, almost like how a flag would wave at wind.", "code": "from manim import *\n\nclass HomotopyExample(Scene):\n def construct(self):\n square = Square()\n\n def homotopy(x, y, z, t):\n if t <= 0.25:\n progress = t / 0.25\n return (x, y + progress * 0.2 * np.sin(x), z)\n else:\n wave_progress = (t - 0.25) / 0.75\n return (x, y + 0.2 * np.sin(x + 10 * wave_progress), z)\n\n self.play(Homotopy(homotopy, square, rate_func= linear, run_time=2))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square at the center of the screen, then animate it with a smooth transformation: first, the top and bottom edges ripple slightly in a sine wave pattern, and then the entire square continues to undulate with a traveling wave effect across its shape, creating a dynamic, wavy distortion over time, almost like how a flag would wave at wind."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass HomotopyExample(Scene):\n def construct(self):\n square = Square()\n\n def homotopy(x, y, z, t):\n if t <= 0.25:\n progress = t / 0.25\n return (x, y + progress * 0.2 * np.sin(x), z)\n else:\n wave_progress = (t - 0.25) / 0.75\n return (x, y + 0.2 * np.sin(x + 10 * wave_progress), z)\n\n self.play(Homotopy(homotopy, square, rate_func= linear, run_time=2))\n```"}]}
{"id": "ManimBench-v1_000355", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GetLinesToPointExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a set of coordinate axes, then show a small circle positioned at \\((-4, -1.5)\\). Two sets of dashed lines extend from the axes to specific points on the circle: one set in green connects to the circle’s rightmost point, and another set in blue connects to its bottom-left corner, visually indicating their coordinates relative to the axes.", "code": "from manim import *\n\nclass GetLinesToPointExample(Scene):\n def construct(self):\n ax = Axes()\n circ = Circle(radius=0.5).move_to([-4, -1.5, 0])\n\n lines_1 = ax.get_lines_to_point(circ.get_right(), color=GREEN_B)\n lines_2 = ax.get_lines_to_point(circ.get_corner(DL), color=BLUE_B)\n self.add(ax, lines_1, lines_2, circ)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of coordinate axes, then show a small circle positioned at \\((-4, -1.5)\\). Two sets of dashed lines extend from the axes to specific points on the circle: one set in green connects to the circle’s rightmost point, and another set in blue connects to its bottom-left corner, visually indicating their coordinates relative to the axes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GetLinesToPointExample(Scene):\n def construct(self):\n ax = Axes()\n circ = Circle(radius=0.5).move_to([-4, -1.5, 0])\n\n lines_1 = ax.get_lines_to_point(circ.get_right(), color=GREEN_B)\n lines_2 = ax.get_lines_to_point(circ.get_corner(DL), color=BLUE_B)\n self.add(ax, lines_1, lines_2, circ)\n```"}]}
{"id": "ManimBench-v1_000356", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "CreatingMobjects", "scene_base": "Scene", "num_animations": 3, "num_lines": 8, "has_reasoning": false, "prompt": "Display a circle centered on the screen, wait for one second, then remove the circle from the screen and wait for another second.", "code": "from manim import *\n\nclass CreatingMobjects(Scene):\n def construct(self):\n circle = Circle()\n self.add(circle)\n self.wait(1)\n self.remove(circle)\n self.wait(1)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a circle centered on the screen, wait for one second, then remove the circle from the screen and wait for another second."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass CreatingMobjects(Scene):\n def construct(self):\n circle = Circle()\n self.add(circle)\n self.wait(1)\n self.remove(circle)\n self.wait(1)\n```"}]}
{"id": "ManimBench-v1_000357", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ExampleBoxes", "scene_base": "Scene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display six identical squares arranged in a grid with two rows and three columns, with a small space between each square, all centered on the screen.", "code": "from manim import *\n\nclass ExampleBoxes(Scene):\n def construct(self):\n boxes=VGroup(*[Square() for s in range(0,6)])\n boxes.arrange_in_grid(rows=2, buff=0.1)\n self.add(boxes)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display six identical squares arranged in a grid with two rows and three columns, with a small space between each square, all centered on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ExampleBoxes(Scene):\n def construct(self):\n boxes=VGroup(*[Square() for s in range(0,6)])\n boxes.arrange_in_grid(rows=2, buff=0.1)\n self.add(boxes)\n```"}]}
{"id": "ManimBench-v1_000358", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "LineSpacing", "scene_base": "Scene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display two versions of the text \"Hello\\nWorld\" side by side with a large gap between them. The first version has normal line spacing between \"Hello\" and \"World\", while the second version has much wider line spacing.", "code": "from manim import *\n\nclass LineSpacing(Scene):\n def construct(self):\n a = Text(\"Hello\\nWorld\", line_spacing=1)\n b = Text(\"Hello\\nWorld\", line_spacing=4)\n self.add(Group(a,b).arrange(LEFT, buff=5))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two versions of the text \"Hello\\nWorld\" side by side with a large gap between them. The first version has normal line spacing between \"Hello\" and \"World\", while the second version has much wider line spacing."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LineSpacing(Scene):\n def construct(self):\n a = Text(\"Hello\\nWorld\", line_spacing=1)\n b = Text(\"Hello\\nWorld\", line_spacing=4)\n self.add(Group(a,b).arrange(LEFT, buff=5))\n```"}]}
{"id": "ManimBench-v1_000359", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "ArrowTipsShowcase", "scene_base": "Scene", "num_animations": 1, "num_lines": 24, "has_reasoning": false, "prompt": "Display a vertical list of eight horizontal arrows, each with a different tip style, aligned from top to bottom. Each arrow points from left to right and is accompanied by a smaller, scaled-down version to its right. To the left of each large arrow is a blue label in monospaced font indicating the name of the tip style. The top arrow is yellow with the label \"Default (YELLOW)\", while the rest use default coloring and various tip shapes such as triangle, square, circle, and stealth.", "code": "from manim import *\n\nclass ArrowTipsShowcase(Scene):\n def construct(self):\n tip_names = [\n 'Default (YELLOW)', 'ArrowTriangleTip', 'Default', 'ArrowSquareTip',\n 'ArrowSquareFilledTip', 'ArrowCircleTip', 'ArrowCircleFilledTip', 'StealthTip'\n ]\n\n big_arrows = [\n Arrow(start=[-4, 3.5, 0], end=[2, 3.5, 0], color=YELLOW),\n Arrow(start=[-4, 2.5, 0], end=[2, 2.5, 0], tip_shape=ArrowTriangleTip),\n Arrow(start=[-4, 1.5, 0], end=[2, 1.5, 0]),\n Arrow(start=[-4, 0.5, 0], end=[2, 0.5, 0], tip_shape=ArrowSquareTip),\n\n Arrow([-4, -0.5, 0], [2, -0.5, 0], tip_shape=ArrowSquareFilledTip),\n Arrow([-4, -1.5, 0], [2, -1.5, 0], tip_shape=ArrowCircleTip),\n Arrow([-4, -2.5, 0], [2, -2.5, 0], tip_shape=ArrowCircleFilledTip),\n Arrow([-4, -3.5, 0], [2, -3.5, 0], tip_shape=StealthTip)\n ]\n\n small_arrows = (\n arrow.copy().scale(0.5, scale_tips=True).next_to(arrow, RIGHT) for arrow in big_arrows\n )\n\n labels = (\n Text(tip_names[i], font='monospace', font_size=20, color=BLUE).next_to(big_arrows[i], LEFT) for i in range(len(big_arrows))\n )\n\n self.add(*big_arrows, *small_arrows, *labels)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a vertical list of eight horizontal arrows, each with a different tip style, aligned from top to bottom. Each arrow points from left to right and is accompanied by a smaller, scaled-down version to its right. To the left of each large arrow is a blue label in monospaced font indicating the name of the tip style. The top arrow is yellow with the label \"Default (YELLOW)\", while the rest use default coloring and various tip shapes such as triangle, square, circle, and stealth."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass ArrowTipsShowcase(Scene):\n def construct(self):\n tip_names = [\n 'Default (YELLOW)', 'ArrowTriangleTip', 'Default', 'ArrowSquareTip',\n 'ArrowSquareFilledTip', 'ArrowCircleTip', 'ArrowCircleFilledTip', 'StealthTip'\n ]\n\n big_arrows = [\n Arrow(start=[-4, 3.5, 0], end=[2, 3.5, 0], color=YELLOW),\n Arrow(start=[-4, 2.5, 0], end=[2, 2.5, 0], tip_shape=ArrowTriangleTip),\n Arrow(start=[-4, 1.5, 0], end=[2, 1.5, 0]),\n Arrow(start=[-4, 0.5, 0], end=[2, 0.5, 0], tip_shape=ArrowSquareTip),\n\n Arrow([-4, -0.5, 0], [2, -0.5, 0], tip_shape=ArrowSquareFilledTip),\n Arrow([-4, -1.5, 0], [2, -1.5, 0], tip_shape=ArrowCircleTip),\n Arrow([-4, -2.5, 0], [2, -2.5, 0], tip_shape=ArrowCircleFilledTip),\n Arrow([-4, -3.5, 0], [2, -3.5, 0], tip_shape=StealthTip)\n ]\n\n small_arrows = (\n arrow.copy().scale(0.5, scale_tips=True).next_to(arrow, RIGHT) for arrow in big_arrows\n )\n\n labels = (\n Text(tip_names[i], font='monospace', font_size=20, color=BLUE).next_to(big_arrows[i], LEFT) for i in range(len(big_arrows))\n )\n\n self.add(*big_arrows, *small_arrows, *labels)\n```"}]}
{"id": "ManimBench-v1_000360", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "TriangleExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 7, "has_reasoning": false, "prompt": "Display two triangles arranged horizontally:\n\n1. A standard triangle on the left.\n2. A larger triangle on the right, scaled up by a factor of 2 and rotated 60 degrees, creating a dynamic contrast in size and orientation.", "code": "from manim import *\n\nclass TriangleExample(Scene):\n def construct(self):\n triangle_1 = Triangle()\n triangle_2 = Triangle().scale(2).rotate(60*DEGREES)\n tri_group = Group(triangle_1, triangle_2).arrange(buff=1)\n self.add(tri_group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two triangles arranged horizontally:\n\n1. A standard triangle on the left.\n2. A larger triangle on the right, scaled up by a factor of 2 and rotated 60 degrees, creating a dynamic contrast in size and orientation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass TriangleExample(Scene):\n def construct(self):\n triangle_1 = Triangle()\n triangle_2 = Triangle().scale(2).rotate(60*DEGREES)\n tri_group = Group(triangle_1, triangle_2).arrange(buff=1)\n self.add(tri_group)\n```"}]}
{"id": "ManimBench-v1_000361", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DissipatingPathExample", "scene_base": "Scene", "num_animations": 4, "num_lines": 9, "has_reasoning": false, "prompt": "Display a red dot starting on the right side of the screen. As it moves left in two curved arcs, it leaves behind a fading trail. The trail gradually disappears over time, creating a dissipating path effect with a short persistence of 0.5 seconds.", "code": "from manim import *\n\nclass DissipatingPathExample(Scene):\n def construct(self):\n a = Dot(RIGHT * 2)\n b = TracedPath(a.get_center, dissipating_time=0.5, stroke_opacity=[0, 1])\n self.add(a, b)\n self.play(a.animate(path_arc=PI / 4).shift(LEFT * 2))\n self.play(a.animate(path_arc=-PI / 4).shift(LEFT * 2))\n self.wait()", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a red dot starting on the right side of the screen. As it moves left in two curved arcs, it leaves behind a fading trail. The trail gradually disappears over time, creating a dissipating path effect with a short persistence of 0.5 seconds."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DissipatingPathExample(Scene):\n def construct(self):\n a = Dot(RIGHT * 2)\n b = TracedPath(a.get_center, dissipating_time=0.5, stroke_opacity=[0, 1])\n self.add(a, b)\n self.play(a.animate(path_arc=PI / 4).shift(LEFT * 2))\n self.play(a.animate(path_arc=-PI / 4).shift(LEFT * 2))\n self.wait()\n```"}]}
{"id": "ManimBench-v1_000362", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DifferenceExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a solid red square on the left and a solid blue circle overlapping it slightly from the top right. On the right side of the screen, show a green shape representing the difference—where the overlapping part of the circle has been subtracted from the square.", "code": "from manim import *\n\nclass DifferenceExample(Scene):\n def construct(self):\n sq = Square(color=RED, fill_opacity=1)\n sq.move_to([-2, 0, 0])\n cr = Circle(color=BLUE, fill_opacity=1)\n cr.move_to([-1.3, 0.7, 0])\n un = Difference(sq, cr, color=GREEN, fill_opacity=1)\n un.move_to([1.5, 0, 0])\n self.add(sq, cr, un)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a solid red square on the left and a solid blue circle overlapping it slightly from the top right. On the right side of the screen, show a green shape representing the difference—where the overlapping part of the circle has been subtracted from the square."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DifferenceExample(Scene):\n def construct(self):\n sq = Square(color=RED, fill_opacity=1)\n sq.move_to([-2, 0, 0])\n cr = Circle(color=BLUE, fill_opacity=1)\n cr.move_to([-1.3, 0.7, 0])\n un = Difference(sq, cr, color=GREEN, fill_opacity=1)\n un.move_to([1.5, 0, 0])\n self.add(sq, cr, un)\n```"}]}
{"id": "ManimBench-v1_000363", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "AnnulusExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 6, "has_reasoning": false, "prompt": "Display two annuli centered vertically on screen: a larger black ring shifted upward, and a smaller red ring positioned just below it.", "code": "from manim import *\n\nclass AnnulusExample(Scene):\n def construct(self):\n annulus_1 = Annulus(inner_radius=0.5, outer_radius=1).shift(UP)\n annulus_2 = Annulus(inner_radius=0.3, outer_radius=0.6, color=RED).next_to(annulus_1, DOWN)\n self.add(annulus_1, annulus_2)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display two annuli centered vertically on screen: a larger black ring shifted upward, and a smaller red ring positioned just below it."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass AnnulusExample(Scene):\n def construct(self):\n annulus_1 = Annulus(inner_radius=0.5, outer_radius=1).shift(UP)\n annulus_2 = Annulus(inner_radius=0.3, outer_radius=0.6, color=RED).next_to(annulus_1, DOWN)\n self.add(annulus_1, annulus_2)\n```"}]}
{"id": "ManimBench-v1_000364", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "DoubleArrowExample2", "scene_base": "Scene", "num_animations": 1, "num_lines": 11, "has_reasoning": false, "prompt": "Display a square with three horizontal double-headed arrows passing through it from left to right. Each arrow has no spacing from the square’s edges and differs in tip size and color:\n\n1. The first arrow is standard.\n2. The second arrow is yellow with shorter tips.\n3. The third arrow is blue with longer tips.\n\nThe arrows are stacked vertically below the square.", "code": "from manim import *\n\nclass DoubleArrowExample2(Scene):\n def construct(self):\n box = Square()\n p1 = box.get_left()\n p2 = box.get_right()\n d1 = DoubleArrow(p1, p2, buff=0)\n d2 = DoubleArrow(p1, p2, buff=0, tip_length=0.2, color=YELLOW)\n d3 = DoubleArrow(p1, p2, buff=0, tip_length=0.4, color=BLUE)\n Group(d1, d2, d3).arrange(DOWN)\n self.add(box, d1, d2, d3)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a square with three horizontal double-headed arrows passing through it from left to right. Each arrow has no spacing from the square’s edges and differs in tip size and color:\n\n1. The first arrow is standard.\n2. The second arrow is yellow with shorter tips.\n3. The third arrow is blue with longer tips.\n\nThe arrows are stacked vertically below the square."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass DoubleArrowExample2(Scene):\n def construct(self):\n box = Square()\n p1 = box.get_left()\n p2 = box.get_right()\n d1 = DoubleArrow(p1, p2, buff=0)\n d2 = DoubleArrow(p1, p2, buff=0, tip_length=0.2, color=YELLOW)\n d3 = DoubleArrow(p1, p2, buff=0, tip_length=0.4, color=BLUE)\n Group(d1, d2, d3).arrange(DOWN)\n self.add(box, d1, d2, d3)\n```"}]}
{"id": "ManimBench-v1_000365", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "LinearNN", "scene_base": "Scene", "num_animations": 1, "num_lines": 25, "has_reasoning": false, "prompt": "Display a layered neural network graph with four layers of nodes arranged in a partite layout. The layers contain 2, 3, 3, and 2 nodes respectively. Each node in one layer is connected to every node in the next layer, forming a fully connected feedforward structure. The nodes are evenly spaced and styled as small circles, visually representing a simple artificial neural network architecture.", "code": "from manim import *\n\nclass LinearNN(Scene):\n def construct(self):\n edges = []\n partitions = []\n c = 0\n layers = [2, 3, 3, 2] # the number of neurons in each layer\n\n for i in layers:\n partitions.append(list(range(c + 1, c + i + 1)))\n c += i\n for i, v in enumerate(layers[1:]):\n last = sum(layers[:i+1])\n for j in range(v):\n for k in range(last - layers[i], last):\n edges.append((k + 1, j + last + 1))\n\n vertices = np.arange(1, sum(layers) + 1)\n\n graph = Graph(\n vertices,\n edges,\n layout='partite',\n partitions=partitions,\n layout_scale=3,\n vertex_config={'radius': 0.20},\n )\n self.add(graph)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a layered neural network graph with four layers of nodes arranged in a partite layout. The layers contain 2, 3, 3, and 2 nodes respectively. Each node in one layer is connected to every node in the next layer, forming a fully connected feedforward structure. The nodes are evenly spaced and styled as small circles, visually representing a simple artificial neural network architecture."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LinearNN(Scene):\n def construct(self):\n edges = []\n partitions = []\n c = 0\n layers = [2, 3, 3, 2] # the number of neurons in each layer\n\n for i in layers:\n partitions.append(list(range(c + 1, c + i + 1)))\n c += i\n for i, v in enumerate(layers[1:]):\n last = sum(layers[:i+1])\n for j in range(v):\n for k in range(last - layers[i], last):\n edges.append((k + 1, j + last + 1))\n\n vertices = np.arange(1, sum(layers) + 1)\n\n graph = Graph(\n vertices,\n edges,\n layout='partite',\n partitions=partitions,\n layout_scale=3,\n vertex_config={'radius': 0.20},\n )\n self.add(graph)\n```"}]}
{"id": "ManimBench-v1_000366", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PointToCoordsExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a set of axes with labeled coordinates, then show a small circle positioned in the upper right quadrant. A matrix label appears to the right of the circle, showing the circle’s coordinates relative to the axes. A dot marks the rightmost point of the circle.", "code": "from manim import *\n\nclass PointToCoordsExample(Scene):\n def construct(self):\n ax = Axes(x_range=[0, 10, 2]).add_coordinates()\n circ = Circle(radius=0.5).shift(UR * 2)\n\n # get the coordinates of the circle with respect to the axes\n coords = np.around(ax.point_to_coords(circ.get_right()), decimals=2)\n\n label = (\n Matrix([[coords[0]], [coords[1]]]).scale(0.75).next_to(circ, RIGHT)\n )\n\n self.add(ax, circ, label, Dot(circ.get_right()))", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a set of axes with labeled coordinates, then show a small circle positioned in the upper right quadrant. A matrix label appears to the right of the circle, showing the circle’s coordinates relative to the axes. A dot marks the rightmost point of the circle."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PointToCoordsExample(Scene):\n def construct(self):\n ax = Axes(x_range=[0, 10, 2]).add_coordinates()\n circ = Circle(radius=0.5).shift(UR * 2)\n\n # get the coordinates of the circle with respect to the axes\n coords = np.around(ax.point_to_coords(circ.get_right()), decimals=2)\n\n label = (\n Matrix([[coords[0]], [coords[1]]]).scale(0.75).next_to(circ, RIGHT)\n )\n\n self.add(ax, circ, label, Dot(circ.get_right()))\n```"}]}
{"id": "ManimBench-v1_000367", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "LineJointVariants", "scene_base": "Scene", "num_animations": 2, "num_lines": 16, "has_reasoning": false, "prompt": "Display a series of thick green V-shaped lines, each demonstrating a different line joint style (such as miter, bevel, or round) at the corner where the two segments meet. The lines are arranged horizontally with equal spacing, and each one is labeled below with the name of its corresponding joint type, allowing for easy visual comparison of the joint styles.", "code": "from manim import *\n\nclass LineJointVariants(Scene):\n def construct(self):\n mob = VMobject(stroke_width=20, color=GREEN).set_points_as_corners([\n np.array([-2, 0, 0]),\n np.array([0, 0, 0]),\n np.array([-2, 1, 0]),\n ])\n lines = VGroup(*[mob.copy() for _ in range(len(LineJointType))])\n for line, joint_type in zip(lines, LineJointType):\n line.joint_type = joint_type\n\n lines.arrange(RIGHT, buff=1)\n self.add(lines)\n for line in lines:\n label = Text(line.joint_type.name).next_to(line, DOWN)\n self.add(label)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a series of thick green V-shaped lines, each demonstrating a different line joint style (such as miter, bevel, or round) at the corner where the two segments meet. The lines are arranged horizontally with equal spacing, and each one is labeled below with the name of its corresponding joint type, allowing for easy visual comparison of the joint styles."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass LineJointVariants(Scene):\n def construct(self):\n mob = VMobject(stroke_width=20, color=GREEN).set_points_as_corners([\n np.array([-2, 0, 0]),\n np.array([0, 0, 0]),\n np.array([-2, 1, 0]),\n ])\n lines = VGroup(*[mob.copy() for _ in range(len(LineJointType))])\n for line, joint_type in zip(lines, LineJointType):\n line.joint_type = joint_type\n\n lines.arrange(RIGHT, buff=1)\n self.add(lines)\n for line in lines:\n label = Text(line.joint_type.name).next_to(line, DOWN)\n self.add(label)\n```"}]}
{"id": "ManimBench-v1_000368", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "MobjectMatrixExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 9, "has_reasoning": false, "prompt": "Display a 2×2 matrix composed of graphical objects:\n\n- A small circle in the top-left,\n- A small square in the top-right,\n- A large \\( \\pi \\) symbol in the bottom-left,\n- A small star in the bottom-right.\n\nThe matrix appears on screen without animation.", "code": "from manim import *\n\nclass MobjectMatrixExample(Scene):\n def construct(self):\n a = Circle().scale(0.3)\n b = Square().scale(0.3)\n c = MathTex(\"\\\\pi\").scale(2)\n d = Star().scale(0.3)\n m0 = MobjectMatrix([[a, b], [c, d]])\n self.add(m0)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a 2×2 matrix composed of graphical objects:\n\n- A small circle in the top-left,\n- A small square in the top-right,\n- A large \\( \\pi \\) symbol in the bottom-left,\n- A small star in the bottom-right.\n\nThe matrix appears on screen without animation."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass MobjectMatrixExample(Scene):\n def construct(self):\n a = Circle().scale(0.3)\n b = Square().scale(0.3)\n c = MathTex(\"\\\\pi\").scale(2)\n d = Star().scale(0.3)\n m0 = MobjectMatrix([[a, b], [c, d]])\n self.add(m0)\n```"}]}
{"id": "ManimBench-v1_000369", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "SetFill", "scene_base": "Scene", "num_animations": 2, "num_lines": 10, "has_reasoning": false, "prompt": "Display a large white square in the center of the screen. Below it, three circles are arranged horizontally:\n\n- The first circle is green with 80% opacity.\n- The second circle is yellow with full opacity (default).\n- The third circle is a light red color (`#FF2135`) with 20% opacity.\n\nThis demonstrates different fill colors and opacities applied to shapes.", "code": "from manim import *\n\nclass SetFill(Scene):\n def construct(self):\n square = Square().scale(2).set_fill(WHITE,1)\n circle1 = Circle().set_fill(GREEN,0.8)\n circle2 = Circle().set_fill(YELLOW) # No fill_opacity\n circle3 = Circle().set_fill(color = '#FF2135', opacity = 0.2)\n group = Group(circle1,circle2,circle3).arrange()\n self.add(square)\n self.add(group)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a large white square in the center of the screen. Below it, three circles are arranged horizontally:\n\n- The first circle is green with 80% opacity.\n- The second circle is yellow with full opacity (default).\n- The third circle is a light red color (`#FF2135`) with 20% opacity.\n\nThis demonstrates different fill colors and opacities applied to shapes."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass SetFill(Scene):\n def construct(self):\n square = Square().scale(2).set_fill(WHITE,1)\n circle1 = Circle().set_fill(GREEN,0.8)\n circle2 = Circle().set_fill(YELLOW) # No fill_opacity\n circle3 = Circle().set_fill(color = '#FF2135', opacity = 0.2)\n group = Group(circle1,circle2,circle3).arrange()\n self.add(square)\n self.add(group)\n```"}]}
{"id": "ManimBench-v1_000370", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "GraphManualPosition", "scene_base": "Scene", "num_animations": 1, "num_lines": 8, "has_reasoning": false, "prompt": "Display a graph with four nodes manually positioned to form an asymmetric shape: node 1 at the center-left, node 2 at the upper right, node 3 at the lower right, and node 4 at the far left. The nodes are connected in a loop, forming a closed quadrilateral with edges linking them in sequence.", "code": "from manim import *\n\nclass GraphManualPosition(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4]\n edges = [(1, 2), (2, 3), (3, 4), (4, 1)]\n lt = {1: [0, 0, 0], 2: [1, 1, 0], 3: [1, -1, 0], 4: [-1, 0, 0]}\n G = Graph(vertices, edges, layout=lt)\n self.add(G)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a graph with four nodes manually positioned to form an asymmetric shape: node 1 at the center-left, node 2 at the upper right, node 3 at the lower right, and node 4 at the far left. The nodes are connected in a loop, forming a closed quadrilateral with edges linking them in sequence."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass GraphManualPosition(Scene):\n def construct(self):\n vertices = [1, 2, 3, 4]\n edges = [(1, 2), (2, 3), (3, 4), (4, 1)]\n lt = {1: [0, 0, 0], 2: [1, 1, 0], 3: [1, -1, 0], 4: [-1, 0, 0]}\n G = Graph(vertices, edges, layout=lt)\n self.add(G)\n```"}]}
{"id": "ManimBench-v1_000371", "source": "SuienR/ManimBench-v1", "tier": 1, "scene_name": "PgroupExample", "scene_base": "Scene", "num_animations": 1, "num_lines": 10, "has_reasoning": false, "prompt": "Display a group of three point cloud dots arranged horizontally. The left dot is large and blue, the center dot is default-sized, and the right dot is the largest with a pink outline. All three are shown together as a single grouped object centered on the screen.", "code": "from manim import *\n\nclass PgroupExample(Scene):\n def construct(self):\n\n p1 = PointCloudDot(radius=1, density=20, color=BLUE)\n p1.move_to(4.5 * LEFT)\n p2 = PointCloudDot()\n p3 = PointCloudDot(radius=1.5, stroke_width=2.5, color=PINK)\n p3.move_to(4.5 * RIGHT)\n pList = PGroup(p1, p2, p3)\n\n self.add(pList)", "messages": [{"role": "system", "content": "You are an expert Manim Community Edition (ManimCE v0.19+) Python developer and mathematical animator. Given a user request, first plan the spatial layout, coordinate bounds, timing, and pedagogical flow inside ... tags (when reasoning is helpful), and then output a complete, runnable, self-contained ManimCE Python script using `from manim import *`. Never use deprecated ManimGL (`manimlib`) methods like `ShowCreation`, `TexMobject`, `TextMobject`, or `axes.get_graph`; always use modern ManimCE APIs (`Create`, `MathTex`, `Tex`, `Text`, `axes.plot`) and prevent visual overlap using `.to_edge()`, `.next_to()`, and `FadeOut`."}, {"role": "user", "content": "Display a group of three point cloud dots arranged horizontally. The left dot is large and blue, the center dot is default-sized, and the right dot is the largest with a pink outline. All three are shown together as a single grouped object centered on the screen."}, {"role": "assistant", "content": "```python\nfrom manim import *\n\nclass PgroupExample(Scene):\n def construct(self):\n\n p1 = PointCloudDot(radius=1, density=20, color=BLUE)\n p1.move_to(4.5 * LEFT)\n p2 = PointCloudDot()\n p3 = PointCloudDot(radius=1.5, stroke_width=2.5, color=PINK)\n p3.move_to(4.5 * RIGHT)\n pList = PGroup(p1, p2, p3)\n\n self.add(pList)\n```"}]}