Self Checking Translation of Shapes

I was hoping to create a self checking translation of shapes assignment. I’m still not very good at creating checks for editable graphs. I created the moveable shape (image) and the stationary shape (pre-image), but I am not sure how to check when the image is moved to the correct location on the graph according to the given translation.

I tried doing something on slide 1 pulling code from different sources but got completely lost.
On slide 2, I got close to what I needed, but it says there are CL errors (the dashboard may not match) and I’m not sure what I need to fix.

Any help would be greatly appreciated!

Here are some templates you can use if you like: Transforming Polygons (templates, repeated practice, visualizers) • Activity Builder by Desmos Classroom

I’ll take a look at your code tomorrow. But since you are having them move it by an anchor point you would just need to check that the x and y coordinates of the anchor point are equal to your target destination. So if the point is P and the target is T, something like

C = { P.x = T.x: 1, 0}{P.y = T.y: 1, 0}

Ok, so I used your suggestion and it works, but I’m wondering if there is a way to add a tolerance to that the check works for a radius of say .13 from that point.

Sure. You can use the distance function. Write

C = {distance(P,T) < 0.13 : 1, 0}

Awesome!! So much simpler than what I was trying to make. Thank you for the help!

1 Like

I was trying to apply the same self checking technique to the following rotation of shapes assignment… but not sure if there is an impact based on the computations used to create the rotation (a computation borrowed from someone else). I created the target point (where I want point P1 to end up) but I have a feeling it is not as simple as that since my correct is not popping up. Any further help would go above and beyond but I would greatly appreciate it.

I think the issue is that you were rotating the polygon, but the original points defining the polygon were not being changed, so P1 wasn’t actually moving anywhere. So there are two similar approaches. On the first screen, I just named the moveable point A, and then used the distance function to test A against T (you don’t need to check the coordinates as well, just the distance check is sufficient). On the second screen, I created a new list of points called P_Rotate, which stores the calculation. Then you can check the elements of that list against T. [Copy of] Self Checking Rotation of Shapes Help Needed • Activity Builder by Desmos Classroom

I thought it was something like that… and had assigned a variable to the rotating point calculation, but it didn’t work for me because I forgot to change the variable in the distance calculation. Thank you again for your help, I feel like I’m starting to understand this a little more each time someone helps me out on here. Always really excited to learn!

Yep, that’s exactly how I learned :slight_smile:

1 Like

Same! Also, trying to answer more questions and comparing your solution to others’ is a great way to find spots to streamline your thinking.