Article 5PK2R Carbon nanotube-like plots

Carbon nanotube-like plots

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

A few days ago I wrote a brief post showing an interesting pattern that comes from plotting sin(1), sin(2), sin(3), etc.

int_sin.png

That post uses a logarithmic scale on the horizontal axis. You get a different, but also interesting, pattern when you use a linear scale.

int_sin_linear2.png

Someone commented that this looks like a projection of a carbon nanotube, and I think they're right.

Let's generalize this by plotting sin(kn) for integer n. The plot above corresponds to k = 1. Tiny changes to k make a big difference in the appearance of the plot.

Here's k = 0.995:

int_sin_0995.png

And here's k = 1.005:

int_sin_1005.png

And here's an animated plot, continuously changing k from 0.99 to 1.01.

int_sin_animated.gif

This animation was created using the following Mathematica code.

 Animate[ListPlot[Table[Sin[k n], {n, 1, 1000}]], {k, 0.99, 1.01}, AnimationRate -> 0.001, TrackedSymbols :> {k}]
The post Carbon nanotube-like plots first appeared on John D. Cook.F_o2wC20BLE
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