If you plot many sines with regularly spaced frequencies over top one another, you will see cosines in the white space of the graph. Please see the image here. The graph is also particularly dark near the lowest frequency sine waves, some having frequencies even lower than that which is plotted. At rational $x/2\pi$ values, the $\sin$ functions can overlap at only a few values. This concentration of $\sin$ functions produces white space at these $x$ values but I have not figured out how to turn this into a useful explanation.

Below is matlab code that can produce such a plot:

dpi = 150;            % Resolution
sz = 5.*[0 0 2880 1800]; % Image size in pixels
  'PaperPosition', sz/dpi,...
hold on
for it=1:50

I find the pattern clearer in matlab, but here is a python version too:

import matplotlib.pyplot as plt
import numpy as np

freqs = np.arange(1,50)
x = np.arange(0,2*np.pi,0.01)
for f in freqs:

At first, I thought this had to do with the fact that sines and cosines are orthogonal functions. This idea is appealing because it seems right that they should occupy different parts of a graph in a regular way. This idea is difficult to test with Bessel functions and polynomial series because they do not 'fill' a similar space on the graph the way that sines and cosines do. However when you plot sines and cosines of even frequency, you do not see the sines and cosines of odd frequency. You again see cosines in the white space. Even more strange, you still see cosines in the white space when you just plot cosines!

Has anyone seen something like this before? Is this a Moire pattern in disguise? Why does this happen?

  • $\begingroup$ I tried the link and it took way too long to load. Please re-do it so it loads quickly and it is simpler to see what you are referring to, maybe by plotting fewer sines and indicating in another color what you mean by the apparent cosine curves. $\endgroup$
    – coffeemath
    Commented Jan 18, 2023 at 4:57
  • $\begingroup$ If you want to write the sine function in math mode, use \sin, since with just sin it's formatted as $s$ times $i$ times $n$. $\endgroup$ Commented Jan 18, 2023 at 5:29
  • $\begingroup$ tl;dr. sounds like you are looking at a Fourier transform . few hundret years old. $\endgroup$
    – Kurt G.
    Commented Jan 18, 2023 at 5:51
  • $\begingroup$ I'm having a hard time producing a smaller plot without compromising the visual. I supplemented it with a description. I am not looking at a Fourier transform, I explain why I think the orthogonal function explanation is lacking in the post. $\endgroup$
    – Gage
    Commented Jan 18, 2023 at 6:02
  • $\begingroup$ You see those cosines as a white space because these are the regions where fewer sines intersect. Obvious so far. Now comes the harder part. Someone needs to do the math. $\endgroup$
    – Kurt G.
    Commented Jan 18, 2023 at 6:59


You must log in to answer this question.