A rosette is an image with rotational symmetry. For p-fold symmetry we can use the methods of the last post “Anamorphosis and symmetries” with a simple power as a mapping function between output and input images:

Here z=x+iy relates to the position (x,y) of a pixel of the output image. We then have to sample the color of the input image at the position (X,Y) given by Z=X+iY. This gives the color of the pixel. With polar coordinates, where r²=x²+y² and tan(φ)=y/x, we see easily that we have p-fold rotational symmetry. A rotation of (x,y) by 2π/p changes φ to φ+2π/p and gives the same Z. Thus we get the same color for the pixel at the rotated position.

With p=5 I got this result:

The input image is “Bee on lavender blossom” of my photography blog “looking closer“. I used my program “rosette“, which is an interactive web page. You can download its html and JavaScript files to make your own experiments. To get images of different symmetry you simply have to change the code of the last function: mapping(x,y), see later. Here I choose the “nearest” input image pixel interpolation option, which in fact does not smooth pixels. Thus you can see that some pixels are strongly magnified and distorted at the center of the image because of the large power of *r* in the mapping function. At the border you see a frieze of five somehow distorted bees following each other.

We can get more interesting images if we use several combinations of z together with its complex conjugate. As proposed by Farris:

where (m-n) has is a multiple of p for p-fold rotational symmetry. For the power of r we can use any integer number resulting in a more detailed center of the rosette. I find it convenient to rearrange these terms and to use real coordinates. Thus

and

which is convenient for computation and discussing symmetries. Programming becomes easy, see the end of the rosette.js file. The function mapping(x,y) has first a call to the function imageZero(x,y) for initialization. Then we make calls to the function imageAdd(a,b,c,d,rPower,phiPower), adding terms of the above equations with rPower=k and phiPower=l*p.

We can get more varied images with more detail, such as this one:

Again, I did not use smoothing of pixels.

One last thing: Fight for reason and support the March for Science.