# XOR "Integer Portraits"

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
XOR Integer Portraits.

On 9 November 2008 I built a font called "Vinci Integer Polygon." Though the algorithm for building the "integer polygons" seemed fairly straightforward, I could not use an algorithm to assemble the polygons. Instead, the process proved cumbersome, but thankfully I was the fastest draw in the west, AutoCad-wise. I could generate polygons in cad, then port them to Illustrator where I could stack them in layers, activate layers then copy/paste them into their own document and interact the shapes such that the integer polygons were the result. With vector forms available, I could then bring these into the font application and produce a TrueType font.

Algorithm.

In order to build an XOR portrait of your favorite integer n, we do the following. First, we generate a d-vertex regular polygon for each divisor d of n. Suppose d = 5. Then we would draw a 5-vertex regular polygon, meaning a regular pentagon. In order to keep apples to apples, all the polygons would have a common origin, and the radii of all the polygons would be constant at 1/2. There are technicalities. Since 1 divides all numbers we could say that we ignore it. At any rate, the "polygon" with 1 vertex has no meaning; it would be a point, but for our purposes we could draw a circle of radius 1/2. We also have a problem with d = 2. A "polygon" defined by two points is called a "digon" and is just a line. For our purposes to render 2 visible, we use the line between two diametrically opposed points, but the return closure arcs round to make a semicircle. We also should align all the first vertices of the polygons such that they appear at "12 o'clock", meaning we start from the top. We could start from the right as geometry might have us do, but the symmetry of these gems is best apparent by starting from the top.

For each figure in turn, we start with the result from the last operation (or null) and use an XOR transform, meaning what was white is now black, and what was black is now white, for each figure in their turn. The figures must have common centers and that first vertex aligned. The result is the integer portrait!

Recently I was able to write a program to generate these polygons. The funny thing is that it still can't produce vector versions, so the 2008 font contains the sharpest images of these figures.

Let's build an integer polygon for the number n = 12:
This is the lineup of figures. Since the divisors of 12 are {1, 2, 3, 4, 6, 12}, we have a circle, digon, triangle, square, hexagon, and dodecagon.

Now we compose the figures in their turn, here they are step by step, starting with 1, then 2 on 1, then 3 on 2-on-1, then 4 on 3-on-2-on-1, etc.:
Here is an enlargement of the last image:

Here is one for the number ten dozen:

Here is a gallery of the portraits of the smallest 36 integers:
The original idea was going to be published in the Duodecimal Bulletin of that year. The notion was that these symbols might serve as a sort of identifier for each of the integers. There are quite a few problems with that. For one, it is hard to execute these symbols by human hand. Another problem regards electronics. Since the "more composite" numbers have more of a complex appearance, we observe many small polygons at their rims with acute angles. Machine recognition of such symbols is likewise difficult. It does get tough to identify each of these symbols when we have numbers with many of the same small factors. One way to tell which symbol is which is simply to count the outermost sides. Again, with a fairly large number (meaning more than, say, eight!) it might be hard to tell whether we're looking at "11" or "13".

You can see a version of this idea serving as the backdrop for my long-running avatar that dates from 2006. Here is an algorithm-generated version of the same using a sort of summatory XOR on the geometric shapes:

They are beautiful as studies, even if they serve no other purpose.

Obsessive poster
Obsessive poster
Joined: Sep 10 2011, 11:27 PM
They are indeed a beautiful idea. They would certainly work great as "icons" for their numbers. By "icon" I mean the kind of symbol intended for conspicuous display rather than casual prose. Grand presentation style stuff, banners, letterheads, slideware, posters, etc. Might make a great t-shirt too. ☺
As of 1202/03/01[z]=2018/03/01[d] I use:
ten,eleven = ↊↋, ᘔƐ, ӾƐ, XE or AB.
Base-neutral base annotations
Systematic Dozenal Nomenclature
Primel Metrology
Western encoding (not by choice)
Greasemonkey + Mathjax + PrimelDozenator
(Links to these and other useful topics are in my index post;
click on my user name and go to my "Website" link)

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
They are interesting! XOR is not the only way to do this; I've produced another method of showing the same thing. These images use a color function and transparency commensurate to the number of divisors.
I can shift the function to get different appearances:
This will serve as a background for a circular digit diagram (digits yet to be colored):
(the digits here are rendered in argam) These sort of diagrams are useful to a point:

