Skip to content

Commit 649e431

Browse files
author
sarangbishal
committed
Update Readme
1 parent 7f39b9e commit 649e431

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Recursion visualiser is a python tool that draws recursion tree for recursive function with very less code changes.
33

44
## Example
5+
### 1. Fibonacci
56
Let's draw the recursion tree for fibonacci number.
67
Here is how the simple code looks like
78
```python
@@ -53,3 +54,36 @@ Here are the changes required:
5354
Here is how the recursion tree looks like:
5455
![enter image description here](https://github.com/sarangbishal/Recursion-Visualizer/blob/master/examples/fibonacci.png)
5556

57+
## 2. Make sum
58+
This is taken from one of my answers on quora where I had to manually draw recursion tree. Using Visualiser with very less changes I was able to draw the following tree.
59+
![enter image description here](https://github.com/sarangbishal/Recursion-Visualizer/blob/master/examples/make_sum.png)
60+
61+
62+
## Installation
63+
The only dependency for recursin visualiser is Graphviz which you can download from [here](https://www.graphviz.org/download/)
64+
65+
66+
67+
- Download [graphviz binary](https://www.graphviz.org/download/)
68+
- Add graphviz bin to path manually or by adding the following line on your script. Change the installation directory according to your installation path
69+
70+
```
71+
# Set it to bin folder of graphviz
72+
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
73+
```
74+
- Install all the requirements
75+
76+
```
77+
pip install -r requirements.txt
78+
```
79+
80+
See the examples inside `example` toknow how to use
81+
82+
83+
## TODO:
84+
85+
- [x] Minimal working version
86+
- [ ] Refactor
87+
- [ ] Handle base cases
88+
- [ ] Make more beautful trees
89+

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pydot==1.4.1
2+
pyparsing==2.4.6
3+
six==1.14.0

0 commit comments

Comments
 (0)