## Better images from higher harmonics ?

Maybe you have noticed that a lot of round shapes without details in the recent images of this blog. They resemble bulls-eyes. Here is an example:

It’s a periodic image with square symmetry and no mirror symmetry. Its big grey discs are somewhat annoying. They arise because I used a simple cosine wave for each wave vector in its image mapping functions X(x,y) and Y(x,y). The cosine function cos(x) has a rather broad maximum at x=0. Thus X and Y do not vary much around x=y=0 where the grey discs lie.

To improve the image we want waves that vary more rapidly at the maximum and minimum, something more like a triangle wave with its sharp maxima and minima. Using the Fourier series of the triangle function we can add higher harmonics to the basic cos(x) function. Adding cos(3x)/9 we get already more details:

The circular shapes become more like squares. The deviation from mirror symmetry becomes more obvious.

Going further and replacing cos(x) by cos(x)+cos(3x)/9+cos(5x)/25 we have more structure:

Further convergence is slow. We should not exaggerate, because replacing the cosine by the triangle function gives a patched image:

Seems between patches appear as discontinuities in the directions of the black and white lines.

To speed up image creation you should use linear interpolation of tables for the sine and cosine functions as discussed in “fast approximations …“. You can improve on this using tables for the above combinations of trigonometric functions.

This entry was posted in Anamorphosis, Kaleidoscopes, programming and tagged , , . Bookmark the permalink.

This site uses Akismet to reduce spam. Learn how your comment data is processed.