Article 5EAHS Martin’s doileys

Martin’s doileys

by
John
from John D. Cook on (#5EAHS)

An iteration due to artist Barry Martin produces intricate doiley-like patterns by iterating a simple mathematical function. I ran across this via [1].

martin_doiley_iteration2.svg

The images produced are sensitive to small changes in the starting parameters x and y, as well as to the parameters a, b, and c.

Here are three examples:

doiley1.png

doiley2.png

doiley3.png

And here's the Python code that was used to make these plots.

 import matplotlib.pyplot as plt from numpy import sign, empty def make_plot(x, y, a, b, c, filename, N=20000): xs = empty(N) ys = empty(N) for n in range(N): x, y = y - sign(x)*abs(b*x - c)**0.5, a - x xs[n] = x ys[n] = y plt.scatter(xs, ys, c='k', marker='.', s = 1, alpha=0.5) plt.axes().set_aspect(1) plt.axis('off') plt.savefig(filename) plt.close() make_plot(5, 5, 30.5, 2.5, 2.5, "doiley1.png") make_plot(5, 6, 30, 3, 3, "doiley2.png") make_plot(3, 4, 5, 6, 7, "doiley3.png")

[1] Desert Island Theorems: My Magnificent Seven by Tony Crilly. The Mathematical Gazette, Mar., 2001, Vol. 85, No. 502 (Mar., 2001), pp. 2-12

The post Martin's doileys first appeared on John D. Cook.EsVrJIX_lPU
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments