Trying to animate motion along a line

I am trying to animate motion along a line. I have only copied CL code to make things work, but I am having trouble getting my animation to stop at exactly time = 7, and show that last point. In addition, I would like to copy this slide but have the point be a draggable point along the line but still show the “t=time” above, where time is 0 to 7. Any help would be appreciated.

Rectilinear Motion Activity

The easiest way is stop at 7 seconds to just code the timeSincePress to stop at 7.

act1.timeSincePress(7)

Hi, Andrew.

I am just beginning to make a lesson about motion of a particle/body on a line and came across this post. Would you be willing to share your completed activity with me? Thank you!!

I am still in the process of working on it. A colleague copied a bunch of handwritten drawings into the activity. Really just making a handwritten worksheet into a desmos activity. Since then I have been trying to make the graphs better, but I’m still not finished. I never got the animation to play the way I wanted, so I made “time, t” a slider that the students can manipulate in order to answer the questions on those slides. I am having some trouble copying points from one graph on one slide to another graph on another slide. I know you can create copies of slides, I just wanted a way that if I changed the graph on the first slide, it would change all the graphs on the next few slides where the graph was copied, but the questions are different.

You can copy it and use it as you wish. Hope you like it.

https://teacher.desmos.com/activitybuilder/custom/601d73a05f4828316de75e14

Andrew Bayliss
Teacher of Mathematics

1 Like

Thank you, Andrew! I look forward to looking through it. I am still learning how to code, but if I can help in any way, I will share!

If you add this code into your graph CL, it will add a playhead. You could then get rid of the time slider and just display the time, and students can control pausing and playing:

number(`a`): this.animationTime
animationDuration: 5