This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readME.txt
111 lines (74 loc) · 3.5 KB
/
readME.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Pix2Circ - Tutorial for dummies
It will create an approximation of a picture/file by a set of superimposed or imposed circles.
There are multiple algorithms implemented and some benchmark tools.
**Steps to run our code:**
Change directory to our pix2circ directory and build it by using *make*:
```
cd pix2circ/
make
```
We have 3 working algorithms you can choose from. We have assigned numbers to chose which algorithm you want to use.
We have prepared two binary images, the batman logo and the kfc logo, converted them into 0's and 1's and exported them
to a .txt file. Namely batman.txt and kfc.txt, the batman logo is a bit small, the results are shown better with the
kfc image.
Bogo place :1
Directed random place :2
Bogo feedback :3
The different algorithms work in different ways, for Bogo place and the *placeholder* name algorithms,
you have to assign how many circles you want to run with. For the modified bogo place,
you assign the accuracy that you want it to run with, with a number between 1-99, the higher the number,
the better accuracy you will get. After you have run the program, it will generate a .png image in the pix2circ folder.
**Example for running Bogo place:**
```
./pix2circ kfc.txt 1 500
```
This will run the *bogo place* algorithm, on the kfc image, with 500 circles.
**Example for running Directed random place:**
```
./pix2circ batman.txt 2 1000
```
This will run the *directed random place* algorithm, on the batman logo, with 1000 circles.
**Example for running Bogo feedback:**
```
./pix2circ kfc.txt 3 99
```
This will run the *bogo feedback* algorithm, on the kfc image, with 99% accuracy.
**Documentation and dependencies**
The work is documented using Sphinx, it is required that Sphinx is set up to view the documentation. This was taught to us in a previous INF course,
namely INF200 as a valid way of providing documentation.
**Setting up Sphinx**
for Linux users, you can install it by writing the following command in the terminal:
```
apt-get install python3-sphinx
```
For more information regarding sphinx or if you use other distributions, please read the installation guide underneath:
https://www.sphinx-doc.org/en/master/usage/installation.html
**Setting up Read the docs theme**
The built-in themes didn't do it for us, so we need to install "Read the docs" sphinx theme. this can be done by typing in 1 out of these 2 options in the terminal:
```
pip install sphinx_rtd_theme
```
OR
```
pip3 install sphinx sphinx_rtd_theme
```
For more information regarding this theme, or using other distributions:
https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html
IF by any chance you as the viewer do not wish to install this theme, and not view it in its best form, you
have to open the conf.py file, and change line number 39 from:
```
html_theme = 'sphinx_rtd_theme'
```
TO
```
html_theme = 'sphinxdoc'
When these steps are done, change directory to the *docs* directory and build the documentation,
followed by changing directory to *html* via the *_build* directory and open the index.html file.
```
cd docs/
make html
cd _build/html
```
As an alternative we have added a PDF file aswell that can be viewed, however, we must add this does not reflect the
documentation in its best form as it is an autogenerated file by the help of make latexpdf. This should be considered
a last resort alternative as for viewing goes.