Exemplo n.º 1
0
from fractal import Pen

p = Pen([400, 470])

p.setAngle(90)

p.setPoint([170, 470])

p.doD0L(omega="f",
        P={
            "f": "h+[[f]-f]-h[-hf]+f",
            "h": "hh"
        },
        delta=22.5,
        times=6,
        length=400,
        rate=2.3)

p.wait()
Exemplo n.º 2
0
# 窗花
from fractal import Pen

p = Pen([500, 500], title="Window")
p.setPoint([495, 495])
p.setAngle(90)
p.doD0L(omega="f+f+f+f",
        P={"f": "ff+f--f+f"},
        delta=90,
        times=5,
        length=490,
        rate=3)
p.wait()
Exemplo n.º 3
0
# 科赫雪花
from fractal import Pen

p = Pen([500,500],title = "Koch Snow")

p.setPoint([30,130])

p.doD0L(omega = "f--f--f", P = {"f": "f+f--f+f"}, delta = 60, times = 5, length = 400, rate = 3)

p.wait()
Exemplo n.º 4
0
# Tree
from fractal import Pen

p = Pen([400, 510])

p.setPoint([250, 510])

p.setAngle(90)

p.doD0L(omega="f",
        P={"f": "ff+[+f-f-f]-[-f+f+f]"},
        delta=22.5,
        times=4,
        length=400,
        rate=2.6)

p.wait()
Exemplo n.º 5
0
from fractal import Pen

p = Pen([400, 450])

p.setAngle(90)

p.setPoint([200, 450])

p.doD0L(omega="f",
        P={
            "f": "h[-f]h[+f]-f",
            "h": "hh"
        },
        delta=22.5,
        times=7,
        length=400,
        rate=2.17)

p.wait()
Exemplo n.º 6
0
from fractal import Pen

p = Pen([500,500])

p.setPoint([10, 490])

p.doD0L(omega = "R", P = {"L":"R+L+R", "R": "L-R-L"}, delta = 60, times = 8, length = 450, rate = 2)

p.wait()
Exemplo n.º 7
0
# 皮亚洛曲线
from fractal import Pen
p = Pen([500, 500])
p.setPoint([85, 85])
p.setWidth(1)
p.doD0L(omega="R",
        P={
            "L": "L-R--R+L++LL+R-",
            "R": "+L-RR--R-L++L+R"
        },
        delta=60,
        times=4,
        length=139,
        rate=2)
p.wait()
Exemplo n.º 8
0
# 谢尔宾斯基方毯

from fractal import Pen

p = Pen([500, 500], title="Sierpinski")
p.setPoint([50, 240])
p.doD0L(omega="f",
        P={
            "h": "hhh",
            "f": "f-f+f+f+h-f-f-f+f"
        },
        delta=90,
        times=4,
        length=400,
        rate=3)
p.wait()
Exemplo n.º 9
0
# 二次Koch岛
from fractal import Pen

p = Pen([500, 500], title="Koch island")
p.setPoint([100, 100])
p.doD0L(omega="f-f-f-f",
        P={"f": "f+f-f-ff+f+f-f"},
        delta=90,
        times=4,
        length=300,
        rate=4)
p.wait()
Exemplo n.º 10
0
# 谢尔宾斯基三角

from fractal import Pen

p = Pen([500, 460], title="Sierpinski")
p.setPoint([5, 5])
p.doD0L(omega="f--f--f", P={"g": "gg", "f": "f--f--f--gg"},
        delta=60, times=5, length=490, rate=2)
p.wait()
Exemplo n.º 11
0
# 龙曲线
from fractal import Pen
from math import sqrt

p = Pen([350, 270])
p.setPoint([140, 60])
p.setWidth(1)
p.doD0L(omega="L",
        P={
            "L": "L+R",
            "R": "L-R"
        },
        delta=90,
        times=15,
        length=200,
        rate=sqrt(2))
p.wait()
Exemplo n.º 12
0
# 树形
from fractal import Pen

p = Pen([260, 500])

p.setPoint([130, 500])

p.setAngle(90)

p.doD0L(omega="f",
        P={"f": "f[-f]f[+f]f"},
        delta=30,
        times=5,
        length=480,
        rate=3)

p.wait()
Exemplo n.º 13
0
# FASS曲线
from fractal import Pen

p = Pen([420, 420])

p.setPoint([10, 10])

p.doD0L(omega="L",
        P={
            "L": "LFRFL-FF-RFLFR+FF+LFRFL",
            "R": "RFLFR+FF+LFRFL-FF-RFLFR"
        },
        delta=90,
        times=4,
        length=200,
        rate=3)

p.wait()
Exemplo n.º 14
0
# FASS曲线
from fractal import Pen

p = Pen([420, 420])

p.setPoint([10, 400])

p.doD0L(omega="L",
        P={
            "L": "LF+RFR+FL-F-LFLFL-FRFR+",
            "R": "-LFLF+RFRFR+F+RF-LFL-FR"
        },
        delta=90,
        times=4,
        length=200,
        rate=3)

p.wait()