Hey guys,
i have the following question: I want to use StdDraw Library to draw a fractal tree using recursion like this:
fractal_tree.png.png
I think you understand the idea. But I need a hint, how I can grow the child-cubes recursively. My first idea : I calculate the left-top point of each cube and draw a new one. If the side-length lesser than e.g. 1, i return and to the right cube, doing the same. But then I have to recalculate the point to find the next branch - it's possible, but I'm afraid that's not the point of the exercise, because i have to do this 10000 times until the tree is done.
I understand the trigonometric calculations, i'm also able to build two branches recursively.... but how can I develop an algorithm who "knows" where the next branch starts? And knows that the cubes borns exponential??
Would be glad if somebody could give me a hint!
Best regards!