Home > Mobile >  How to return pairs of (x,y) coordinates defining an implicit curve?
How to return pairs of (x,y) coordinates defining an implicit curve?

Time:02-05

I have implemented this Heart curve (Wolfram Mathworld) via an implicit function script I found here enter image description here

Inspection of contour shows that the range is -1 to 16:

print(contour.min(), contour.max())
-1.0 15.869446307662544

So, I deduce that your points are probably the ones near zero:

points = (contour>-0.1) & (contour<0.1)

enter image description here

So, I can get the list of X,Y with:

Y, X = np.where(points)
  •  Tags:  
  • Related