01/05, 02/05 & readme

main
Alexandre B A Villares 2021-05-02 18:50:26 -03:00
rodzic 00f642a491
commit 9b72919fb4
4 zmienionych plików z 62 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 2.8 MiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 907 KiB

Wyświetl plik

@ -0,0 +1,44 @@
zen = u"""The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one—and preferably only one—obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea—let's do more of those!
"""
pos = 0
def setup():
global zen_lines
size(900, 600, P3D)
textFont(createFont("Inconsolata Bold", 21))
zen_lines = ["\n"] * 22 + zen.split('\n')
def draw():
translate(0, 200, -60)
rotateX(QUARTER_PI / 2,)
translate(0, -250)
background(0, 0, 100)
x, y, lh = 75, 27, 27
shown_lines = zen_lines[pos:(pos+22)]
for a_line in shown_lines:
text(a_line, x, y)
y += lh
def mouseWheel(e):
global pos
pos += e.count

Wyświetl plik

@ -25,6 +25,24 @@ Here are listed some of the tools I have been using:
---
![sketch_2021_05_02a_zen_scroll](2021/sketch_2021_05_02a_zen_scroll/sketch_2021_05_02a_zen_scroll.gif)
[sketch_2021_05_02a_zen_scroll](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_05_02a_zen_scroll) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_05_01](2021/sketch_2021_05_01/sketch_2021_05_01.gif)
[sketch_2021_05_01](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_05_01) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_04_30a_exemplo_recursividade](2021/sketch_2021_04_30a_exemplo_recursividade/sketch_2021_04_30a_exemplo_recursividade.png)
[sketch_2021_04_30a_exemplo_recursividade](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_04_30a_exemplo_recursividade) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2021_04_29f](2021/sketch_2021_04_29f/sketch_2021_04_29f.png)
[sketch_2021_04_29f](https://github.com/villares/sketch-a-day/tree/master/2021/sketch_2021_04_29f) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]