r/Python • u/Ro0t-set • Apr 14 '20
I Made This I made a randomized binary tree (python, tkinter)
86
u/brma9262 Apr 14 '20
Why it the tree upside-down?
156
0
13
8
u/_mfStarBoy Apr 15 '20
Why it is called 'randomized' binary tree? PS: I'm new to this field.
9
u/AztecComputer Apr 15 '20
I'm thinking randomized as in the angles aren't even, every time the tree "grows" a new branch its angle is random
2
2
4
3
3
2
2
2
2
2
2
2
2
u/Harith_alsafi Apr 15 '20
I don’t quite understand how is this happening “mathematically”
10
Apr 15 '20
[removed] — view removed comment
1
1
u/phoenixind Apr 15 '20
Loved it! Just wondering how to use this in an actual decision tree code to visualise the problem tree... Any tips?
1
1
u/danielsarj Apr 15 '20
I’m quite new at Python at the moment, but can anyone explain me what would be the usage of a random binary tree generator? thanks.
2
1
1
1
u/Omri_123 Apr 16 '20
How were you able to update the canvas after you applied it to the grid?
Thanks if you answer.
1
1
1
u/itiztv Apr 15 '20
Reminds me of all the fractals and generative crap I did with Python in Rhino3D back in college.
2
Apr 15 '20
[removed] — view removed comment
2
u/Ro0t-set Apr 15 '20
yes, it is generated from right to left, but, every time the tree make a new branch its angle is random
24
u/Leusdat Apr 14 '20
Would u care to share the source? I'd love to take a look