kopia lustrzana https://github.com/villares/sketch-a-day
main
rodzic
e77107d63c
commit
f98f11d4a6
|
|
@ -8,6 +8,12 @@ If you enjoy this, be a [patreon](https://patreon.com/arteprog) or make a donati
|
|||
|
||||
---
|
||||
|
||||

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

|
||||
|
||||
259: [code](https://github.com/villares/sketch-a-day/tree/master/s259) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
|
|
|||
Plik binarny nie jest wyświetlany.
|
Po Szerokość: | Wysokość: | Rozmiar: 215 KiB |
|
|
@ -0,0 +1,37 @@
|
|||
# Alexandre B A Villares - https://abav.lugaralgum.com/sketch-a-day
|
||||
SKETCH_NAME = "s260" # 20180914
|
||||
OUTPUT = ".png"
|
||||
|
||||
def setup():
|
||||
size(400, 400)
|
||||
colorMode(HSB)
|
||||
frameRate(30)
|
||||
strokeWeight(2)
|
||||
|
||||
def draw():
|
||||
background(200)
|
||||
#rect(0, 0, width, height)
|
||||
r = 125 # radius
|
||||
x1, y1 = 150, 200
|
||||
x2, y2 = 250, 200
|
||||
for i in range(128):
|
||||
stroke(i * 2, 200, 200)
|
||||
a1 = i * TWO_PI / 128 + HALF_PI
|
||||
sx1 = x1 + sin(a1) * r #* cos(frameCount/50.)
|
||||
sy1 = y1 + cos(a1) * r * sin(frameCount/77.)
|
||||
a2 = i * TWO_PI / 128 + QUARTER_PI
|
||||
sx2 = x2 + cos(a2) * r #* sin(frameCount/141.)
|
||||
sy2 = y2 + sin(a2) * r * cos(frameCount/30.)
|
||||
line(sx1, sy1, sx2, sy2)
|
||||
|
||||
# print text to add to the project's README.md
|
||||
def settings():
|
||||
println(
|
||||
"""
|
||||

|
||||
|
||||
{1}: [code](https://github.com/villares/sketch-a-day/tree/master/{0}) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
|
||||
|
||||
""".format(SKETCH_NAME, SKETCH_NAME[1:], OUTPUT)
|
||||
)
|
||||
|
||||
Ładowanie…
Reference in New Issue