The use of the graph in this case is merely to infer connections between divisors and their multiples, indicating cycles within the span of base b, so we might dispense with the lines (but reimplementing the concept of "digon" as semicircle) and get:

The technique has a broad range and since the smallest factors have the greatest influence, but despite that the technique is additive, we can still graph large numbers (here, 5040):

We can still saturate human ability to make sense of what it is seeing (here 55440):

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
Here are polar graphs of the digits of some bases. They're pretty satisfactory as a diagram. (Here, of course, 0 does not denote actual zero, but 0 mod b for base b, i.e., "0" used as a digit in applications other than being alone). The colors of the integer diagram have no significance; they are more or less esthetic, even though there is an algorithm that determines them. (Second post today; see above for the preliminary studies.)

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
Fraction Diagrams

I have built a jig that diagrams fractions in various bases, indicating the nonrepeating part in red, and the reptend in black. The "pie" is cut into s pieces, the pieces numbered as on a clock, starting from the top. The base b expanded fraction is abbreviated next to the pie piece. (I am working with enlarging the text based on the string length of the reptend).

These diagrams may accompany some descriptions of number bases in the Tour des Bases.
 Halves Thirds Quarters (Fourths) Fifths Sixths Sevenths
 Senary tenths Hexadecimal twelfths Trigesimal Twelfths Sexagesimal fourteenths

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
Fraction Clips

These fraction clips are formatted a lot like Duodecimal Bulletin, No. 9b; page 24;.
 Uncial two-thirds Uncial three-quarters Sexagesimal thirteenth Tetravigesimal seventeenth Tetravigesimal seventeenth (alphanumeric) Tetravigesimal seventeenth (decimal "decker" style numerals)

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
Auxiliary base diagrams

I am working on diagrams that illustrate auxiliary bases in the style of Duodecimal Bulletin, No. X0; page 16;.
Let a be an auxiliary base for base b. The ticks are placed at increments d where d | a, and have length (d − 1)/d and breath 1/max(360, a). The outer ticks default at 15° increments, but can be set as desired (these will be labeled in certain manifestations). The diagram jig is flexible: I can show or not show the dashed inference lines that show 30° / 45° multiples.

The jig can display the radian: here is the radian in a circle divided by gross, expressed uncially. The uncial divisions are ticked in black, while the standard 360° division appears in light gray:

I can select how much of the circle to show. Here is a blank circle divided by gross. The inference lines at 15° increments, with the radian in yellow, can be toggled off. (see the Bulletin article about why the 15° angle is basic and universal).
Points can be marked on this diagram: here is 2/3 expressed in tetradecimal on a circle divided by the tetradecimal auxiliary (decimal 420):

[EDIT: this image is flawed and the bug corrected. The number displayed ought to be "160". The script only converted the unit fraction of 3, failing to multiply it by the numerator 2.]

Many of these graphics in this thread are developed with the Tour des Bases in mind. They could frame well in future dynamic content, such as quizzes with randomized problems in practically any base, as the jigs are completely flexible.

Dozens Demigod
icarus
Dozens Demigod
Joined: Apr 11 2006, 12:29 PM
I have now labeled the major angles (i.e., the 15° divisions inherent from the geometry of squares and equilateral triangles). The numbers are in the auxuiliary base a written in base b. Also corrected a bug that only converted the denominator of a fraction with a numerator greater than 1.

Here is the radian in tetradecimal (base 14) auxiliary "220" (decimal 420):
Here is the radian in pentadecimal (base 15) auxiliary "190" (decimal 360):
Here is one fifth in uncial (duodecimal, base 12) auxiliary "500" (decimal 720):
Here is four fifths written in hexadecimal (base 16) auxiliary "3c0" (decimal 960):

Here is a blank dial showing vigesimal (base 20) auxiliary "1g0" (decimal 720), with major divisions and the radian marked in red and yellow respectively:
I have to write a cogent jig for formatting text of numerals. Then this jig is finished.

A similar script can furnish clocks in various bases using the smaller auxiliaries of that base. This is a more complex undertaking, because we would merely only explore the divisions of a major division (akin to minutes of hours) and the major divisions of a day. I would need guidance or suggestions about that, in order to portray it simply. It might have something to do with marking the simple divisors on one side of the "clock", halves, thirds, quarters, etc. Need to think about it.