converts this to char, because the final result will be a char matrix. Character 0 is displayed as space, and the non-zerononzero entries will be written with the appropriate letters.
reads the input letter, adds 7 to its ASCII code, and negates the result. For input 'a' whisthis gives −104, which is a multiple of 26, so circularly shifting by this amount will do nothing. If the input is b this gives −105, which shifts the string 1 step to the left to produce 'bcd···yza'; etc.
The next step is to define the order in which the shifted string will be written into the nozero positionsnonzero entries of the matrix. To this end,
subtracts 7 from the latter, brings the former to top, substracts 4 from it, and negates it. The 7 and 4 specify an origin of coordinates, so that the angles of the position vectors of the non-zerononzero entries with respect to that origin define the desired order.
computes the two-argument arctangent modulo 2*pi to produce those angles. Now the smallest angle, which is zero0, corresponds to the entry where the first letter should go, and the rest advance counter-clockwise.
rearranges the letters in the string according to those angles, so that when the letters are written into the non-zerononzero entries of the matrix in column-major order (down, then across) the result will be correct. This is done by
so that 'u' will correctly go to the first (in column-major order) non-zerononzero entry, which is entry (3,1) in matrix notation; 't' will go to (4,1), 's' to (5,1); 'v' to (2,2) etc.:
······ v· ·· u · t · s · ·· ·· ······