Refactored the package spiro_plotlib to include the tight gradient function developed in the related post (Spirograph IX B: Refactor Cycling Line Widths). Reworked the test module for this post to use the package functions instead of that test function I had originally added to the module.

Also added a slightly darker plot background for some of the colour maps (for better or worse). Which required re-ordering some of the code and adding the necessary code to tell matplotlib what was needed.

So, am providing the code for both refactored modules.

But first thought you might like to see a few sample images.

old style attempt at simulating cycling line with using lines orthogonal to the curve new style attempt at simulating cycling line with using lines orthogonal to the curve old style attempt at simulating cycling line with using lines orthogonal to the curve new style attempt at simulating cycling line with using lines orthogonal to the curve old style attempt at simulating cycling line with using lines orthogonal to the curve new style attempt at simulating cycling line with using lines orthogonal to the curve

Code?

After having posted a number of listings of my code, I have decided not to provide complete listings of my modules.

I reckon if you are interested in learning to code, you really should be using my posts to generate your own code and modules. Not just copying mine.

If you are only interested in copying my code to generate images, that is not why I wrote these posts.

So, sorry, but I am, as of 2022.07.22, going to remove the code listings from all the code listing posts.