Anybody got any idea what's going on with this bizarre and nasty slowdown?

:rofl: If the aim is to get the exact coordinates of the points, instead of generating a picture, then I would just calculate them once and then shift them. This might have the added benefit of producing better floating values (if that is a concern).

1 Like

Will look into p5, too - Seems I recall seeing it being referenced in passing in something I was reading for another project.

Yikes! You just went way above MY “Python pay grade”. Gonna hafta hit the books - err… docs - again, I’m thinkin’. Aint got a CLUE what that block of code does until I play with it and do a bit of reading. Ain’t got a clue what an “ax” is, unless you mean for chopping wood :slight_smile: Lemme do some digging around in the docs and maybe I’ll have some idea what’s going on.

<Wanders away muttering “MORE homework! Almost makes me wonder how I got the idea this was a good project to take on!” Shut up, my precious, you’ve always been a masochist!>

1 Like

ax is matplotlib.axes.Axes, which is the primary object you use for plotting with that library. ax.scatter is a method for plotting a scatter plot.

The rest is just familiarity with numpy: np.linspace creates evenly spaced points (“linear”) between the start and end. numpy arrays allow broadcasting, so big_radius can be multiplied across the whole array to get x, and similarly for y.

I actually made a small mistake there, it would better to use np.linspace(... endpoint=False) to avoid having a doubled point on 0 == 2*np.pi.

I’m (painfully…) familiar with what linspace() does. When I started this little shindy, that was a mind-melter for me, but I’ve pretty well got the hang of it now - I think. It’s these “ax” and “scatter” and “subplot” and whatnot that have me sitting here looking about as intelligent as Elmer Fudd (complete with tweeting birdies, stars, and planets circling around my head as a giant lump grows until it bursts through the top of my hat like the xenomorph coming out of Kane’s chest in Alien) after Bugs Bunny or Daffy Duck has brained him with the giant mallet for the umpty-sixth time this cartoon.

The biggest problem I’m hitting currently seems to be the fact that I’m spending more time and effort on trying to find (which appears to be the hardest part!) and then learn how to use (very nearly as difficult!) graphics libraries that come with a learning curve like climbing the Matterhorn than I am on WORKING ON THE PROJECT I’M TRYING TO DO!

Earlier you seemed to be saying that you’re not really interested in the pictures, just in the calculated points? If so, I don’t quite understand why you bother with any of these libraries (which I admit have a rather steep entry-threshold).