Closed brettmorrisonAO5ANNEX closed 5 months ago
I think the issue might actually just be with the rate the trackers are moving on the different curves. For some reason at t=0.5 (where all trackers should be halfway along their control polygons), the trackers on both of the decomposed quadratic Bezier curves (rec_inter_1
and rec_interp_2
) are not quite at the halfway mark. This small difference in progression leads to the unexpected behavior of the final LIVis
component.
Looking at the picture above, it appears that the trackers for rec_interp_1
and rec_interp_2
are symmetrical across the center of the screen (not with respect to color, but with respect to the position of the tracker). The expected behavior is to be flipped (which can be observed for all the other LIVis
components. This leads me to believe I messed up an endpoint assignment in the pre-animation phase. So it could either be a math issue (as discussed 2x above), a speed issue (as mentioned 1x above), or a point assignment/LIVis
creation error in the pre-animation code.
I think the issue is that I am relying on the default settings of the ManimCE function MoveAlongPath
, which I believe uses an alpha
parameter [0, 1] like t to keep track of the progress of a moving object along the path. I don't understand why it doesn't work since I chose rate_func=linear
, which should mean all animations follow the same 't' value throughout the defined run_time=5
duration. However that does not seem to be the case so I may need to figure out a way to still use a global t value or be able to calculate custom values for the run_time
parameter to accompany the MoveAlongPath
call so they are all following a consistent rate.
I found a Reddit post on r/manim (https://www.reddit.com/r/manim/comments/19b12vg/my_first_ever_manim_project/) that helped me implement the global t needed to sync all animations properly using always_redraw
. I was also able to use TracedPath
to reveal the Bezier curve:
For some reason with cubic (and likely higher degrees), the final Bezier curve is slightly different than the actual linear interpolation.
I think it has to do with the fact that I define the path for the
rec_interp_1
andrec_interp_2
curves as literal quadratic Bezier curves using sets {P0, P1, P2} and {P1, P2, P3} respectively. In actuality, they may need to follow a slightly different path since the final curve is anaffine
combination of the two quadratic Bezier curves.