This simple program creates diagrams of p-adic integers. All configuration is done in the source file src/Main.hs
. Program is conceived as most hackable as possible.
Bulid with cabal by running cabal build
(or cabal new-build
) inside repo.
Run p-adic-diagrams -o OUTPUT -w WIDTH P DEPTH
, where P
and DEPTH
are positive integers, WIDTH
is desired width of the output image and OUTPUT
is name of output file. All parametars are mandatory.
Following comand generate 1000x1000 diagram of Z5 with 4 levels.
p-adic-diagrams -o Z5.png -w 1000 5 4
See comment on line 11 in Main.hs
.
First image is the original output of this script. Second one has a slight gap between circles (this is obtained by adding # scale 0.9
to appropriate place in the pAdic
functiion). Third image is obtained by changing a few lines of code. It is easy to make adjusments like this by simple modification of code.
Author of program is Nikola Ubavić.
See the LICENSE file for details.