View sound_input_minimp.pyde
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 |
View command_test.bot
# 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 |
View filtroPCD_Brasil.pde
// 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; |
View helpers.py
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. | |
""" |
View pvector.py
# 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) I'll try to find and add here | |
import math | |
from numbers import Number | |
class PVector: | |
def __init__(self, x=0, y=0, z=0): | |
self.x = x |
View sketch_2020_12_20a_svg_sketchbook.pyde
""" | |
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') |
View naive_graph.pyde
""" | |
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 |
View filas_imagens.pyde
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)) |
View rotational_spirals.pyde
# 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) | |
View sharpen_and_blur.pyde
# based on https://processing.org/tutorials/pixels/ | |
w = 80 | |
# It's possible to perform a convolution | |
# the image with different matrices | |
sharpen_kernel = [[-1, -1, -1], | |
[-1, 9, -1], | |
[-1, -1, -1]] |
NewerOlder