Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eleanor-clifford/pixel-prime
Renders images as a prime number
https://github.com/eleanor-clifford/pixel-prime
Last synced: 5 days ago
JSON representation
Renders images as a prime number
- Host: GitHub
- URL: https://github.com/eleanor-clifford/pixel-prime
- Owner: eleanor-clifford
- License: bsd-2-clause
- Created: 2017-10-10T20:02:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-15T00:37:10.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T23:24:02.006Z (about 2 months ago)
- Language: C#
- Homepage:
- Size: 19.7 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
| :exclamation: | This is a mirror of [https://git.sr.ht/~tim-clifford/pixel-prime](https://git.sr.ht/~tim-clifford/pixel-prime). Please refrain from using GitHub's issue and PR system. |
|----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|# Pixel Prime
Attempts to turn a photo into a prime number that looks a lot like the photo## Getting Started
### Prerequisites
- .NET compiler
- Python 3 Interpreter### Installing
With dotnet
```
dotnet build
```## Running
Put a `.pgm` image in the base directory
#### From a console:
Run `pgmToNumber.py`
```
python3 pgmToNumber.py
```Run the main program
```
dotnet run
```Eventually (you may need to leave it running for a while) you will see `Possible prime found` in stdout. At this point (or after more possible primes are found), terminate the program and run the formatter
```
python3 format.py
```Now there will be possible primes, formatted, in output.txt
Note that these are *possible* primes. While it is very likely that they are prime, more tests are required to know deterministically.
## Examples
See the Primes folder for examples of primes that have been found with this program
## Acknowledgements
Thanks to Jack Hodkinson at the University of Cambridge for the idea- from his blog post about the "Corpus Christi Prime" - https://friendlyfieldsandopenmaps.com/2017/09/08/the-corpus-christi-prime/
## License
This project is licensed under the BSD 2-clause License - see the [LICENSE.md](LICENSE.md) file for details