Dragging a point on a graph and displaying a function of that number

Hi all,
First time poster here. I would like for the variable I named in one graph to be able to be used in another graph in the activity. For example, I have a student drag a point across a number line (let’s call this number b) and I want the activity to display 3^b. The way I thought of was to create a second graph and have it graph the point (0,b) and label this point, but this seems not very user-friendly. I’m new to the computation layer, so let me know!

What you want to do should be fairly simple, but I’m not clear what you want this to look like.

Do you want one graph component with a number line only, and then another graph component that graphs the point (b, 3^b) as the student moves b on the number line? Or do you want them in the same graph component, and as the student drags a point along the x-axis, the image point is graphed above it?

He Daniel,
Thanks for your response!

I guess the idea would be either:

  1. One graph component with a number line only (which I have created) and then display (somewhere??) of the output of f(x)=3^x based on the number they dragged it to.
  2. One graph component with a number line only and a second graph component which graphs (b,3^b) based on the number they dragged on the first graph component.

Here are a couple of basic examples. Let me know if you are looking for something else or want an explanation of what’s happening in these examples. number line example • Activity Builder by Desmos

2 Likes

This is incredibly helpful!! thank you so much. Just a follow-up question about the third graph. For creating the number line, you used an expression in the form (x1,y1)(1-t)+(x2,y2)t. I have figured out how it works, but I’m curious how you knew to use that. Is that something from a parametric functions unit that I’m forgetting from my pre-calc days in high school?

Yeah, it’s a line defined parametrically. I’ve learned / re-learned a lot of math in the last couple of years in order to make Desmos activities! I actually made an activity that explains this specific technique in detail, as part of an animation project for students. Check out the 5th module in this collection if you are interested. I haven’t used it with any students yet, so feedback is always appreciated. Desmos Classroom Activities

1 Like

Here is an activity the Suzanne von Oy made a while back that goes into parametrics more in depth.

2 Likes

Thank you so much! I will take a look at both of these!

1 Like