I’m hoping someone can help me understand how Desmos decides what variables change when a point is dragged. I have created the graph that I want to use in Activity builder. I want students to input the circle radius and then trace the point around the circumference. This works as expected, but I can’t change the size of the circle.
In my graph, the drag point of (4cos a, 4sin a) drags the point around the circumference of a circle with radius 4. However, when I change the radius of that same point to a variable (R cos a, R sin a), the same drag point no longer moves around the circumference. Instead the circle changes size.
Can you help me understand how Desmos is interpreting these two points differently and suggest a way around my problem?
have you tried negative numbers?
I feel like I may have done this before. Have you tried (cos a)R? I think it may be the first variable in a point that is dragged.
Thanks for the reply. I tried that combination before posting. Changing the order still changes the circle radius and the point no longer traces the circle.
While I have your attention: thank you for being so helpful on this forum. Your replies and solutions in other threads have helped me learn scripting in Activity Builder.
I’m not sure I understand your suggestion. What would you suggest I make negative? Thanks for taking the time to offer help.
I found a way. Make functions for your coordinates, the use f(a) and g(a). You’ll need to toggle drag on:
Very clever. Thank you. Something to add to my toolkit: hide away the math of movable points to a function so there is only one input used to determine the x and y coordinate.
I appreciate your help.
Here you go:
The green dot changes the radius (Set to only slide horizontally).
The block dot can be dragged around the circle. (graph set to degrees as I expect students first exploration won’t be in radians
Thank you so much. What I find interesting is that you have a similar drag point that I could not make work: (r cos a, r sin a). Yet Desmos interprets it differently because of how you setup r not as a simple number, but rather the result of a calculation. This helps me better understand how variables interact with drag points.
In his example, r is not a slider. We essentially did the same thing creating an intermediate calculation. I wonder if maybe R being listed first was why it’s the draggable slider, and if you moved a to line 2 it might work.
Yeah. Both solutions only have one variable connected with the dragging action.
FWIW, before I posted my question, I did try your idea by changing the order of how I listed the variables in my graph. But the order the variables appear in the item list do not seem to influence how Desmos decides which variable to manipulate with the drag point.
I think that behavior is consistent: lines of code in Activity Builder do not appear to have an execution order, so neither would calculations in a graph. It took time to wrap my head around that idea. I have come to understand that lines of code are not executed in a particular order. Instead, Activity Builder code simply exists and is evaluated for truth.
Thanks again for your contributions to this and many other questions on this forum.
Exception is when-otherwise statements. Once a condition is met, it stops reading any more code. The following for example would never output result2 because of line 1:
myVariable= when condition1 result1
when condition1 and condition2 result2