Manim Code

The code below will update the function V = 3(x - 6)2 as x increases in value. Notice that the equation is a parabolic curve with independent variable x and dependent variable V. The whole graph actually cannot be fitted on the screen. To improve visibility, the equation was multiplied by a reduction factor whose value is embedded-hard into the equation.

This post is about Manim code for tracing a portion of a graph and assigning a dot to move along that portion. In this animation, we created a cubic graph with y = x3 - 3x2 + 2x + 1.5 and trace a portion of this curve between x = -0.3 and x = 2.2 then assign a point to move along this portion.