diff --git a/README.md b/README.md index 48f2e05d..0d68b405 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,16 @@ Hi! I'm [Alexandre Villares](https://abav.lugaralgum.com), let's see if I can ma If you enjoy this, make a small donation [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HCGAKACDMVNV2) or with [Patreon](https://patreon.com/arteprog) +![038](sketch_180208d/sketch_180208d.png) + +038: [sketch_180208d](https://github.com/villares/sketch-a-day/tree/master/sketch_180206d) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] +"Carnahacking is near!" + ---- ![037](sketch_180206a/sketch_180206a.gif) -037: [sketch_180204b](https://github.com/villares/sketch-a-day/tree/master/sketch_180206a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] +037: [sketch_180206b](https://github.com/villares/sketch-a-day/tree/master/sketch_180206a) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)] "Carnahacking is near!" ---- diff --git a/sketch_180208d/sketch.properties b/sketch_180208d/sketch.properties new file mode 100644 index 00000000..2456b0ab --- /dev/null +++ b/sketch_180208d/sketch.properties @@ -0,0 +1,2 @@ +mode=Python +mode.id=jycessing.mode.PythonMode diff --git a/sketch_180208d/sketch_180208d.png b/sketch_180208d/sketch_180208d.png new file mode 100644 index 00000000..ffa92e3e Binary files /dev/null and b/sketch_180208d/sketch_180208d.png differ diff --git a/sketch_180208d/sketch_180208d.pyde b/sketch_180208d/sketch_180208d.pyde new file mode 100644 index 00000000..33abc379 --- /dev/null +++ b/sketch_180208d/sketch_180208d.pyde @@ -0,0 +1,40 @@ +""" + +""" + +maxFrameCount = 200.0 # needs to be a float +a = 106 +SIZE = 60 + +def setup(): + size(540, 540, P2D) + stroke(255, 200, 0) + frameRate(10) + +def draw(): + global theta + background(0) + #fill(0, 100) + #rect(0, 0, width, height) + with pushMatrix(): + translate(width / 2, height / 2) + t = frameCount / maxFrameCount + theta = TWO_PI * t + for x in range(-250, 251, 50): + for y in range(-250, 251, 50): + offSet = (x + y) * a + sz2 = map(sin(-theta + offSet), -1, 1, 0, 35) + strokeWeight(2) + if (x + y) % 100 == 0: + fill(0, 200, 100, 100) + circ(x, y, 10, sz2) + else: + fill(0, 128, 255, 100) + circ(x, y, 10, sz2) + +def circ(x, y, rot1, rot2): + with pushMatrix(): + translate(x, y) + rotate(rot2) # + float(frameCount / 7)) + s = sin(rot2 + theta) # + float(frameCount / 11)) + ellipse(0, 0, SIZE, SIZE * s)