1. Draw initiator shape (triangle, rectangle, or other polygon)
2. Draw generator polyline
3. Set initial fractal to initiator shape
4. For each iteration
For each fractal line
Replace line with generator polyline
Thats it. After some iterations new fractal figure will emerge. Of cource "real" fractal generation agorithm is a bit more complex - there will be generator polyline scaling / rotation / translation operations, but lets not focus on details :-) If you will want my program you can download it and check all details. In my program you can draw generator as well as initiator and see resulting fractal (calculated in 6 iterations). You can download my program from here.
Please use not more than 8 lines for generator or initiator. Otherwise fractal generation process can hang-up because of too many intermediate steps involved.
NOTE: This program is coded in Lua language,- by using free 2D game engine,- so to be able to run my program you need to install above mentioned 2D game engine and after that you can extract Fractals.zip archive and run "Fractals.love" program. If you need to see Lua program code - then just rename "Fractals.love" to some *.zip file, extract it and you can see file "main.lua" - source code. BTW, Lua is great scripting language, which programs on average runs faster than Ruby or Python scripts and Lua core is very lightweight - that is why Lua is very suitable for embedding purposes,- such as scripting language for game engines. Also I want to praise love 2D game engine. It is very good for game/animation prototyping tasks. Also has good learning curve. So if you need rapid prototyping of games - you can use love 2D engine with Lua. Enough rants, lets see some resulting fractals :-). At first some classic ones.
Modified Koch antisnowflake:
Structure composed of Sierpinski triangles:
This remainds to me dragon curve:
And now, more bizarre fractals.
Now my favorite one :-)
Seems there is a lot of space for experimenting with different types of generator/initiator.
Have fun with fractals and Lua !!