The problem is that I don't really know how to start writing the code. I need a starting point. I do know how to apply an rewriting production rule to one single parametre, for instance the Koch curve. The problem comes when the number of production rules are more than one, I mean for instance:
(Sierpinski's Gasket)
G = {V, ω, P}
V = {F, X, +, -}
P1 (Production rule 1) = X --> F + X + F
P2 (Production rule 2) = F --> X - F - X
My question is: how do you integrate this into a python turtle script? How do you tell to python to replace the X set of commands, recursively? I tried creating two procedures, one for X and one for F, but I cannot get it right. How can you replace an X by other words such as (F + X + F) in the example? Is there any straight-forward way yo translate this?
I am so sorry guys that I am so lost, it is still quite abstract for me when I think about the recursive programming and the fractal elements...
Thanks in advance!