Revealing student function with animated transformations


I would like to know how to animate a function from a student input. My idea is specifically a response to slide 6 in the attached activity. When the student put in their function notation it simply shows up. Is there a way to animate it upon submit. And even later when there is a combination of transformations to reveal each translation 1 a t a time? (Horizontal shift THEN the vertical shift)

I am somewhat proficient in the animation advice given by Suzanne Von Oy from the desmos videos last year, but it has been awhile…summer was too good!

Thanks to anyone for the help!

1 Like

I can’t copy this activity because of a deprecated feature. Are you able to copy and edit?

Here’s what the graph would look like for an animation. Example

I can’t copy it either. It has a “depreciated feature”. What I am having trouble with is having desmos incorporate whatever function notation the student puts in and animates the parent function to whatever their input was.

I know how to animate from the “time since submit” with the t_0 approach, it’s having the CL read the student’s specific function notation that I do no know how to code.

Am I explaining that well?

Yes, I got it now. The deprecated feature was likely rawExpression, which was used to read the function notation. I found this post by @Daniel_Grubbs that shows a possible solution.

This was very helpful!

Here is what I have now. The last thing that I need to figure out is how to animate the vertical stretch factor last. If you were to type f(x-3)+2 it will animate the shift right by three then the shift up 2. Any Ideas of how to incorporate something like 3f(x-2)+5 where the stretch by three happens last?

It looks like you’re just missing A3a1 in the function g(x). Am I missing something?

Here it is with the added A3a1. The issue I am seeing is that it shows the vertical stretch right away, and then after 3 seconds it performs another vertical stretch after the shifting.

For example: If you type 2f(x-3)+4 it will stretch it by 2 without it animated from the parent function x^2, then shift it right 3 and up 4. Then it will stretch it again. It looks like by another factor of 2.

I think this is what you’re looking for.

I ended up using this

So the A3 starts at 1 and transfers to the student input. BUT I came across another issue. I plugged in f(x-100) (As any great student would do) and it skipped the horizontal shift!

The h_1 function is referencing a list that ranges from -10 to 10, so the horizontal shift gets an output of zero if it’s outside that range. You can just make the range of H to be larger numbers, but a shift of more than 10 would place the graph outside the viewing window. You could just make an errorMessage that appears if |h_1|>10.

Sorry for the late response! Thanks for the window tip. It caps out at 10,000 in a list, so I think I’ll keep these slides at bay for now. I’d like to figure out how to let the code handle any crazy input from a student. Right now if they choose a number not in the list it shows an incorrect transformation.

School year got ahead of me. I appreciate all of the help folks! You’ll see more posts from me in the future I’m sure!

I eagerly stole this from Suzanne von Oy (whicked smaht!) … and since then I have been able to create animations based on student input. To start the animation the student submits their response or presses a button and that “timeSinceSubmit” tells the variable t_0 to start moving … and as you can see although t_0 can tick on forever however, the animation in this example will last precisely 3 seconds (denominator in a_1). hope this helps!!