Post Reply 
Fractals using Lindenmayer System: Hilbert, Dragon, SnowFlake, Sierpinski, Penrose ..
08-27-2014, 07:15 AM
Post: #10
RE: Fractals using Lindenmayer System: Hilbert, Dragon, SnowFlake, Sierpinski, Penrose ..
(08-27-2014 01:52 AM)compsystems Wrote:  Hi, sorry google translator, do you have some code a similar in Q-BASIC?

http://jm00092.freehostia.com/progqb/fractales.htm

To better identify the types of fractals add a numeration to Choose

Code:
LSinit(Nr)
BEGIN // init a new fractal root
  IF Nr == 0 THEN // Choose
    RETURN {"0: Hilbert curve", "1: Hilbert curve II", "2: Moore Curve", "3: Penrose Tiling", "4: Harter-Heighway dragon", "5: Terdragon", "6: Mandelbrot H Tree", "7: Sierpinski curve", "8: Sierpinski arrowhead curve", 
        "9: Sierpinski Sieve", "10: Sierpinski carpet", "11: Peano-Gosper curve", "12: Quadratic Gosper curve", "13: Peano curve", "14: Koch SnowFlake", "15: Quadratic Koch island", "16: Koch curve", "17: Quadratic Koch curve", "18: Koch antisnowflake",
        "19: Minkowski sausage", "20: Cross-stitch curve", "21: Anticross-stitch curve", "22: Penta Plexity", "23: McWorter's Pentigree", "24: Pentadentrite", "25: Kristall", "26: Plant 1", "27: Plant 2"};
  END;
You should start at 1, not 0.
Feel free to offer a numbered list, it is a matter of taste and colors.
Since the CHOOSE is already tracking which fractal was the last one, it is rather easy to try all of them in sequence.

I don't have code in Q-Basic but translation should be easy.

Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fractals using Lindenmayer System: Hilbert, Dragon, SnowFlake, Sierpinski, Penrose .. - patrice - 08-27-2014 07:15 AM



User(s) browsing this thread: 1 Guest(s)