Skip to content

Instantly share code, notes, and snippets.

View villares's full-sized avatar
💥

Alexandre B A Villares villares

💥
View GitHub Profile
@villares
villares / s180202.pyde
Last active February 2, 2018 19:51
Exemplo mínimo de animação com variáveis globais para oficina de Processing modo Python
"""
Exemplo mínimo de animação com variáveis globais
para oficina de Processing modo Python
"""
TAMANHO = 20 # variáveis criadas fora do setup e draw são globais
POS = 0 # posição inicial do círculo
def setup():
size(500, 500)
@villares
villares / s44b.pyde
Created February 14, 2018 00:51
fiddling with sketch 44
"""
sketch 44b 180213 - Alexandre B A Villares
https://abav.lugaralgum.com/sketch-a-day
"""
LIST = []
SRINK = .50
OFFSET = .25
SIZE = 512 # base size
SAVE_FRAME = False
@villares
villares / beesandbombs_boxDance.pyde
Last active February 14, 2018 18:32
Converting beesandbombs' boxDance to Python Mode
"""
Code by beesandbombs
https://gist.github.com/beesandbombs/ca7f7a34b1c47b41724b9ca0f25fb07a
kind of converted to Python Mode by Alexandre B A Villares (villares.github.io)
"""
mn, ia = .5 * sqrt(3), atan(sqrt(.5))
def ease(p, g=None):
if g:

Keybase proof

I hereby claim:

  • I am villares on github.
  • I am villares (https://keybase.io/villares) on keybase.
  • I have a public key ASCqsG5YCO-9G0HLAY2JBkQEyVFm2EC92l1M8HolasPBjAo

To claim this, I am signing this object:

color wrong_orange = color(24, 100, 100);
color get_orange(){
return color(24, 100, 100);
}
void setup(){
colorMode(HSB, 360, 100, 100);
color correct_orange = get_orange();
background(116, 0, 13);
size(200, 200, FX2D);
@villares
villares / grid_3D_gif_export.pyde
Created April 30, 2018 00:54
grid_3D_gif_export
"""
A funny wobbling 3D grid - by Alexandre B A Villares (abav.lugaralgum.com)
1. install Processing (processing.org)
2. install Python Mode (isntructions on py.processing.org)
3. install PeasyCam library under Sketch...>Import Libray...>Add Library...
"""
add_library('peasycam') # Drag the mouse to orbit!
add_library('gifAnimation')
@villares
villares / hello_pygamezero.py
Created September 23, 2018 14:35
I guess I'll try to port some Processing Python Mode stuff to Pygame
import pgzrun
WIDTH = 500
HEIGHT = 500
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
def draw():
background(250)
@villares
villares / noise3d_plus_time.pyde
Created October 6, 2018 00:28
com o Bernardo!
"""
Exemplo de Perlin Noise em três dimensões
"""
perlinScale = 0.02
z = 0
def setup():
size(500, 500) # define o tamanho da tela em pixels. Largura X Altura
noStroke()
@villares
villares / py_lotusrosettes.pyde
Last active July 2, 2023 11:38
Lotus Rosettes for Processing Python Mode
"""
Under Creative Commons License
https:#creativecommons.org/licenses/by-sa/4.0/
Ported for Processing Python Mode py.processing.org <- for Processing IDE
by Alexandre Villares abav.lugaralgum.com, 9-Oct-2018
Based upon code for p5js.org at https://jcponce.github.io/misc/lotusrosettes.html
by Juan Carlos Ponce Campuzano, 9-Oct-2018
Based upon Dan Anderson's code
https:#www.openprocessing.org/sketch/519299
"""
@villares
villares / ice.pde
Created October 19, 2018 14:24
ice_something_something
/// based on https://www.openprocessing.org/sketch/569346?fbclid=IwAR1wNsmuYDfyoA5mVmy10x5tYHUq5wvDNaqqNNkfdcA-Q71ryD7LQp4_q1E
float[][] z1, v1, z2, v2;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void setup() {
size(800, 800);
colorMode(RGB, 2);
background(1, 1, 2);