https://github.com/quinnjohnsoncode/pi-binary-expansion-finder
Simple GUI Application that finds images in PI.
https://github.com/quinnjohnsoncode/pi-binary-expansion-finder
binary c gtk4 gui pi
Last synced: about 2 months ago
JSON representation
Simple GUI Application that finds images in PI.
- Host: GitHub
- URL: https://github.com/quinnjohnsoncode/pi-binary-expansion-finder
- Owner: QuinnJohnsonCode
- Created: 2024-01-13T03:42:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-16T17:38:32.000Z (over 2 years ago)
- Last Synced: 2025-03-30T23:12:33.531Z (about 1 year ago)
- Topics: binary, c, gtk4, gui, pi
- Language: C
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PI Binary Expansion Finder
## Description
This project was inspired by *Matt Parker ([Stand-up Maths](https://www.youtube.com/@standupmaths) on YouTube)*, in which he searches the binary expansion of PI to find certain images.
The project was written in plain **C**, using basic standard library support.
It uses **GTK4** to create a simple *grid-based layout* that allows users to draw a 4x4 image and displays its position in the binary approximation of PI.
For context, this project was tested with a PI text file that was in **Hexadecimal** and went up to **One Billion Digits**.
## Prerequisites
- C Compiler
- GTK4
- Hexadecimal PI file
## Installation
1. Clone the repository:
`git clone https://github.com/QuinnJohnsonCode/pi-binary-expansion-finder.git`
`cd pi-binary-expansion-finder`
2. Include the PI file:
Once a Hexadecimal PI file has been sourced, name it **pi-billion.txt** and put it in the root directory.
(Or change the name in *binary-find-pi.c*)
3. Compile and run:
`gcc $(pkg-config --cflags gtk4) -o pi-gui.out pi-gui.c binary-find-pi.c $(pkg-config --libs gtk4)`
`./pi-gui.out`
## Usage
To use this GUI, follow these steps:
1. Click the buttons in the center to toggle their state.
2. Create an image by toggling the state of the buttons.
3. When ready, click the button that states "*Find 4x4 Image in PI*".
4. You can then view the Hex/Binary positions shown at the bottom.
## Preview

## Contact
PI Binary Expansion Finder was created by Quinn Johnson.
Reach out to me at my [Email](mailto:Quinn.Johnson99@gmail.com).