This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # based on work by Tim Szetela | |
| # https://twitter.com/tszetela/status/1330287937808904194?s=20 | |
| # result: https://twitter.com/villares/status/1330536893121957904?s=20 | |
| def setup(): | |
| size(600, 600) | |
| fill(240, 240, 200) | |
| stroke(150, 50, 50) | |
| strokeWeight(2) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import unicode_literals , division | |
| imagens = [] # lista vazia | |
| w, h = 350, 500 | |
| def setup(): | |
| global colunas, linhas | |
| size(2150, 1000) | |
| colunas, linhas = width // w, height // h | |
| print('Posições na grade: ' + str(colunas * linhas)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| More naive graph drawing | |
| Using Processing Python mode | |
| To run this you'll need: | |
| https://abav.lugaralgum.com/como-instalar-o-processing-modo-python/index-EN.html | |
| """ | |
| nodes = [] | |
| edges = [] | |
| NODE_SIZE = 50 # Diâmetro dos nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| A bare-bones SVG SketchBook - Licensed under GPL v3.0 | |
| Alexandre B A Villares - http://abav.lugaralgum.com | |
| in collaboration with Foad S. Farimani https://twitter.com/fsfarimani | |
| v2020_12_19 exporting SVG now! | |
| v2020_12_20 line mode & circle mode | |
| """ | |
| add_library('svg') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # REFERENCE: https://github.com/processing/p5.js/blob/3f0b2f0fe575dc81c724474154f5b23a517b7233/src/math/p5.Vector.js | |
| # I had a test suit from JDF (Processing.Py's mantainer) here: | |
| # https://gist.github.com/villares/e639a34eef756beba2f79a55203cd51e | |
| import math | |
| from numbers import Number | |
| # TWO_PI = math.pi * 2 # add this if you are not using pyp5js | |
| class PVector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from os import listdir | |
| from os.path import isfile, join | |
| def get_image_names(base, folder, word=None): | |
| """ | |
| Return a list of image names from a directory | |
| named folder at base/folder by default only | |
| if name contains the folder name. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Baseado no código do PCD 2021 Brasil! | |
| // https://github.com/Processing-Brasil/PCD-Brasil-2021-FiltroVideo/blob/main/linhasPCD/linhasPCD.pde | |
| // Obrigado Monica, Guilherme e Carlos. | |
| import processing.video.*; | |
| Capture video; | |
| int vEspaco = 10; | |
| float precisao = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Try shoebot! github.com/shoebot/shoebot/ | |
| size(600,600) | |
| background(1) | |
| ellipsemode(CORNER) | |
| nostroke() | |
| fill(0.95, 0.75, 0) | |
| rect(10, 10, 35, 35) | |
| # see how roundness affects the shape |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_library('sound') # aviso de que vai usar o microfone | |
| x, y = 400, 300 | |
| def setup(): | |
| global loudness | |
| size(800, 600) | |
| # fullScreen() # testar se 1 vai para segundo monitor | |
| background(0) | |
| # Burocracia para receber o som e analisar o volume |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import division # não use na versão online! | |
| escala = 25 | |
| def setup(): | |
| size(800, 800) | |
| background(200, 200, 240) | |
| translate(width / 2, height / 2) | |
| textSize(14) | |
| textAlign(CENTER, CENTER) |