Article 6F3TD Circular coordinate art

Circular coordinate art

by
John
from John D. Cook on (#6F3TD)

About three years ago I ran across a strange coordinate system in which familiar functions lead to interesting plots. The system is called circular coordinates" but it is not polar coordinates.

This morning I was playing around with this again.

Here's a plot of f(x) = x.

circular_coordinates_x.png

And here's a plot of f(x) = cos(8x).

circular_coordinates_cosx2.png

See this post for details of circular coordinates.

Here is Python code to make the plots. You can experiment with your own plots by changing the definition of f.

# See Mathematics Magazine, v 52 no 3, p175from numpy import cosfrom numpy import linspaceimport matplotlib.pyplot as pltplt.style.use('seaborn-v0_8-muted')def g(u, c, f): t = f(u) + c return 2*u*t**2 / (u**2 + t**2)def h(u, c, f): t = f(u) + c return 2*u*u*t / (u**2 + t**2)t = linspace(-7, 7, 10000)fig, ax = plt.subplots()f = lambda x: cos(8*x) for c in range(-10, 11): ax.plot(g(t, c, f), h(t, c, f)) plt.axis("off")plt.show()
The post Circular coordinate art first appeared on John D. Cook.
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