system stringclasses 1
value | prompt stringlengths 56 1.4k | chosen stringlengths 819 6.39k | rejected stringlengths 1.11k 8.64k |
|---|---|---|---|
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class LsdSlamScene(Scene):
def construct(self):
title = Text("Monocular SLAM Based on Semi-Dense Direct Method", font_size=36)
subtitle = Text("Proposed by TUM in 2014", font_size=28, color=GRAY).next_to(title, DOWN, buff=0.2)
self.play(Wri... | ```python
from manim import *
import numpy as np
class LsdSlam(Scene):
def construct(self):
title = Text("LSD-SLAM", font_size=72).to_edge(UP)
subtitle = Text(
"Monocular SLAM Based on Semi-Dense Direct Method",
font_size=36,
color=BLUE_C
).next_to(titl... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an educational animation that introduces viewers to the concept of exponential functions by graphing them using Manim. Start with a title that says "Exponential Function Graph" at the top. First, display a set of axes suitable for exponential growth with a range for x from -3 to 3 and y from -1 to 8. The a... | ```python
from manim import *
class ExponentialFunctionGraph(Scene):
def construct(self):
# --- Step 1: Title ---
title = Text("Exponential Function Graph", font_size=36)
self.play(Write(title))
# Fade out the title so we can work cleanly with axes/graphs later
self... | ```python
from manim import *
class ExponentialFunctionGraph(Scene):
def construct(self):
# Title
title = Text("Exponential Function Graph", font_size=36).to_edge(UP)
# Axes configuration
axis_config = {
'x_range': [-3, 3, 1],
'y_range': [0, 8, 1],
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that explains how to evaluate the definite integral of x^3 from 0 to 2 using the power rule for integration, including the simplification of the final expression? | ```python
from manim import *
class EvaluateDefiniteIntegral(Scene):
def construct(self):
"""
Animates the step-by-step evaluation of the definite integral
of x^3 from 0 to 2 using the power rule for integration.
"""
# Title for context
title = Tex("Evaluat... | ```python
from manim import *
class EvaluateDefiniteIntegral(Scene):
def construct(self):
"""
Animates the step-by-step evaluation of the definite integral
of x^3 from 0 to 2 using the power rule for integration.
"""
# Title for context
title = Tex("Evaluat... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 2 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: **Enhanced Animation Instruction:**
- Act 2: Here’s an enhanced version of the animation with additional features: | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0405(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_triangletocirclewitharea()
... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0405(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_triangletocirclewitharea()
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class NaiveBayesRule(Scene):
def construct(self):
title = Text('Naive Bayes Classification Rule', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class NaiveBayesRule(Scene):
def construct(self):
title = Text('Naive Bayes Classification Rule', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to see an animated explanation of how to calculate the definite integral of x^3 from 0 to 2, with each step of the process displayed, including the use of the power rule for integration, the evaluation of the integral at the boundaries, and the final simplified answer. Can you also make sure to pause brief... | ```python
from manim import *
class IntegralCalculation(Scene):
def construct(self):
# --- Step 1: Setup ---
# Display the initial integral expression
setup_label = Text("Calculate the Definite Integral:", font_size=36).to_edge(UP)
integral_expr = MathTex(r"\int_{0}^{2}", "x^3", "dx... | ```python
from manim import *
class IntegralCalculation(Scene):
def construct(self):
# --- Step 1: Setup ---
# Display the initial integral expression
setup_label = Text("Calculate the Definite Integral:", font_size=36).to_edge(UP)
integral_expr = MathTex(r"\int_{0}^{2}" + " = x", "... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class BMICalculationExample(Scene):
def construct(self):
title = Text('The Science Behind Weight - BMI and Health', font_size=36, weight=BOLD)
title.to_edge(UP, buff=0.5)
subtitle = Text('Calculation Exa... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class BMICalculationExample(Scene):
def construct(self):
title = Text('The Science Behind Weight - BMI and Health', font_size=36, weight=BOLD)
title.to_edge(UP, buff=0.5)
subtitle = Text('Calculation Exa... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an educational math animation that shows visually how to find the area under the curve of the function y = x^2, specifically between the x-values of 1 and 3. Start the animation by displaying the equation of the curve, then present the goal of calculating the definite integral of this function from 1 to 3 ... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# 1. Introduction: Display the equation of the curve
title = Text("Area Under the Curve", font_size=40)
equation = MathTex("y = x^2", font_size=60)
equation.next_to(title, DOWN)
self.pla... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# 1. Introduction: Display the equation of the curve
title = Text("Area Under the Curve", font_size=40)
equation = MathTex("y = x^2", font_size=60)
equation.next_to(title, DOWN)
self.pla... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to see an educational animation that visually explains how to evaluate the definite integral of x cubed from 0 to 1. The video should start by displaying the integral problem, and then go step by step through the process of solving it using the power rule for integration. After that, it should show how to ... | ```python
from manim import *
class EvaluateDefiniteIntegral(Scene):
def construct(self):
# --- 1. Introduction ---
# Display the definite integral problem
problem = MathTex(r"\int_0^1 x^3 \, dx", font_size=72)
self.play(Write(problem))
self.wait(2)
self.play(problem... | ```python
from manim import *
class EvaluateDefiniteIntegral(Scene):
def construct(self):
# --- 1. Introduction ---
# Display the definite integral problem
problem = MathTex(r"\int_0^1 x^3 \, dx" + " = x", font_size=72)
self.play(Write(problem))
self.wait(2)
self.pla... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that shows the process of calculating the definite integral of the function x cubed from 0 to 2? Start by displaying the integral problem, then explain the use of the power rule for integration, followed by demonstrating it. Subsequently, perform the integration step by step. Fin... | ```python
from manim import *
class DefiniteIntegralCalculation(Scene):
def construct(self):
# --- 1. Problem Display ---
# Initialize and display the definite integral problem
title = Text("Definite Integral Calculation", font_size=36)
title.to_edge(UP)
self.play(Write(titl... | ```python
from manim import *
class DefiniteIntegralCalculation(Scene):
def construct(self):
# --- 1. Problem Display ---
# Initialize and display the definite integral problem
title = Text("Definite Integral Calculation", font_size=36)
title.to_edge(UP)
self.play(Write(titl... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that first displays the general equation for a Fourier series, then explains it as a concept that decomposes periodic functions into constituent frequencies, and finally shows a simple example of a Fourier series with just two terms, all while smoothly transitioning between the s... | ```python
from manim import *
import numpy as np
class FourierSeriesExplanation(Scene):
def construct(self):
# --- Stage 1: General Equation Display ---
title = Text("The Fourier Series", font_size=48).to_edge(UP)
# Split the equation to allow highlighting of the summation term
... | ```python
from manim import *
import numpy as np
class FourierSeriesExplanation(Scene):
def construct(self):
# --- Stage 1: General Equation Display ---
title = Text("The Fourier Series", font_size=48).to_edge(UP)
# Split the equation to allow highlighting of the summation term
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Demonstrate the concept of torque and rotational motion. | ```python
from manim import *
class TorqueAndRotationalMotion(Scene):
def construct(self):
# Title and explanation
title = Text("Torque and Rotational Motion", font_size=36).to_edge(UP)
explanation = Text(
"Torque causes an object to rotate about an axis.",
font_size... | ```python
from manim import *
class TorqueAndRotationalMotion(Scene):
def construct(self):
# Title and explanation
title = Text("Torque and Rotational Motion", font_size=36).to_edge(UP)
explanation = Text(
"Torque causes an object to rotate about an axis.",
font_size... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated visualization of the bubble sort algorithm using colored bars where the height of each bar represents a different value in an array? The animation should show the swapping process of the bars as they are being sorted in ascending order. | ```python
from manim import *
class HarmonicOscillatorScene(Scene):
def construct(self):
# Displaying the ODE
ode = MathTex(r"m \frac{d^2x}{dt^2} + b \frac{dx}{dt} + kx = 0")
self.play(Write(ode))
self.wait(1)
# Explanation of the physical context
explanation1 = Tex... | ```python
from manim import *
class HarmonicOscillatorScene(Scene):
def construct(self):
# Displaying the ODE
ode = MathTex(r"m \frac{d^2x}{dt^2} + b \frac{dx}{dt} + kx = 0")
self.play(Write(ode))
self.wait(1)
# Explanation of the physical context
explanation1 = Tex... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a 12-second logic scene explaining necessary and sufficient conditions with nested sets. Put set A entirely inside set B, animate examples inside and outside A, and label that A is sufficient for B while B is necessary for A. Avoid implying the converse. | ```python
from manim import *
class SufficientNecessaryScene(Scene):
def construct(self):
title = Text("Sufficient vs Necessary Conditions", font_size=36).to_edge(UP)
self.play(Write(title))
# Draw Venn Diagram
circle_A = Circle(radius=2.0, color=BLUE, fill_opacity=0.15).sh... | ```python
from manim import *
class SetNecessarySufficient(Scene):
def construct(self):
# Create sets on axes
axes = Axes(
x_min=-3,
x_max=3,
y_min=-1,
y_max=7,
axis_config={"include_tip": False},
).shift(LEFT * 2 + DOWN * 0)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I want to create an animation that visually demonstrates the concept of finding the area under a curve on a graph. The curve should represent a quadratic function. Start by showing the axes and the curve. Then, shade the area under the curve between x=0 and x=4. Also, include a label for the equation of the curve near ... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- 1. Function Definition & Initial Scene ---
# Define quadratic function f(x) = 0.5x^2
func = lambda x: 0.5 * x**2
# Setup coordinate axes
axes = Axes(
x_range=[-1, 5, 1],
... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- 1. Function Definition & Initial Scene ---
# Define quadratic function f(x) = 0.5x^2
func = lambda x: 0.5 * x**2
# Setup coordinate axes
axes = Axes(label_font_size=24,
x_rang... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can the Argument Principle be used to determine the nature of the singularities (simple, double, etc.) of a function contained within a contour? | ```python
from manim import *
import numpy as np
class ArgumentPrinciple(Scene):
def construct(self):
title = Text("The Argument Principle", font_size=36)
subtitle = Text(
"Determines singularity types inside contours",
font_size=28,
color=BLUE_C
)
... | ```python
from manim import *
class ArgumentPrinciple(Scene):
def construct(self):
# Introduction
title = Text("The Argument Principle", font_size=48)
subtitle = Text(
"Exploring Singularities through Contour Integration",
font_size=36,
color=GRAY
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here's an enhanced version of the animation that maintains all original features while adding significant new elements:
The enhanced animation begins by constructing the original **MathOperationLayer**, displaying a mathematical operation (+, -, *, /) within a blue-stroked circle, which highlights in orange during a... | ```python
from manim import *
import numpy as np
class MathOperationLayerWithActivation(Scene):
def construct(self):
# Create operation node
operation_node = Circle(radius=0.8, color=BLUE, stroke_width=4)
operation_node.set_fill(BLUE_E, opacity=0.5)
operation_text = MathTex("+").sca... | ```python
from manim import *
import numpy as np
class MathOperationLayerWithActivation(Scene):
def construct(self):
# Create operation node
operation_node = Circle(radius=0.8, color=BLUE, stroke_width=4)
operation_node.set_fill(BLUE_E, opacity=0.5)
operation_text = MathTex("+").sca... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s an enhanced version of the animation that retains all original features while adding significant new elements:
The animation begins by constructing the coordinate axes with a blue color scheme, ranging from 0 to 4 on the x-axis and 0 to 8 on the y-axis. The function *f(x) = x²* is plotted in white, accompanie... | ```python
from manim import *
class RiemannSumToIntegral(Scene):
def construct(self):
# Create axes
axes = Axes(
x_range=[0, 4, 1],
y_range=[0, 8, 2],
x_length=6,
y_length=6,
axis_config={"color": BLUE},
)
axes_labels = axe... | ```python
from manim import *
class RiemannSumToIntegral(Scene):
def construct(self):
# Create axes
axes = Axes(label_font_size=24,
x_range=[0, 4, 1],
y_range=[0, 8, 2],
x_length=6,
y_length=6,
axis_config={"color": BLUE},
)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a 15-second networking scene explaining TCP additive increase and multiplicative decrease. Draw a congestion-window sawtooth over time, reveal linear growth and sharp drops step by step, and explain that the sender probes capacity rather than knowing it in advance. | ```python
from manim import *
class TcpAddIncMulDec(Scene):
def construct(self):
# Title
title = Text("TCP Adds Capacity on Success, Multiplies on Loss", font_size=36).to_edge(UP)
# Initial Window Size
initial_window = VGroup(
Rectangle(width=0.8, height=0.4, co... | ```python
from manim import *
class TcpWindowScene(Scene):
def construct(self):
# Title
title = Text("TCP Window Capacity", font_size=36)
self.play(Write(title))
# Create axes for the graph
axes = Axes(
x_range=[0, 8, 1],
y_range=[0, 8, 1],
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 2 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Can you create an educational animation using ManimCE that illustrates how light rays interact with a pair of lenses? The lenses should be displayed as blue and... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0633(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_areaundercurveexample()
... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0633(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_areaundercurveexample()
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animation using ManimCE that visualizes a simple convolutional neural network with alternating convolutional layers and pooling layers? The network should start with a convolutional layer that has 6 feature maps and a 3x3 kernel, then a pooling layer, followed by another convolutional layer with 16 fe... | ```python
from manim import *
class ConvolutionNetwork(Scene):
def construct(self):
title = Text("A Simple CNN", font_size=36)
self.play(Write(title))
conv_layer1 = RoundedRectangle(width=7, height=2.8, corner_radius=0.1, color=BLUE).shift(LEFT*3 + DOWN*1)
pool_layer1 = RoundedRecta... | ```python
from manim import *
class ConvolutionNetworkScene(Scene):
def construct(self):
# Title for the visualization
title = Text("Visualizing Convolutional Layers", font_size=34)
self.play(Write(title))
self.wait(1)
# --- Layer 1: Input Image ---
input_label = Te... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated video that shows a simple feedforward neural network with three layers, where the first layer has 4 neurons, the second layer has 6 neurons with a ReLU activation function, and the third layer has 3 neurons with a Softmax activation function, and then demonstrate a data point passing through ... | ```python
from manim import *
class NeuralNetworkFlow(Scene):
def construct(self):
# --- Configuration ---
num_input_nodes = 4
num_hidden_nodes = 6
num_output_nodes = 3
input_layer_label = "Input Layer"
hidden_layer_label = "Hidden Layer\n(ReLU)"
out... | ```python
from manim import *
class NeuralNetworkScene(Scene):
def construct(self):
# --- Configuration ---
neuron_radius = 0.25
layer_spacing = 3.5
neuron_spacing = 1.5
# Colors for visual differentiation
color_input = BLUE_E
color_hidden = YELLOW_D
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s an enhanced version of the animation that retains all the original features while adding new elements for clarity and engagement:
The enhanced animation begins by drawing the axes and plotting the quadratic curve \( y = x^2 \) in green, as in the original. However, it now includes a dynamic grid that fades in t... | ```python
from manim import *
class EnhancedQuadraticIntegral(Scene):
def construct(self):
# Create axes
axes = Axes(
x_range=[0, 3, 1],
y_range=[0, 5, 1],
axis_config={"color": BLUE},
)
axes_labels = axes.get_axis_labels(x_label="x", y_label="y")... | ```python
from manim import *
class EnhancedQuadraticIntegral(Scene):
def construct(self):
# Create axes
axes = Axes(
x_range=[0, 3, 1],
y_range=[0, 5, 1],
axis_config={"color": BLUE},
)
axes_labels = axes.get_axis_labels(x_label="x", y_label="y")... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated video that visually demonstrates the Pythagorean theorem? It should include the equation "a^2 + b^2 = c^2" written out, followed by a right triangle appearing on the screen. Next, can you show squares being formed on each side of the triangle to represent "a^2", "b^2", and "c^2" respectively?... | ```python
from manim import *
# From manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Display Equation ---
equation = MathTex("a^2", "+", "b^2", "=", "c^2")
self.play(Write(equation))
self.wait(2)
# --- Step 2: Create Triangle ---
#... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Equation Display ---
eq_initial = MathTex("a^2", "+", "b^2", "=", "c^2")
eq_initial.scale(1.5)
self.play(Write(eq_initial))
self.wait(2)
# Shift initial equation up for... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that visually demonstrates the concept of integrating the function y = x^2 from 0 to 2, including the representation of the area under the curve, the integrand written as a mathematical problem, the steps to solve the integration, and the final solution, while also adding a clean... | ```python
from manim import *
class IntegrationVisualization(Scene):
def construct(self):
# --- 1. Setup Axes and Function ---
axes = Axes(
x_range=[0, 3, 1],
y_range=[0, 5, 1],
axis_config={"include_tip": True, "include_numbers": True},
x_axis_config... | ```python
from manim import *
class IntegrationVisualization(Scene):
def construct(self):
# --- 1. Setup Axes and Function ---
axes = Axes(font_size=24,
x_range=[0, 3, 1],
y_range=[0, 5, 1],
axis_config={"include_tip": True, "include_numbers": True},
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class DivideAndConquerStructure(Scene):
def construct(self):
title = Title('General Structure of Divide-and-Conquer')
self.play(Write(title))
lines = ['Solve(problem P of size n):', ' if n is small en... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class DivideAndConquerStructure(Scene):
def construct(self):
title = Title('General Structure of Divide-and-Conquer')
self.play(Write(title))
lines = ['Solve(problem P of size n):', ' if n is small en... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Please create an animation that walks through the process of solving a double integral in polar coordinates. Start by displaying the double integral symbolically on the screen. Then add a text explanation that we will first integrate with respect to the radius (r). Show the result of that inner integration and display ... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
def construct(self):
# ------------------------------------------------------------------
# Step 1: Initial Display
# ------------------------------------------------------------------
# Define the initial double integr... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
def construct(self):
# ------------------------------------------------------------------
# Step 1: Initial Display
# ------------------------------------------------------------------
# Define the initial double integr... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class DeriveEquilibriumIncome(Scene):
def construct(self):
title = Text("Deriving Equilibrium Income", font_size=36).to_edge(UP)
context_text = Text(
"Where:\n$C_{0}$ = autonomous consumption\n$c$ = marginal propensity to consume",
... | ```python
from manim import *
import numpy as np
class BoardWorkScene(Scene):
def construct(self):
title_text = Text("Solving for Equilibrium Income Y", font_size=36, weight=BOLD).to_edge(UP)
from_eq = MathTex(r"Y =", "C_{0}", "+ ", r"cY", "+ ", "I", "+ ", "G").scale(1.2).next_to(title_te... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class ConceptVariablesAndConstants(Scene):
def construct(self):
title = Text('Basic Concepts of Variables and Constants', font_size=36).to_edge(UP)
header_var = Text('Variable:', color=BLUE, weight=BOLD).next_to(title, DOWN, buff=0.7).align_to(titl... | ```python
from manim import *
import numpy as np
class ProgrammingConcepts(Scene):
def construct(self):
title = Text("Basic Concepts of Variables and Constants", font_size=36)
subtitle = Text("Program Structure", font_color=TEAL_D).scale(0.7)
# Group title components for proper a... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'm learning an undergrad course on numerical linear algebra and want a visual explanation of SVD.
Show geometrically how a matrix A transforms the unit circle into an ellipse, with singular vectors as axes and Σ as scaling.
Then decompose A as UΣV^T and illustrate the transformation step by step, including a noisy per... | ```python
from manim import *
class SVDScene(Scene):
def construct(self):
title = Text('Geometric Interpretation of SVD', font_size=36)
title.to_edge(UP, buff=0.5)
formula = MathTex('A = U', '\\Sigma', 'V^T', font_size=32)
formula.next_to(title, DOWN, buff=0.3)
formula[0][2... | ```python
from manim import *
class SVDScene(Scene):
def construct(self):
title = Text('Geometric Interpretation of SVD', font_size=36)
title.to_edge(UP, buff=0.5)
formula = MathTex('A = U', '\\Sigma', 'V^T', font_size=32)
formula.next_to(title, DOWN, buff=0.3)
formula[0][2... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 2 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: How can I create an animation where text transitions to a new message with an upward shift, followed by a circle with a star inside it expanding so that the sta... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0075(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_textshapeanimation()
se... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0075(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_textshapeanimation()
se... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here's an enhanced version of the documentation configuration with additional features and explanations:
The enhanced documentation configuration builds upon the original by adding comprehensive documentation features while maintaining all existing settings. It now includes intersphinx mapping for linking to Python st... | ```python
from manim import *
class EnhancedDocumentationScene(Scene):
def construct(self):
# Title
title = Text("Enhanced Documentation", font_size=40)
self.play(Write(title))
self.wait(1)
self.play(title.animate.to_edge(UP))
# Main features
feature... | ```python
from manim import *
class EnhancedDocumentationScene(Scene):
def construct(self):
# Title
title = Text("Enhanced Documentation", font_size=40)
self.play(Write(title))
self.wait(1)
self.play(title.animate.to_edge(UP))
# Main features
feature... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class ShaderExampleScene(Scene):
def construct(self):
title = Text('Shader Programming: Core Functionality', font_size=36, weight=BOLD)
title.to_edge(UP, buff=0.4)
self.play(Write(title))
vs_box ... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class ShaderExampleScene(Scene):
def construct(self):
title = Text('Shader Programming: Core Functionality', font_size=36, weight=BOLD)
title.to_edge(UP, buff=0.4)
self.play(Write(title))
vs_box ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s an enhanced version of the animation with additional features:
The animation begins by simultaneously fading in a **circle** and a **triangle** (positioned as in the original script). After a brief pause, the circle smoothly transforms into a **square** while the triangle morphs into a **pentagon**, demonstra... | ```python
from manim import *
import numpy as np
class EnhancedShapeTransformation(Scene):
def construct(self):
# Create initial objects
circle = Circle(radius=1)
triangle = Triangle()
# Arrange them side-by-side for symmetry
shapes_group = VGroup(circle, triangle)... | ```python
from manim import *
class EnhancedShapeTransformation(Scene):
def construct(self):
# Create initial shapes: Circle and Triangle
circle = Circle(radius=1.5)
triangle = Polygon([2, 0, 0], [1, 2, 0], [-1, 2, 0])
# Animate the appearance of the shapes
self.play(FadeIn... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Please create an animation that walks through the process of solving a double integral in polar coordinates. Start by displaying the double integral symbolically on the screen. Then add a text explanation that we will first integrate with respect to the radius (r). Show the result of that inner integration and display ... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
"""
Animation demonstrating the step-by-step solution of a double integral
in polar coordinates: Integral from 0 to 2pi and 0 to 1 of (r dr dtheta).
This represents the area of a unit circle.
"""
def construct(self):
# ---... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
"""
Animation demonstrating the step-by-step solution of a double integral
in polar coordinates: Integral from 0 to 2pi and 0 to 1 of (r dr dtheta).
This represents the area of a unit circle.
"""
def construct(self):
# ---... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that visually shows the area under the curve of y = x^2 from x=0 to x=2, includes the integral symbol with the corresponding limits, demonstrates the calculation of the definite integral, and then displays the final numerical result of the integral calculation? Additionally, afte... | ```python
from manim import *
class DefiniteIntegralAnimation(Scene):
def construct(self):
# 1. Setup Axes and Plot
# Shift axes to the left to make room for equations on the right
axes = Axes(
x_range=[-1, 3, 1],
y_range=[-1, 5, 1],
x_length=6,
... | ```python
from manim import *
class DefiniteIntegralAnimation(Scene):
def construct(self):
# 1. Setup Axes and Plot
# Shift axes to the left to make room for equations on the right
axes = Axes(font_size=24,
x_range=[-1, 3, 1],
y_range=[-1, 5, 1],
x_lengt... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Could you create an educational animation that demonstrates how to evaluate the definite integral of x squared from 0 to 2, including the step-by-step process from stating the problem to showing the calculation of the indefinite integral, applying the bounds, evaluating at the bounds, and then presenting the final solu... | ```python
from manim import *
class DefiniteIntegralEvaluation(Scene):
def construct(self):
# Step 1: State the Problem
problem_label = Text("Problem: Evaluate the definite integral", font_size=36).to_edge(UP)
problem = MathTex(r"\int_{0}^{2} x^2 \, dx")
self.play(Write(pro... | ```python
from manim import *
class DefiniteIntegralEvaluation(Scene):
def construct(self):
# Step 1: State the Problem
problem_label = Text("Problem: Evaluate the definite integral", font_size=36).to_edge(UP)
problem = MathTex(r"\int_{0}^{2} x^2 \, dx")
self.play(Write(pro... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class ClusteringScene(Scene):
def construct(self):
title = Text("Clustering", font_size=60).to_edge(UP)
subtitle = Text("How to discover intrinsic cluster structures\nin reduced-dimension space", font_size=36).next_to(title, DOWN, buff=0.5).set_col... | ```python
from manim import *
import numpy as np
class ClusteringScene(Scene):
def construct(self):
title = Text('Clustering: Revealing Hidden Patterns', font_size=36).to_edge(UP)
subtitle = Text("Discover intrinsic cluster structures", color=BLUE_C).next_to(title, DOWN)
self.pla... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I want to create an animation that visually demonstrates the concept of finding the area under a curve on a graph. The curve should represent a quadratic function. Start by showing the axes and the curve. Then, shade the area under the curve between x=0 and x=4. Also, include a label for the equation of the curve near ... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- Configuration ---
# Define the quadratic function: f(x) = (3/8)x^2
# This coefficient is chosen so the area from 0 to 4 is exactly 8,
# avoiding visual clutter from complex fractions during the sol... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- Configuration ---
# Define the quadratic function: f(x) = (3/8)x^2
# This coefficient is chosen so the area from 0 to 4 is exactly 8,
# avoiding visual clutter from complex fractions during the sol... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s an enhanced version of the animation that retains all the original features while adding explanatory text, a mathematical formula, and a more dynamic transformation sequence:
The animation begins by transforming the existing text into the word "GrowArrow" positioned at the top of the screen, just as in the orig... | ```python
from manim import *
class EnhancedGrowArrow(Scene):
def construct(self):
# Create and transform text
text = Text("GrowArrow").to_edge(UP)
self.play(Write(text))
self.wait(0.5)
# Add coordinate axes
axes = Axes(
x_range=[0, 5, 1],
y_... | ```python
from manim import *
class EnhancedGrowArrow(Scene):
def construct(self):
# Create and transform text
text = Text("GrowArrow").to_edge(UP)
self.play(Write(text))
self.wait(0.5)
# Add coordinate axes
axes = Axes(
x_range=[0, 5, 1],
y_... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animation using ManimCE that visualizes a simple convolutional neural network with alternating convolutional layers and pooling layers? The network should start with a convolutional layer that has 6 feature maps and a 3x3 kernel, then a pooling layer, followed by another convolutional layer with 16 fe... | ```python
from manim import *
class CNNConstruction(Scene):
def construct(self):
# Title
title = Text("Convolutional Neural Network Architecture", font_size=36)
title.to_edge(UP)
self.play(Write(title))
self.wait(0.5)
def create_feature_volume(num_maps, square_size,... | ```python
from manim import *
class CNNConstruction(Scene):
def construct(self):
# Title
title = Text("Convolutional Neural Network Architecture", font_size=36)
title.to_edge(UP)
self.play(Write(title))
self.wait(0.5)
def create_feature_volume(num_maps, square_size,... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an animated explanation of how to evaluate the double integral of r^2 in polar coordinates over a unit circle from 0 to 2π in the angle θ and from 0 to 1 in the radius r. The animation should start by displaying the mathematical problem, then step by step show the solution. Begin by integrating with respec... | ```python
from manim import *
class DoubleIntegralPolar(Scene):
def construct(self):
# Configure colors for clarity
color_r = YELLOW
color_theta = BLUE
color_result = GOLD
# --- Step 1: Setup and Problem Statement ---
problem_title = Text("Double Integral in Polar C... | ```python
from manim import *
class DoubleIntegralPolar(Scene):
def construct(self):
# Configure colors for clarity
color_r = YELLOW
color_theta = BBLUE
color_result = GOLD
# --- Step 1: Setup and Problem Statement ---
problem_title = Text("Double Integral in Polar ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an animated Valentine's Day card that has a mathematical theme. The animation should start with a white background and black axes drawn in the middle of the screen, with the axes labeled with tick marks at the pi over 2 intervals. The graph should feature animations of the sine function and its inverse, as... | ```python
from manim import *
import numpy as np
class ValentinesMathCard(Scene):
def construct(self):
# --- 1. Scene Setup ---
self.camera.background_color = WHITE
# Create black axes
axes = Axes(
x_range=[-4, 4, 1],
y_range=[-3, 3, 1],
axis_con... | ```python
from manim import *
import numpy as np
class ValentinesMathCard(Scene):
def construct(self):
# --- 1. Scene Setup ---
self.camera.background_color = WHITE
# Create black axes
axes = Axes(font_size=24,
x_range=[-4, 4, 1],
y_range=[-3, 3, 1],
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Could you create an animation that visually explains how to solve a triple integral, specifically the integral of the function xyz from z=0 to z=2, x=-1 to x=1, and y=0 to y=1? The animation should first display the integral problem, then step-by-step walk through the integration process by first integrating with respe... | ```python
from manim import *
class TripleIntegralAnimation(Scene):
def construct(self):
# --- Configuration ---
text_color = BLUE_B
math_color = WHITE
result_color = YELLOW
# 1. Intro: Display the original unsolved integral
# Integral of xyz from z=0 to 2, x=-1 to ... | ```python
from manim import *
class TripleIntegralAnimation(Scene):
def construct(self):
# --- Configuration ---
text_color = BLUE_B
math_color = WHITE
result_color = YELLOW
# 1. Intro: Display the original unsolved integral
# Integral of xyz from z=0 to 2, x=-1 to ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an educational animation demonstrating the calculation of the area under a quadratic curve. First, display the function f(x) = x^2. Then show the formula for the area A as the definite integral of x^2 from a to b. Next, visually represent the area under the curve between x = 0 and x = 2. After that, illust... | ```python
from manim import *
class AreaUnderQuadratic(Scene):
def construct(self):
# --- Configuration ---
func = lambda x: x**2
a_val, b_val = 0, 2
# --- Step 1: Display Function ---
axes = Axes(
x_range=[-0.5, 3, 1],
y_range=[-0.5, 5, 1],
... | ```python
from manim import *
class AreaUnderQuadratic(Scene):
def construct(self):
# --- Configuration ---
func = lambda x: x**2
a_val, b_val = 0, 2
# --- Step 1: Display Function ---
axes = Axes(
x_range=[-0.5, 3, 1],
y_range=[-0.5, 5, 1],
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class TransformationMatrixDerivation(Scene):
def construct(self):
title = Text('Window-Viewport Transformation', font_size=40, weight=BOLD)
subtitle = Text('Derivation of Transformation Matrix', font_size=32, co... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class TransformationMatrixDerivation(Scene):
def construct(self):
title = Text('Window-Viewport Transformation', font_size=40, weight=BOLD)
subtitle = Text('Derivation of Transformation Matrix', font_size=32, co... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can the Argument Principle be used to determine the nature of the singularities (simple, double, etc.) of a function contained within a contour? | ```python
from manim import *
import numpy as np
class ArgumentPrinciple(Scene):
def construct(self):
title = Text("The Argument Principle", font_size=36)
subtitle = Text(
"Determines singularity types inside contours",
font_size=28,
color=BLUE_C
)
... | ```python
from manim import *
class ArgumentPrinciple(Scene):
def construct(self):
title = Text("The Argument Principle", font_size=36)
subtitle = Text(
"Unveiling Singularities Within Contours",
font_size=28,
color=GRAY
)
title_group = V... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'm teaching sequence modeling and want a clear confusion-matrix-style visualization for next-character predictions. Show predicted probability slices vs. actual next-character labels on the validation set, with a big heatmap comparing probabilities to true counts. Annotate typical mispredictions and emphasize per-char... | ```python
from manim import *
class SequenceModelingConfusionMatrixVisualization(Scene):
def construct(self):
title = Text('Sequence Modeling: Confusion Matrix', font_size=36)
subtitle = Text('Visualizing Model Performance', font_size=24, color=BLUE)
header = VGroup(title, subtitle).arrang... | ```python
from manim import *
class SequenceModelingConfusionMatrixVisualization(Scene):
def construct(self):
title = Text('Sequence Modeling: Confusion Matrix', font_size=36)
subtitle = Text('Visualizing Model Performance', font_size=24, color=BBLUE)
header = VGroup(title, subtitle).arran... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
import numpy as np
class WeberFechnerLaw(Scene):
def construct(self):
title = Text('Perceived Loudness & Logarithmic Compression', font_size=36, color=BLUE)
title.to_edge(UP, buff=0.4)
subtitle = Text('W... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
import numpy as np
class WeberFechnerLaw(Scene):
def construct(self):
title = Text('Perceived Loudness & Logarithmic Compression', font_size=36, color=BLUE)
title.to_edge(UP, buff=0.4)
subtitle = Text('W... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | What is the effect of adding and removing elements on the levels of the cumulative hierarchy? | ```python
from manim import *
class CumulativeHierarchy(Scene):
def construct(self):
# Set background color to dark blue
# For older Manim versions:
self.camera.background_color = "#0C2D48"
# For ManimCE, uncomment the line below:
# config.background_color = "#0C2D48"
... | ```python
from manim import *
class CumulativeHierarchy(Scene):
def construct(self):
# Set background color to dark blue
# For older Manim versions:
self.camera.background_color = "#0C2D48"
# For ManimCE, uncomment the line below:
# config.background_color = "#0C2D48"
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s the enhanced animation description:
The scene begins by creating a VGroup of three circles arranged in a grid, which are drawn sequentially with smooth animations. As the circles appear, a transformation matrix [[1, 2], [0, 1]] is applied, stretching them horizontally in a shear-like motion. Simultaneously, t... | ```python
from manim import *
class LinearTransformationScene(Scene):
def construct(self):
# Create circles arranged in a grid
circles = VGroup(
Circle(radius=0.5, color=BLUE).shift(LEFT + UP),
Circle(radius=0.5, color=GREEN).shift(LEFT + DOWN),
Circle(radius=0.5... | ```python
from manim import *
class LinearTransformationScene(Scene):
def construct(self):
# Create circles arranged in a grid
circles = VGroup(
Circle(radius=0.5, color=BBLUE).shift(LEFT + UP),
Circle(radius=0.5, color=GREEN).shift(LEFT + DOWN),
Circle(radius=0.... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated video that visually demonstrates the Pythagorean theorem? It should include the equation "a^2 + b^2 = c^2" written out, followed by a right triangle appearing on the screen. Next, can you show squares being formed on each side of the triangle to represent "a^2", "b^2", and "c^2" respectively?... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Display the Equation ---
title = MathTex("a^2 + b^2 = c^2").scale(1.5)
self.play(Write(title))
self.wait(2)
# Clear the title for the next steps
self.play(FadeOut(title... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Display the Equation ---
title_eq = MathTex("a^2", "+", "b^2", "=", "c^2").scale(1.5)
self.play(Write(title_eq))
self.wait(2)
# --- Step 2: Create Triangle ---
# Right ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class AbsorptionLaws(Scene):
def construct(self):
title = Text('Absorption Laws', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=ORANGE).next_to(... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class AbsorptionLaws(Scene):
def construct(self):
title = Text('Absorption Laws', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=ORANGE).next_to(... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Could you create an educational animation that visualizes the formation of an ionic compound for my chemistry class? Start by showing separate representations of an oxygen molecule, a metal atom, and an electron. These should appear in a row, with some space between them. Then, have a positively charged ion fade in abo... | ```python
from manim import *
class IonicCompoundFormation(Scene):
def construct(self):
# 1. Initial State: Oxygen Molecule, Metal Atom, Electron
o2 = MathTex("O_2", color=RED).scale(1.5)
metal = MathTex("Na", color=GRAY).scale(1.5)
# Electron represented as a small charged... | ```python
from manim import *
class IonicCompoundFormation(Scene):
def construct(self):
# 1. Initial State: Oxygen Molecule, Metal Atom, Electron
o2 = MathTex("O_2", color=RED).scale(1.5)
metal = MathTex("Na", color=GRAY).scale(1.5)
# Electron represented as a small charged... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class ShortestPathSummary(Scene):
def construct(self):
title = Text('Shortest Path Algorithms Summary', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, ... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class ShortestPathSummary(Scene):
def construct(self):
title = Text('Shortest Path Algorithms Summary', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | How can we model the probability distribution of extreme weather events using the GEV distribution? | ```python
from manim import *
import numpy as np
class GEVDistribution(Scene):
def construct(self):
# Title
title = Text("Forecasting Extremes: GEV Distribution", font_size=32)
self.play(Write(title))
self.wait(1)
self.play(title.animate.to_edge(UP))
# Creat... | ```python
from manim import *
import numpy as np
class GEVDistribution(Scene):
def construct(self):
# Title
title = Text("Forecasting Extremes: GEV Distribution", font_size=32)
self.play(Write(title))
self.wait(1)
self.play(title.animate.to_edge(UP))
# Creat... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'd like to create an animation that visually represents a neural network with three layers: the first layer having 20 neurons, the second layer 10 neurons, and the third layer 5 neurons. Each neuron should be relatively small with a clear outline. The neurons should appear one layer at a time, each layer coming from a... | ```python
# Import required classes from Manim
from manim import *
class NeuralNetworkForwardPass(Scene):
def construct(self):
# Configuration settings
layer_sizes = [20, 10, 5]
layer_positions = [-3.0, 0.0, 3.0]
neuron_radius = 0.1
neuron_spacing = 0.8
# --... | ```python
from manim import *
class NeuralNetworkForwardPass(Scene):
def construct(self):
# --- Configuration ---
LAYER_COUNT = 3
NEURON_PER_LAYER = [20, 10, 5]
# Layer positions along Y-axis
START_Y = -2
SPACING_Y = 0.6
# Neuron sizes
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 2 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: How can I create an animation where text transitions to a new message with an upward shift, followed by a circle with a star inside it expanding so that the sta... | ```python
from manim import *
class MultiActMasterpiece_0678(Scene):
def clear_stage(self):
if self.mobjects:
FadeOut(*self.mobjects).set_run_time(0.8)
self.wait(0.4)
def construct(self):
self.act_1_textcirclestaranimation()
self.clear_stage()
self.act_2... | ```python
from manim import *
class MultiActMasterpiece_0867(Scene):
def clear_stage(self):
if self.mobjects:
self.play(FadeOut(*self.mobjects), run_time=0.8)
def construct(self):
# --- First Act ---
# Step 1: Text Transition
initial_text = Text("Initia... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 3 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Develop a Manim animation explaining the concept of orthogonality in linear algebra. Visualize orthogonal vectors, subspaces, and projections, step by step.
- A... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0687(Scene):
def clear_stage(self):
if self.mobjects:
return FadeOut(*self.mobjects)
else:
return Wait(0)
def construct(self):
self.act_1_orthogonalvectors()
self.play(self.clear... | ```python
"""
Multi-Act Masterpiece
This masterwork combines three distinct scenes into a seamless multi-part narrative.
Each part stands alone while flowing smoothly into the next via FadeOut animations.
Run this full file to render all parts sequentially.
"""
from manim import *
class MultiPartMasterpiece(Scene):... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'm learning robustness to misspecification and want to animate sensitivity analysis: perturb priors/likelihoods, display how outputs shift, and plot robustness measures across a parameter grid with quick scenario comparisons. | ```python
from manim import *
class SensitivityAnalysis(Scene):
def construct(self):
# Title
title = Text("Sensitivity Analysis", font_size=48)
self.play(Write(title))
self.wait(1)
# Clear title for main content
self.play(FadeOut(title))
# Model Parameters
... | ```python
from manim import *
import numpy as np
class SensitivityAnalysisScene(Scene):
def construct(self):
# Title
title = Text("Sensitivity Analysis of Robust Models", font_size=36)
self.play(Write(title))
self.wait(1)
# Create a simple model equation
equation = ... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class TargetNetworkScene(Scene):
def construct(self):
title = Text('Advanced Techniques in Deep Q-Networks', font_size=28).to_edge(UP)
subtitle = Text('Key Improvement Idea: Target Network for Stabilized Training', font_size=26, color=BLUE... | ```python
from manim import *
import numpy as np
class TargetNetworkExplanation(Scene):
def construct(self):
title = Text("Target Network for Stability", font_size=36)
# Create boxes and labels for the main components
box_main = RoundedRectangle(width=4, height=2, corner_radius=0... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that illustrates how the sum of the harmonic series diverges as n approaches infinity? Start by displaying the formula for the partial sum of the series, proceed with a visual narration explaining that we're considering the limit as n goes to infinity, then show the mathematical ... | ```python
from manim import *
class HarmonicSeriesDivergence(Scene):
def construct(self):
# ------------------------------------------------------------------
# 1. Formula Display: Render the formula for the partial sum.
# ------------------------------------------------------------------
... | ```python
from manim import *
class HarmonicSeriesDivergence(Scene):
def construct(self):
# ------------------------------------------------------------------
# 1. Formula Display: Render the formula for the partial sum.
# ------------------------------------------------------------------
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class TeacherForcing(Scene):
def construct(self):
title = Text('Teacher Forcing Training', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=ORANGE)... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class TeacherForcing(Scene):
def construct(self):
title = Text('Teacher Forcing Training', font_size=34, color=WHITE, weight=BOLD)
title.to_edge(UP, buff=0.5)
title_line = Line(LEFT, RIGHT, color=ORANGE)... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | **Enhanced Animation Instruction:**
Begin by creating a `Circle` and a `Triangle` positioned at the center of the screen, then group them into a `VGroup` and rotate them by **-45 degrees** as in the original script. Next, introduce a dynamic transformation: animate the `Circle` morphing smoothly into the `Triangle` ... | ```python
from manim import *
class EnhancedShapeTransformation(Scene):
def construct(self):
# Create shapes and group them
circle = Circle(color=BLUE, fill_opacity=0.5)
triangle = Triangle(color=RED, fill_opacity=0.5)
shapes = VGroup(circle, triangle).arrange(RIGHT, buff=1)
... | ```python
from manim import *
class EnhancedShapeTransformation(Scene):
def construct(self):
# Create shapes and group them
circle = Circle(color=BLUE, fill_opacity=0.5)
triangle = Triangle(color=RED, fill_opacity=0.5)
shapes = VGroup(circle, triangle).arrange(RIGHT, buff=1)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 2 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Can you create an animated video that shows the steps to solve the definite integral of x cubed from 0 to 2, including the application of the Fundamental Theore... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0438(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_solvedefiniteintegral()
... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0438(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_solvedefiniteintegral()
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class PipelineDepthScene(Scene):
def construct(self):
title = Text('Pipeline Depth', font_size=36)
subtitle = Text('Relationship between Depth and Performance', font_size=28)
group = VGroup(title, subtitle).arrange(DOWN, buff=0.2)
s... | ```python
from manim import *
import numpy as np
class InstructionPipelineScene(Scene):
def construct(self):
title = Text('Instruction Pipelines', font_size=36)
title.to_edge(UP, buff=0.3)
self.play(Write(title))
main_text = Text("There is no free lunch.\nImproving one metric usua... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class KerberosSecurityAnalysis(Scene):
def construct(self):
context_title = Text('Authentication Protocols: Homework', font_size=32, color=BLUE)
context_title.to_edge(UP, buff=0.4)
main_title = Text('Ana... | ```python
from manim import *
from manim import config
Text.set_default(font='SimHei')
class KerberosSecurityAnalysis(Scene):
def construct(self):
context_title = Text('Authentication Protocols: Homework', font_size=32, color=BLUE)
context_title.to_edge(UP, buff=0.4)
main_title = Text('Ana... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 3 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Display a square by fading it in. Then, rotate the square 45 degrees. Finally, fade the square out and pause for one second.
- Act 2: Can you create a custom an... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0470(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_someanimations()
self.c... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0470(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_someanimations()
self.c... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I want an educational animation showing the area under the curve of the function y = 0.25x^2 from x=0 to x=2 on graph axes labeled with 'x' and 'y'. Also, let the graph and axes be created with an animation effect. After showing the area under the curve highlighted in yellow with 50% opacity, display text "Area under c... | ```python
from manim import *
class AreaUnderCurveScene(Scene):
def construct(self):
# 1. Setup: Axes and Function Graph
axes = Axes(
x_range=[-0.5, 3, 1],
y_range=[-0.5, 2, 1],
axis_config={"color": BLUE},
tips=False
)
axis_labels = a... | ```python
from manim import *
class AreaUnderCurveScene(Scene):
def construct(self):
# 1. Setup: Axes and Function Graph
axes = Axes(
x_range=[-0.5, 3, 1],
y_range=[-0.5, 2, 1],
axis_config={"color": BLUE},
tips=False
)
axis_labels = a... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to create an educational animation that shows the concept of a lithium-ion moving through the grid of metal oxides in a battery, along with an electron. The animation should start with both a grid of metal oxides and a separate set of carbon grids at the top of the screen. There should also be a lithium io... | ```python
from manim import *
class BatteryIonTransport(Scene):
def construct(self):
# --- Configuration & Colors ---
COLOR_CARBON = GREY_B
COLOR_METAL = RED_B
COLOR_OXIDE = WHITE
COLOR_LI = PURPLE
COLOR_ELECTRON = BLUE_C
GRID_HEIGHT = 3.0
ST... | ```python
from manim import *
class BatteryIonTransport(Scene):
def construct(self):
# --- Configuration & Colors ---
COLOR_CARBON = GREY_B
COLOR_METAL = RED_B
COLOR_OXIDE = WHITE
COLOR_LI = PURPLE
COLOR_ELECTRON = BLUE_C
GRID_HEIGHT = 3.0
ST... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that visually explains the concept of a circle, its radius, and the formulas for its area and circumference? Start with the animation showing a circle and a line representing the radius, with a label 'r'. Then, have a text appear that explains that the area of a circle is given b... | ```python
from manim import *
class CircleConcepts(Scene):
def construct(self):
# --- Step 1: Circle and Radius ---
circle = Circle(radius=2, color=BLUE)
center = circle.get_center()
edge = circle.get_right()
radius_line = Line(center, edge, color=YELLOW)
ra... | ```python
from manim import *
class CircleConcepts(Scene):
def construct(self):
# --- Step 1: Circle and Radius ---
circle = Circle(radius=2, color=BLUE)
center = circle.get_center()
edge = circle.get_right()
radius_line = Line(center, edge, color=YELLOW)
ra... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class ClassificationRule(Scene):
def construct(self):
title = Text('Classification Rule', font_size=36).to_edge(UP)
rule_tex = MathTex('\\hat{y}', '=', '\\arg\\max_y \\left(\\log P(y) + \\sum_{j=1}^{d} \\log P(x_j|y)\\right)', font_size=40).next_to... | ```python
from manim import *
import numpy as np
class ClassificationRule(Scene):
def construct(self):
# --- Configuration ---
# Colors for consistent theming
COLOR_TEXT = WHITE
COLOR_MATH = YELLOW
# Position offsets for sequential display without overlap
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an animated educational video that illustrates the concept of finding the area under a curve using integrals. The animation should include a blue-colored set of axes and a green parabolic function graph. I want to display the area under the curve between the points 0.3 and 4.5 on the x-axis, highlighted wi... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- Step 1: Setup Axes ---
# Create blue axes spanning from [-1, 6] on X-axis and [-1, 20] on Y-axis.
axes = Axes(
x_range=[-1, 7, 1],
y_range=[-1, 22, 2],
x_length=8,
... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- Configuration ---
COLOR_AXES = BLUE
COLOR_FUNCTION = GREEN
COLOR_AREA = color_gradient(RED, GREEN)
COLOR_LABELS = WHITE
# Display Blue Axes
axes = Axes(
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like an animation that demonstrates how to solve a basic definite integral step by step. Start by showing the integral of x squared from 0 to 1. Afterwards, I'd like a written explanation that we're evaluating this definite integral to appear, followed by the general power rule for integrals displayed. Next, sh... | ```python
from manim import *
class DefiniteIntegralScene(Scene):
def construct(self):
# --- Step 1: Display Problem ---
problem = MathTex(
r"\int_{0}^{1}", "x^2", "\, dx",
font_size=72,
color=BLUE
)
self.play(Write(problem))
self... | ```python
from manim import *
class DefiniteIntegralSolution(Scene):
def construct(self):
# --- Step 1: Display the Integral ---
integral_expr = MathTex(
r"\int_{0}^{1}", "x^2", "\\, dx"
).scale(1.5)
self.play(Write(integral_expr))
self.wait(1)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 3 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Could you create an animation using Manim where three separate texts appear one below the other with some space between them, each surrounded by a rectangle tha... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0641(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_frameboxanimation()
sel... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0641(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_frameboxanimation()
sel... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | You are a Manim expert. Please convert the Markdown lecture notes into executable Manim CE v0.19.0 code that displays content in English. The page layout must be clear, with no overlapping elements, and you must not output any explanatory or descriptive text outside the code. Pay special attention to avoiding common er... | ```python
from manim import *
import numpy as np
class ConceptVariablesAndConstants(Scene):
def construct(self):
title = Text('Basic Concepts of Variables and Constants', font_size=36).to_edge(UP)
header_var = Text('Variable:', color=BLUE, weight=BOLD).next_to(title, DOWN, buff=0.7).align_to(titl... | ```python
from manim import *
import numpy as np
class VariablesAndConstants(Scene):
def construct(self):
title = Text('Basic Concepts of Variables and Constants', font_size=36)
title.to_edge(UP, buff=0.5)
self.play(Write(title))
var_title = Text('Variable:', font_size=28)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Here’s an enhanced version of the animation that retains the original rotation while adding explanatory text, a coordinate system for context, and a transformation into a square to demonstrate geometric relationships:
The animation begins by displaying a right-angled triangle with vertices at (-1, 0), (1, 0), and (0... | ```python
from manim import *
class EnhancedRotationScene(Scene):
def construct(self):
# Create coordinate axes
axes = Axes(
x_range=[-3, 3, 1],
y_range=[-3, 3, 1],
x_length=6,
y_length=6,
axis_config={"color": BLUE},
)
x_l... | ```python
from manim import *
class EnhancedRotationScene(Scene):
def construct(self):
# Create coordinate axes
axes = Axes(
x_range=[-3, 3, 1],
y_range=[-3, 3, 1],
x_length=6,
y_length=6,
axis_config={"color": BBLUE},
)
x_... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create an educational animation that visually explains the process of solving a triple integral problem step by step. Start with the triple integral of the function xyz over the cube defined by 0 to 1 on all axes. First, display the integral formula on the screen. Then, guide me through each integration step one at a t... | ```python
from manim import *
class TripleIntegralSolution(Scene):
def construct(self):
# --- Step 0: Display the initial integral formula ---
initial_integral = MathTex(
r"\int_0^1 \int_0^1 \int_0^1 xyz \, dx \, dy \, dz",
font_size=48
).move_to(ORIGIN)
... | ```python
from manim import *
class TripleIntegralSolution(Scene):
def construct(self):
# --- Step 0: Display the initial integral formula ---
initial_integral = MathTex(
r"\int_0^1 \int_0^1 \int_0^1 xyz \, dx \, dy \, dz",
font_size=48
).move_to(ORIGIN)
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can adaptive quadrature accurately integrate discontinuous functions, and how does it handle points of discontinuity? | ```python
from manim import *
class AdaptiveQuadratureScene(Scene):
def construct(self):
# Title
title = Text("Adapting to Discontinuity: The Magic of Adaptive Quadrature", font_size=32)
self.play(Write(title))
self.wait(1)
self.play(title.animate.scale(0.7).to_edge(UP))
... | ```python
from manim import *
class AdaptiveQuadratureScene(Scene):
def construct(self):
# Title
title = Text("Adapting to Discontinuity: The Magic of Adaptive Quadrature", font_size=32)
self.play(Write(title))
self.wait(1)
self.play(title.animate.scale(0.7).to_edge(UP))
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that shows a math student thoughtfully considering the greatest common divisor (GCD) of two numbers, 48 and 64, and then display the answer? I would like a pensive imagery with thought bubbles, and after a short pause, the answer should be revealed clearly. Can the overall color ... | ```python
from manim import *
class GCDThoughtScene(Scene):
def construct(self):
# --- Color Palette ---
# Soft, muted colors for a pensive and easy-on-the-eyes aesthetic
BG_COLOR = "#F0F4F8" # Soft light blue-grey background
STUDENT_COLOR = "#78909C" # Muted slate blue
... | ```python
from manim import *
class GCDThoughtScene(Scene):
def construct(self):
# --- Color Palette ---
# Soft, muted colors for a pensive and easy-on-the-eyes aesthetic
BG_COLOR = "#F0F4F8" # Soft light blue-grey background
STUDENT_COLOR = "#78909C" # Muted slate blue
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to see an animation that explains the concept of a derivative using a visual representation. Can you create an animation where a graph is shown on a set of axes with both the original function and its derivative? The function should be something simple, like f(x) = x^2, and its derivative should also be sh... | ```python
from manim import *
class DerivativeConcept(Scene):
def construct(self):
# --- STEP 1: SETUP ---
# Create axes and the original function f(x) = x^2
axes = Axes(
x_range=[-1, 3, 1],
y_range=[-1, 5, 1],
axis_config={"include_tip": True, "numbers_t... | ```python
from manim import *
class DerivativeConcept(Scene):
def construct(self):
# --- STEP 1: SETUP ---
# Create axes and the original function f(x) = x^2
axes = Axes(label_font_size=24,
x_range=[-1, 3, 1],
y_range=[-1, 5, 1],
axis_config={"include_ti... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a long, multi-act 3Blue1Brown-style ManimCE animation video structured into 3 modular acts with clean `FadeOut` stage transitions between acts:
- Act 1: Create a 15-second physiology scene explaining the sigmoidal oxygen-hemoglobin binding curve. Move a probe from the low plateau through the steep middle to the ... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0505(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_oxygenbindingcurve()
se... | ```python
from manim import *
import numpy as np
class MultiActMasterpiece_0505(Scene):
def clear_stage(self):
if self.mobjects:
self.play(*[FadeOut(m) for m in self.mobjects], run_time=0.8)
self.wait(0.4)
def construct(self):
self.act_1_oxygenbindingcurve()
se... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated video that visually demonstrates the Pythagorean theorem? It should include the equation "a^2 + b^2 = c^2" written out, followed by a right triangle appearing on the screen. Next, can you show squares being formed on each side of the triangle to represent "a^2", "b^2", and "c^2" respectively?... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Display the Equation ---
title = MathTex("a^2 + b^2 = c^2").scale(1.5)
self.play(Write(title))
self.wait(2)
# Clear the title for the next steps
self.play(FadeOut(title... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Step 1: Equation Display ---
eq_initial = MathTex("a^2", "+", "b^2", "=", "c^2")
eq_initial.scale(1.5)
self.play(Write(eq_initial))
self.wait(2)
# Shift initial equation up for... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Could you create an educational animation that demonstrates how to evaluate the definite integral of x squared from 0 to 2, including the step-by-step process from stating the problem to showing the calculation of the indefinite integral, applying the bounds, evaluating at the bounds, and then presenting the final solu... | ```python
from manim import *
class DefiniteIntegralEvaluation(Scene):
def construct(self):
# --- Configuration ---
step_color = BLUE_B
math_color = YELLOW
result_color = GREEN
# --- Step 1: State the Problem ---
step1_label = Text("1. State the Problem", font_size=... | ```python
from manim import *
class DefiniteIntegralEvaluation(Scene):
def construct(self):
# --- Configuration ---
step_color = BLUE_B
math_color = YELLOW
result_color = GREEN
# --- Step 1: State the Problem ---
step1_label = Text("1. State the Problem", font_size=... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create an educational ManimCE animation on 'Euler's Totient Function' (Unveiling Patterns: Euler's Totient Function): What patterns emerge in the Euler's Totient Function when plotted for the sequence of natural numbers?
Visual style guidance: A harmonious blend of dark blues and bright oranges, contrast creates an eng... | ```python
from manim import *
class EulersTotientFunction(Scene):
def construct(self):
# Color Definitions
DARK_BLUE = "#1874CD"
BRIGHT_ORANGE = "#FFA600"
# Title
title = Text(
"Unveiling Patterns:\nEuler's Totient Function",
font_size=36,
... | ```python
"""
Title: "Unveiling Patterns: Euler's Totient Function"
Scene Description:
This educational animation explores how Euler's Totient Function emerges visually across sequences of integers using a color-coded grid. The visual style employs a harmonious blend of dark blues and bright oranges, enhancing engagem... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation that visually explains the concept of a circle, its radius, and the formulas for its area and circumference? Start with the animation showing a circle and a line representing the radius, with a label 'r'. Then, have a text appear that explains that the area of a circle is given b... | ```python
from manim import *
class CircleConcept(Scene):
def construct(self):
# 1. Initial Scene: Animate the drawing of a circle and a line segment representing the radius
circle = Circle(radius=2, color=BLUE)
center = circle.get_center()
radius_line = Line(start=center, end=cente... | ```python
from manim import *
class CircleConcept(Scene):
def construct(self):
# 1. Initial Scene: Animate the drawing of a circle and a line segment representing the radius
circle = Circle(radius=2, color=BLUE)
center = circle.get_center()
radius_line = Line(start=center, end=cente... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a Manim scene that demonstrates basic mobject placement using various alignment methods. | ```python
from manim import *
class AlignmentDemo(Scene):
"""
A demonstration of basic mobject placement and alignment methods in Manim.
Showcases move_to, next_to, shift, and align_to with clear visual labels.
"""
def construct(self):
# -----------------------------------------------------... | ```python
from manim import *
class AlignmentDemo(Scene):
"""
A demonstration of basic mobject placement and alignment methods in Manim.
Showcases move_to, next_to, shift, and align_to with clear visual labels.
"""
def construct(self):
# -----------------------------------------------------... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an educational animation using Manim that shows an oxygen molecule with electrons moving along a complex path around it, including the appearance and disappearance of the molecule and the electron? | ```python
from manim import *
import numpy as np
class OxygenElectronAnimation(Scene):
def construct(self):
# --- Configuration ---
# CPK coloring convention: Oxygen is Red
O_COLOR = RED
ELECTRON_COLOR = YELLOW
ATOM_RADIUS = 0.5
BOND_LENGTH = 1.2
# -... | ```python
from manim import *
import numpy as np
class OxygenElectronAnimation(Scene):
def construct(self):
# --- Configuration ---
# CPK coloring convention: Oxygen is Red
O_COLOR = RED
ELECTRON_COLOR = YELLOW
ATOM_RADIUS = 0.5
BOND_LENGTH = 1.2
# -... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Write Manim code for a scene illustrating the concept of cross products in vector calculus. Visualize the geometric interpretation and properties of cross products, step by step. | ```python
from manim import *
class CrossProductScene(Scene):
def construct(self):
# --- Step 1: Introduction ---
title = Text("The Geometric Power of Cross Products", font_size=36).to_edge(UP)
intro_text = Tex(
"Cross product combines vectors $\\vec{a}$ and $\\vec{b}$.",
... | ```python
from manim import *
class CrossProductScene(Scene):
def construct(self):
# --- Step 1: Introduction ---
title = Text("The Geometric Power of Cross Products", font_size=36).to_edge(UP)
intro_text = Tex(
"Cross product combines vectors into a new one,\nperpendicular to b... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a 15-second networking scene explaining TCP additive increase and multiplicative decrease. Draw a congestion-window sawtooth over time, reveal linear growth and sharp drops step by step, and explain that the sender probes capacity rather than knowing it in advance. | ```python
from manim import *
class TcpAddIncMulDec(Scene):
def construct(self):
# Title
title = Text("TCP Adds Capacity on Success, Multiplies on Loss", font_size=36).to_edge(UP)
# Initial Window Size
initial_window = VGroup(
Rectangle(width=0.8, height=0.4, co... | ```python
from manim import *
class TcpSawtoothScene(Scene):
def construct(self):
title = Text("TCP Congestion Control", font_size=36)
self.play(Write(title))
self.wait(1)
# Create axes for the graph
axes = Axes(
x_range=[0, 8, 1],
y_range=[0, 10, 1]... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Can you create an animated video that shows a simple feedforward neural network with three layers, where the first layer has 4 neurons, the second layer has 6 neurons with a ReLU activation function, and the third layer has 3 neurons with a Softmax activation function, and then demonstrate a data point passing through ... | ```python
from manim import *
class NeuralNetworkFlow(Scene):
def construct(self):
# --- Configuration ---
num_input_nodes = 4
num_hidden_nodes = 6
num_output_nodes = 3
input_layer_label = "Input Layer"
hidden_layer_label = "Hidden Layer\n(ReLU)"
out... | ```python
from manim import *
class NeuralNetworkScene(Scene):
def construct(self):
# --- Configuration ---
# Layer Sizes
INPUT_SIZE = 4
HIDDEN_SIZE = 6
OUTPUT_SIZE = 3
# Colors for visual differentiation
COLOR_INPUT = BLUE_E
COLOR_H... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Could you create an educational animation that visually demonstrates how to calculate the area under the curve of the function f(x) = 3 - x^2 from x = -1 to x = 2? First, show the function itself, then display the integral of the function within the given bounds. Next, plot the function's graph and highlight the area u... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- 1. Setup: Create Axes ---
axes = Axes(
x_range=[-2, 3, 1],
y_range=[-2, 4, 1],
x_length=7,
y_length=5,
axis_config={"include_tip": True, "numbers_to_excl... | ```python
from manim import *
class AreaUnderCurve(Scene):
def construct(self):
# --- 1. Setup: Create Axes ---
axes = Axes(
x_range=[-2, 3, 1],
y_range=[-2, 4, 1],
x_length=7,
y_length=5,
axis_config={"include_tip": True, "numbers_to_excl... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to create an educational animation that starts by displaying a 2x2 matrix A with entries [[2, 1], [1, 3]] on the screen. Then, after showing the matrix, I want to add text above it that says "Visualize a linear transformation" to explain the purpose of the animation. Next, please create a grid representing... | ```python
from manim import *
class LinearTransformationVisualization(Scene):
def construct(self):
# 1. Matrix Display
# Define the matrix A = [[2, 1], [1, 3]]
matrix_values = [[2, 1], [1, 3]]
matrix_a = Matrix(matrix_values)
matrix_label = MathTex("A = ")
matrix_gro... | ```python
from manim import *
class LinearTransformationVisualization(Scene):
def construct(self):
# 1. Matrix Display
# Define the matrix A = [[2, 1], [1, 3]]
matrix_values = [[2, 1], [1, 3]]
matrix_a = Matrix(matrix_values)
matrix_label = MathTex(r"A = " + " = x")
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'd like to create an educational animation that visually explains how to evaluate the definite integral of x cubed from 0 to 2 using the power rule for integration. The animation should include the following steps: display the problem, write an explanation of applying the power rule, demonstrate the power rule itself,... | ```python
from manim import *
class DefiniteIntegralPowerRule(Scene):
def construct(self):
# --- Step 1: Problem Display ---
title = Text("Evaluating a Definite Integral Using Power Rule", font_size=36)
title.to_edge(UP)
problem = MathTex(
r"\int_{0}^{2}", "x^3", "\, dx... | ```python
from manim import *
class DefiniteIntegralPowerRule(Scene):
def construct(self):
# ------------------------------------------------------------------
# Step 1: Display Problem
# Visually present the definite integral expression on screen.
# --------------------------------... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Please create an educational animation that visually walks through the steps of solving a double integral in polar coordinates. Start by displaying the double integral of r^2 * sin(theta) with respect to r from 0 to 1 and theta from 0 to pi. Follow that by a step-by-step integration process. First, calculate the inner ... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
def construct(self):
# --- 1. Initial Display ---
# Render the full double integral expression
initial_integral = MathTex(
r"\int_{0}^{\pi} \int_{0}^{1} r^2 \sin(\theta) \, dr \, d\theta",
font_size=48
... | ```python
from manim import *
class PolarDoubleIntegral(Scene):
def construct(self):
# --- 1. Initial Display ---
# Render the full double integral expression
initial_integral = MathTex(
r"\int_{0}^{\pi} \int_{0}^{1} r^2 \sin(\theta) \, dr \, d\theta",
font_size=48
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I would like to have an animated video explaining the Pythagorean theorem visually. The video should start by displaying the theorem "a^2 + b^2 = c^2" on the screen. Then it should show a right-angled triangle and label its sides as "a", "b", and "c". Next to each side of the triangle, I want to see squares with the co... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Configuration ---
COLOR_A = BLUE
COLOR_B = GREEN
COLOR_C = RED
# Define triangle dimensions (3-4-5 right triangle)
point_A = ORIGIN
point_B = np.array([3, 0, 0]... | ```python
from manim import *
class PythagoreanTheorem(Scene):
def construct(self):
# --- Configuration ---
COLOR_A = BBLUE
COLOR_B = GREEN
COLOR_C = RED
# Define triangle dimensions (3-4-5 right triangle)
point_A = ORIGIN
point_B = np.array([3, 0, 0... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'd like an educational animation that visually explains how to calculate the definite integral of the function x^3 from 0 to 2. Start by displaying the integral problem on the screen. Then, show the power rule of integration for n-th powers of x, followed by the actual integration step of our specific problem, using t... | ```python
from manim import *
class IntegralCalculation(Scene):
def construct(self):
# 1. Display the Problem
problem = MathTex(r"\int_{0}^{2} x^3 \, dx")
problem.to_edge(UP)
self.play(Write(problem))
self.wait(1)
# 2. Explain the Rule
rule_label = Text("Pow... | ```python
from manim import *
class IntegralCalculation(Scene):
def construct(self):
# 1. Display the Problem
problem = MathTex(r"\int_{0}^{2} x^3 \, dx")
problem.to_edge(UP)
self.play(Write(problem))
self.wait(1)
# 2. Explain the Rule
rule_label = Text("Pow... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | I'd like to create an animation that visually represents a neural network with three layers: the first layer having 20 neurons, the second layer 10 neurons, and the third layer 5 neurons. Each neuron should be relatively small with a clear outline. The neurons should appear one layer at a time, each layer coming from a... | ```python
# Import required classes from Manim
from manim import *
class NeuralNetworkForwardPass(Scene):
def construct(self):
# Configuration settings
layer_sizes = [20, 10, 5]
layer_positions = [-3.0, 0.0, 3.0]
neuron_radius = 0.1
neuron_spacing = 0.8
# --... | ```python
from manim import *
class NeuralNetworkForwardPass(Scene):
def construct(self):
# --- Configuration ---
# Layer sizes
n_layer_1 = 20
n_layer_2 = 10
n_layer_3 = 5
# Neuron appearance settings
radius_small = 0.15
stroke_width_small = 2
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Create a 30-second Manim explainer showing how a square-wave approximation is built from odd sine terms. Show the first term, then the first two odd terms, then the first three odd terms, and compare the final approximation to a square-wave reference. | ```python
from manim import *
class FourierSeriesBuild(Scene):
def construct(self):
title = Text("Building a Square Wave", font_size=40).to_edge(UP)
axes = Axes(
x_range=[-PI, PI, PI / 2],
y_range=[-1.6, 1.6, 0.5],
x_length=9,
y_length=4.5,
... | ```python
from manim import *
class FourierSeriesBuild(Scene):
def construct(self):
title = Text("Building a Square Wave", font_size=40).to_edge(UP)
axes = Axes(
x_range=[-PI, PI, PI / 2],
y_range=[-1.6, 1.6, 0.5],
x_length=9,
y_length=4.5,
... |
You are an elite Manim Community Edition (ManimCE v0.19+) developer who creates visually rich, deeply animative 3Blue1Brown-style mathematical animations.
Follow these strict rules in every script:
1. Output ONLY a single complete, runnable Python code block (`from manim import *`). Never truncate code and never output... | Please create an animated video using ManimCE that demonstrates projectile motion with the effects of air resistance where the animation starts with the title "Projectile motion with air resistance" followed by a subtitle "The motion is influenced by gravity and drag force." Then, show two physics equations representin... | ```python
from manim import *
import numpy as np
class ProjectileMotionWithAirResistance(Scene):
def construct(self):
# --- 1. Title Sequence ---
title = Text("Projectile motion with air resistance", font_size=48)
subtitle = Text("The motion is influenced by gravity and drag force.", font_s... | ```python
from manim import *
import numpy as np
class ProjectileMotionWithAirResistance(Scene):
def construct(self):
# --- 1. Title Sequence ---
title = Text("Projectile motion with air resistance", font_size=48)
subtitle = Text("The motion is influenced by gravity and drag force.", font_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.