What are Fibonacci networks?
In 1202, an Italian mathematician known as Fibonacci posed the following problem:
"A male and a female rabbit are born at the beginning of the year. We assume the following conditions:
1.After reaching the age of two months, each pair produces a mixed pair, (one male, one female), and then another mixed pair each month thereafter.
2.No deaths occur during the year."
How many rabbits will there be at the end of the year?
Your challenge is to write a program/function to draw an ASCII art to output or a text file, or a graphical picture to a file/screen of a graph with following settings:
- At 0th tick, there is one newly-born node.
- Every newly born node creates a normal node after one tick after being born and gets deactivated.
- A normal node creates a normal node and a newly-born node one tick after its birth and gets deactivated.
Your program will get the non-negative value
n as input, and will draw the graph at the
nth tick. Note that your program can draw newly-born nodes and normal nodes differently, but this is not necessary.
- You must not use any built-in Fibonacci sequence function or mathematical constants or similar.
- If your program outputs to a file, it must be either a text file in a suitable and viewable format and encoding, or an image file in a suitable and viewable format with recognizable colors (for example, an image format that can be uploaded to SE).
- Your program can draw graph in any size, any shape and any alignment but the nodes and connections must be recognizable. Tree-shaped graphs (like the graph in "What are Fibonacci networks?" section) are recommended, but not necessary.
- Common code golf rules apply to this challenge.
Input: 2 Possible Output: * | * | \ * * Input: 0 Possible Output: *
This is a codegolf. Shortest code wins. Good luck!