Husam Alhomsi

XY Images

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

Software

This program is part of Misk.

Definition

Let positive integers w and h be the width and height of an XY image, in pixels, respectively. Let X and Y be the sets of nonnegative integers less than w and h, respectively. Let P be the set of products of multiplying every element of X by every element of Y. Number the pixels of the image 0, 1, 2, and so on from top to bottom and left to right. A pixel is black if its number is in P, otherwise it is white.

Example

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

The pixels of the image are numbered as follows:

012
345

And colored as follows:

BlackBlackBlack
WhiteWhiteWhite

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

Observations

Gallery

Here are some images written using xy-png.

Fig. 1: XY image, side length 256
Fig. 2: XY image, side length 251
Stalactites of Fig. 1
Stalactites of Fig. 2
Horizontal projection of Fig. 1
Horizontal projection of Fig. 2
Vertical projection of Fig. 1
Vertical projection of Fig. 2