Coding
Frustration…
Animating changes to a function?
Animating the movement of text is one thing…
This exercise in coding is characterized by 3 key developments. Animating the movement of text was easy enough, but animating the movement of functions is another beast entirely. In this scene, I constructed a cosine function and tried animating changes to the function. This was very difficult, as I don’t know how to tell it to change in the way I want. Instead, I defined some different cosine functions and called a “ReplacementTransform” to change from one function to another, as opposed to actually changing the function. This worked quite well for animating the change in amplitude and displacement of the function, but I dislike how the animation for stretch/squeeze came out… The bottom of each other hump animated vertically, as opposed to the whole waveform stretching horizontally. I really hope to find a solution to this soon as it’s quite frustrating. On the upside, however, I learned how to write in MathTex and how to animate additions to MathTex elements. You can see the written function in the top right corner change, and the function changing with it. This is achieved in a method similar to the function changes, as I defined 4 different MathTex elements and simply transition from one to the other. Animating function changes, animating MathTex changes, and learning how to write in MathTex were significant learning curves (lol…). Hopefully, this visual could help students understand how values in a sinusoidal function modulated the output. Below is the rendered scene. Please enjoy.