I have borrowed and modified other programs, but I just can’t get this perfect. I need the square root of n^2 in box one and n in box two. If only the points would stay the same distance from their images, it would work. Can you help me. (And yes, there probably is extra code in there just because I did copy and paste others’ work.)
not sure exactly what you’re seeking to do. it seems like it does what you want?
There’s a bit in here I’m unsure of, but my instinct is that your correctness is based on the points’ locations, but you should be using the images’ locations.
You are correct in that assumption. I didn’t know how to make the correctness attached to the images.
a couple thoughts here, i hope they help:
on the math side of things it isn’t true that `\sqrt{n^2}=n` but i’m sure you know that, so let’s move on to the coding side of things.
the original activity you used has a lot of problems with it(not your doing I know), amongst them using images for expressions and misalignment of mouse position with dragging target.
see if this works better: my drag • Activity by Mike Gleeson
looks like this in practice:

Yes!! Thank you! I am in awe!
I like how you used large 0-opacity points to make it appear you’re dragging the polygon. If you switch the point shape to the square, it more closely matches the polygon’s sides, as subtle as the difference is.
Also, I appreciate the practice of setting the drag bounds by your graph bound variables, so you don’t accidentally run them off the graph.
Thanks, was going to change the point shape as a final step but entirely forgot.


