Restrict equation only if it meets a requirement

I’m making an assignment to teach students the basics of linear graphs. In the assignment, I have a plane that I want to disappear if it hits a (randomly generated) point (i.e if the point lies on the linear equation), but to continue flying off the graph if it does not touch the point. Is there a way to do this?
#2. I want the students to be able to replay the task as many times as they want, and shift to an ending screen if they want to exit. How would I add this feature?

Can you share a link to the activity, so we can get a better sense of it?

1 Like

Here is a start on what you are asking for - let me know if you need anything more: flying plane • Activity Builder by Desmos

The idea I used was to determine ahead of time if the target point is on the line, and then, the Hit variable is set to 1 if this is the case, as well as if the plane is to the right of the x-coordinate of the point.

The randomization is done by creating a seed variable that is tied to the number of presses of the button. So each time the New Point button is pressed, the seed increases by 1, which gives a new output to the randomization.

2 Likes