john wrote:
Hi: I am new to this. I want to create a skyline pattern of rectangles. I know I need the L System grammar. I am just not sure about the specifics. Below is a crude example of what I am talking about. Any advice on algorithms, names, and driections for solving the problem would be helpful.
start with a line ___________
one iteration ___ ___| |___
two iterations _ _ _| |_ _ _| |_| |_| |_
The first step should be Fractint's built-in documentation. It's better to create a separate formatted ASCII file by running fractint.exe makedoc from the command line prompt (aka DOS window), provided you have changed to the directory where Fractint resides. This creates a file named "fractint.doc", which can be viewed with any decent ASCII text viewer (something like WordPad should do). Now search for the expression "type=lsystem" within the file. This should bring you to a description of the L-system grammar Fractint uses. Concerning your example: If I understand this correctly, you only want the horizontal lines to be replaced by this "right-up-right-down-right" pattern (the vertical lines simply should grow proportionally to the whole). The example below seems to work. :^) Skyline { ; Angle 4 ;Right angle Axiom XF ;Starting string (F draws line, X is just a symbol) F = ;Erases every F from current string Y = YF ;Y is another symbol we need (for vertical lines) X = XF+YF-XF-YF+XF ;X gets replaced by right-up-right-down-right ;(plus the X's and Y's for the next substitution) } BTW, if you want skyscrapers, replace the line "Y = YF" by something like "Y = YYYYF". Regards, Gerald