Mihaela wrote:
I thought the l-system syntax was unique, but I found different formulation for scaling on another website, does it matter which one is adopted in Inkscape?
It probably doesn't matter. Perhaps we should try to find out which syntax is more popular (and thus which has more examples on the web). Or if possible we could implement both. Can you summarize the different syntaxes you've found?
Can you explain how you pull the formula through generations (order)? Where do I look; iterate or recurse?
iterate() is the entrance point (called from effect()). recurse continues to call itself incrementing the order up from zero until the desired generation has been reached. recurse forms the pattern by replacing the rules in the string over and over. I'm sure this is a source of major inefficiency, so if someone has an idea for making it faster let me know.
I played with the script a bit and I was able to make every drawn step resize by an amount (every ABC...), but that isn't what I want. I want fractals, they apply the resize only after the whole object had gone through a substitution.
I was also able to make the resize apply after one run through the formula, but this way "resize generations" still alternate too fast, before the order is applied to the whole object.
What should I look into considering python for pulling out the number behind @ from the rules (I'm a total python newbie)?
I think we need to switch from iterated loop over the pattern string to a counted loop. Then when we see @ we know to advance until we've used all the possible numeric characters. This could even be done with a regular expression.
Aaron