Recursive fonctions (fractal tree)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Recursive fonctions (fractal tree)

matplotlib - users mailing list
Hi, I have to create a reccursive function with matplotlib in order to make a
fractal tree.
That's my fonction at this moment :

import matplotlib.pyplot as plt
from math import *

def Drawn_(P,L,a,c,e):  
    X = L*cos(a) + P[0]
    Y = L*sin(a) + P[1]
    return M              

def Tree(P,L,k,a,N,c):
    while N>>0:
I had some pictures to show what are the problems.

For the moment it don't work correctly because I can't create the tree with
random angles and I don't know how to solve the problem and create the
correct tree with recursivity..
Can someone help me please ? :)
I have to restart the fonction or can we had, or change somethings to make
it work ?

Sent from:
Matplotlib-users mailing list
[hidden email]