kopia lustrzana https://github.com/villares/sketch-a-day
2020_10_15 #つぶやきProcessing #LSystem
#つぶやきProcessing
t=translate
s="A";d={"A":"B-A-B","B":"+ABA+"}
for i in range(6):
b=""
for c in s:b+=d.get(c,c)
s=b
def setup():size(500,500)
def draw():
t(250,250);background(-1);a=mouseX/79.
for c in s:(c in"AB"and(line(0,0,9,0),t(9,0)))or rotate(a if c=="+"else-a)
main
rodzic
282df7bdd2
commit
224aa0bfab
Plik binarny nie jest wyświetlany.
|
Po Szerokość: | Wysokość: | Rozmiar: 569 KiB |
|
|
@ -0,0 +1,23 @@
|
|||
# Inspired by https://twitter.com/ryotakob/status/1319998482283806720?s=20
|
||||
#つぶやきProcessing
|
||||
t=translate
|
||||
s="A";d={"A":"B-A-B","B":"+ABA+"}
|
||||
for i in range(6):
|
||||
b=""
|
||||
for c in s:b+=d.get(c,c)
|
||||
s=b
|
||||
def setup():size(500,500)
|
||||
def draw():
|
||||
t(250,250);background(-1);a=mouseX/79.
|
||||
for c in s:(c in"AB"and(line(0,0,9,0),t(9,0)))or rotate(a if c=="+"else-a)
|
||||
|
||||
# #つぶやきProcessing
|
||||
# r=rotate
|
||||
# t=translate
|
||||
# s="A";d={"A":"B-A-B","B":"C++B++C","C":"AFFCFFA"}
|
||||
# for i in range(6):
|
||||
# b=""
|
||||
# for c in s:b+=d[c]if c in d else c
|
||||
# s=b
|
||||
# def setup():size(600,600);frameRate(9)
|
||||
# def draw():t(300,300);background(-1);a=frameCount/20.;[line(0,0,4,0)or t(4,0)for c in s if not(c=="+" and not r(a))and not(c=="-" and not r(-a))]
|
||||
|
|
@ -26,6 +26,12 @@ Here are listed some of the tools I have been using:
|
|||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2020_10_25a](https://github.com/villares/sketch-a-day/tree/master/2020/sketch_2020_10_25a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
[sketch_2020_10_24a](https://github.com/villares/sketch-a-day/tree/master/2020/sketch_2020_10_24a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue