Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raklaptudirm/itp
Generate beautiful Prime Numbers from Images
https://github.com/raklaptudirm/itp
image-processing prime-generator prime-numbers
Last synced: 20 days ago
JSON representation
Generate beautiful Prime Numbers from Images
- Host: GitHub
- URL: https://github.com/raklaptudirm/itp
- Owner: raklaptudirm
- License: apache-2.0
- Created: 2022-06-18T16:40:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-28T18:10:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T20:20:07.137Z (3 months ago)
- Topics: image-processing, prime-generator, prime-numbers
- Language: Go
- Homepage: https://laptudirm.com/x/itp
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# itp - Beautiful Prime Numbers from Images
itp is a command line tool to generate large prime numbers which look like any arbitrary image.
### Installation and Usage
```
go install laptudirm.com/x/itp@latest
itp [image file]
```### Working
itp finds primes which look similar to an image using the following steps:
- step 1: Convert the image into a number. Brightness chart is "7772299408".
- step 2: If last digit is even or 5 change it, otherwise number can't be a prime.
- step 3: If first digit is 0 change it. No redundant leading zeros allowed
- step 4: Check if number is prime. If it is a prime, print it and exit.
- step 5: If number is not prime, switch one of the digits with a similar one.
- step 6: Goto step 4.### References
- https://github.com/TotalTechGeek/pictoprime
- https://en.wikipedia.org/wiki/Baillie%E2%80%93PSW_primality_test
- https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test