Husam's Site

XY Images

XY images are a kind of mathematical art. I discovered them circa 2020.

Software

This program is part of Misk.

Definition

Let ℕ be the set of all nonnegative integers. For an XY image with width w and height h, in pixels, w, h ∈ ℕ ∖ {0}, let X = {x ∈ ℕ ∣ x < w}, Y = {y ∈ ℕ ∣ y < h}, and P = {x ⋅ y ∣ x ∈ X, y ∈ Y}. Number the pixels 0, 1, … from top to bottom and left to right. A pixel is white if its number is in P, otherwise it is black.

Example

For the XY image with width w = 3 and height h = 2, the sets defined above become:

The pixels are numbered as follows:

012
345

And colored as follows:

WhiteWhiteWhite
BlackBlackBlack

Pixel 0 is white because 0 is in P. Pixel 3 is black because 3 is not in P.

Observations

Gallery

Here are some images written using xy-png.

Figure 1. The square XY images with side lengths 256 and 251.
Figure 2. The stalactites of Figure 1.
Figure 3. The horizontal projections of Figure 1.
Figure 4. The vertical projections of Figure 1.

To see the relationship between Figure 1 and Figure 2, use a graphics editor to:

  1. Copy and paste (or save and open) an image from Figure 1.
  2. Flood-fill the top row with a color other than black or white.
  3. Select all the white pixels, then color them black.