how do i check if 2 list of points share any points in desmos
Something like this:
https://www.desmos.com/calculator/z7znnppuwd
what does the sign do?
if the count of the shared points is greater than 0 you get 1
otherwise you get 0.
could u make it so that it would output the coordinates of the point?
The previous answers contained an stupid bug (a y instead of an x), here’s the corrected version:
https://www.desmos.com/calculator/z7znnppuwd
ps: I’ll answer your new question … in a bit
This gives you the list of the shared points:
https://www.desmos.com/calculator/au8uam331o
Edite: same bug
edited: same bug (y instead of x)
If you are working with points perhaps you may also want to introduce some tolerancies to account for approximation errors: In that case the function Ssamepoint(p,q) should become:
S_samepoint(p,q) = { abs(p.x-q.x)<0.01: {abs(p.y-q.y)<0.01: 1, 0}, 0}
Here’s a different method that makes use of the distance()
function many folks overlook. You could also use a tolerance instead of distance = 0.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.