Pi Wire

Visualising Pi with @aap03102

About Pi Wire: Back in 2013(!) my friend Chris asked me to help with visualising pi. We had a separate site (piwire.co.uk), but it hadn't been maintained, and so we've put the content here.

Quick Download Link: You can download the Pi Wire software as a zip file. Extract all the contents before trying to run the application. I've recently repackaged and tested on Windows 11, but the code is still from 2013.

From the 2013 site:

Using our Pi-Wire program, we can visualise π in a stunningly beautiful way*. It pairs up each of the digits in this awesome constant (3.14159265358979…) with its position. Since 3 is the starting point, 1 is the first decimal place, 4 is second decimal place, 1 is the third decimal place etc we form links from 3:0 to 1:1 to 4:2 to 1:3 and the pattern that develops is jaw-droppingly pretty. The idea for this was originally floated by Cristian Ilies Vasile but the neat thing about our program is that you get to watch the dynamic creation of these images. So download the program (it’s free), play around with it and create your own movie about π. Enjoy. Lap it up. Savour.

*Note, you can also use the package to explore e and φ but Chris has an obsession for π so that’s what we’ve chosen to highlight here!

Screenshots

How To Use Pi Wire

Pi-Wire can visualise pi (or another constant) to a variable number of decimal places. Higher numbers take longer to draw. To adjust, use the slider control marked [1] on the screenshot (right). For fine control, you can also enter a number manually in the textbox next to the slider (then press ENTER to update the slider). To begin visualising immediately, use the green “play” button (marked [2] on the screenshot).

Zoom (and therefore, circle size) can be adjusted with a slider. Higher zoom levels will allow you to see how individual lines overlap and intersect, but they can reduce performance slightly where there are lots of digits to render. Vertical and horizontal scroll bars appear automatically if the whole circle is too big to fit on screen at once.

The speed slider (in the screenshot below) controls rendering speed. To watch individual lines being drawn, in detail, you may want to slow down the process. For large numbers of digits, you may want to run the process at a higher speed, to reduce the time it takes to finish. Pi-Wire has standardised play, pause and reset buttons, highlighted in the screenshot. You can pause Pi-Wire at any point during a visualisation. However, to adjust the parameters on the left panel, you must press “reset” to start the visualisation again. A progress bar will show you when the drawing is finished.

Line thickness and/or opacity can be adjusted from the left-side panel. Thicker lines are easy to see for small numbers of digits, but can obscure each other with high numbers. The “circle radius” slider adjusts the “pinch” effect at the centre of the visualisation. As explained elsewhere [link coming soon], Pi-Wire draws each line as a bezier curve with three points. The circle radius control moves the centre-point (the control point of the curve) outwards from the centre of the circle, at an angle half-way between the two end-points, thus “softening” the shape of the curve.

Use the left-hand panel to show, hide or recolour individual segments. The checkboxes allow you to switch segments on or off. The coloured buttons let you choose a colour for each segment. Colours can be chosen from a palette, or custom colours used (and saved).


In pause mode, or when rendering is complete, click the “save current image” button to save a copy of your visualisation. You will be shown a standard “save as” dialog box. The size of the image will reflect Pi-Wire’s zoom level. The image will be stored as a PNG file.


Saved images are “stamped” with a quick-response (QR) code. The QR code is a link to the Pi-Wire site.