Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

irrational-digits-visualizer

Delphi app that visualizes decimal digits of irrational numbers (e.g. π) as a 2D walk. Compare with random digits to look for visual patterns. Draft.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Irrational Digits Visualizer (Draft)

Note: This is a draft project. The code and documentation are work in progress.

A small Delphi (Object Pascal) desktop app that visualizes the decimal digits of irrational numbers (e.g. π, e) as a 2D walk. The goal was to see whether any visual patterns emerge and how such visualizations differ from purely random digit sequences.

Idea

  • Irrational numbers have non-repeating, infinite decimal expansions. Their digits are deterministic but often considered “random-looking.”
  • Visualization: Each digit 0–9 is mapped to one of 10 directions on a circle. The program steps through the digits in order and draws a black pixel at each new position, producing a path on a 2D canvas.
  • Comparison: The same process can be run on digits of an irrational number (e.g. π) versus on random digits. The hypothesis is that visualizations of irrational digits may show different structure or patterns than those from random digits.

Requirements

  • Delphi (tested with Embarcadero RAD Studio; uses VCL, TImage, TMemo, TTimer).

How to use

  1. Paste the decimal digits of an irrational number (e.g. π) into the Memo, one or more lines, digits only (no spaces or decimal point).
  2. Click the button that loads digits from the Memo into the internal array (Button3 in code).
  3. Initialize the image/canvas (Button1).
  4. Step through or run the timer so that each digit drives the next direction and a pixel is drawn (Button4 / Timer).
  5. Save the image (Button2) — e.g. to new.bmp.

Sample outputs

Generated images are in the output folder. Below they are shown at 30% size.

π digits Random / other 1 Random / other 2

Project layout

  • Project1.dpr — main program.
  • Unit1.pas — main form and logic: digit parsing, direction mapping, drawing.
  • Unit1.dfm — form layout.
  • output/ — sample bitmaps (e.g. π, random or other runs).

License

This project is free and open source; use and modify as you wish.