2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018
I'm very pleased with this, today. This sketch built upon some earlier "arrow works", but now with some 3D. I'm sure that having gone for some swimming today improved my creative powers :)
code at https://github.com/villares/sketch-a-day
#numpy ordering glyphs by black pixel count!
#numpy boids work in progress
regras = { 'X': 'F+@[![X]-X!]-@F[-FX]+X', 'F': 'FF', } axioma = 'X' iteracoes = 6 angulo = 25 tamanho = 5 scale_factor = 0.9 #LSytem #CreativeCoding
regras = { 'X': 'F+[![X]-X!]-F[-FX]+X', 'F': 'FGF', } axioma = 'X' iteracoes = 6 angulo = 25
#LSystem
sketch feito na aula de ontem... (acrescentei o py5_tools.animated_gif hoje)
based on https://github.com/roholazandie/boids/tree/master
#flocking #boids
#debugAesthetics #pymunk #trimesh #shapely
#pymunk #shapely
Viva o LHC! #pymunk
#pymunk
#pymunk
pymunk
#pymunk
https://ciberlandia.pt/deck/@villares/111240083837972964
first attempt at showing a GIF animation with py5...
Adding a "diff" mode to my folder-image browser!
#shapely
back to some #shapely & #typography ideas (aiming at a stencil as usual)
# LSystem
axiom = 'X'
rules = {
'X': '[-X][+X][+FX]-FXB',
'F': 'FF',
}
# F -> foward step
# B -> blue circle
#itertools #combinations #combinations_with_replacement #permutations #product
https://github.com/villares/sketch-a-day/blob/main/2023/sketch_2023_10_04/sketch_2023_10_04.py
#JupyterNotebook
#JupyterLab #Jupyter
my folder browser is mostly working...
Slowly prograssing on my file/image browser from scratch...
Small progress on my image browser, trying some folder navigation "from scratch" with py5... I can get some thumbnails from the OS, but others fail:
work in progress
#SãoPaulo
Based on rain code by @claromes!
Tem dias que eu fico bem feliz com o resultado do meu sketch do dia :)
https://github.com/villares/sketch-a-day/blob/main/2023/sketch_2023_09_09/sketch_2023_09_09.py #NumPy
#numpy
github.com/villares/sketch-a-day
#NumPy
#NumPy
#osmnx #GeoDataFrame #OpenStreetMap contributors data
#São Paulo #osmnx data from #OpenStreetMap contributors. Av. Paulista in red.
sketch_2023_08_25 [Python]
#Python #matplotlib explorando dados © contribuidores do #OpenStreetMaps
#trimesh
more #trimesh
more #trimesh experiments
PNG export examples
more trimesh studies!
trimesh studies
Segunda aula do curso com Daniel Bueno no Sesc Av. Paulista!
Refatorei o meu código de tokenize, aprendi um pouco sobre ANSI escape sequences, e agora consigo desenhar um pouco melhor (vai ser útil pros meus zines!
Work in Progress - again trying to draw some source code to the screen
sketch_2023_08_08 [Primeira aula do curso de quadrinhos experimentais com Daniel Bueno!]
sketch_2023_08_07 [Interactive quadratic vertex curve #pyp5js]
quadratic curves on shapely
WIP
Fragments of a São Paulo Map from 1930 kept at Museu Paulista
Draw interrupted stencil-ready lines with py5.
Left-click to add vertex. Right-click to stop polyline. Backspace to remove last vertex. 'e' to erase everything. 's' to save SVG. Mouse wheel to change line thickness.
Back to an earlier idea, but using shapely!
partial sample of the animation
Based on https://botsin.space/@bitartbot/110448213578682186]]
def func(x, y):
try:
return (~(int((x & y) / (x ^ 8)) | ((y * 10) % (~x)))) % 3 > 0
except ZeroDivisionError:
return 0
sketch_2023_05_04 [PySimpleGUI]
More OpenCV
Transparent PNG export accumulating frames
Recreating Ira Greenberg's 2 colour Trouched + MAM Trouchet example
Trouchet WIP
5 colors, random choice of next, but do not repeat last 2.
4 colors, do not repeat last 3... this creates a cycle. Each horiz. band repeats process, so new configuration.
d'aprés Vera Molnár's Des(ordres)
Trying to recreate this work by Vera Molnár: https://collections.vam.ac.uk/item/O1488630/print/
OpenCV edge detection on a video
OpenCV edge detection on a video
Java swing
sketch_2023_03_21 [Processing Java]
Porting a Processing forum example to py5
Porting a Processing forum example to py5
Based on Tom Larrow's code.
Inspired by Vera Molnár's Icône 2020
Learning more numpy...
144 combinations of sizes, nubmer of points and 2 colors.
Another numbered squares idea...
back to shuffling squares?
Tried threads, still too slow. I shoul try Numpy... I asked for Melissa Weber's helpp
A horribly slow Particle Life simulation (adapted from the Noite de Processing one) WIP
# Kate Rose Morley's palette
# https://iamkate.com/data/12-bit-rainbow/
#Processing #Python #py5 imported mode
#genuary #genuary30 #トゥートProcessing
from itertools import product
palette = (
'#817', '#a35', '#c66', '#e94',
'#ed0', '#9d5', '#4d8', '#2cb',
'#0bc', '#09c', '#36b', '#639'
)
def setup():
global palavras
size(800, 800)
no_loop()
rect_mode(CENTER)
no_stroke()
def draw():
w = 400
i = 0
for x, y in product(range(0, width, w), repeat=2):
for z in range(3):
fill(palette[i])
square(w / 2 + x, w / 2 + y, w / (z / 2 + 1))
i += 1
from random import sample
from itertools import product
palette = (
'#817', '#a35', '#c66', '#e94',
'#ed0', '#9d5', '#4d8', '#2cb',
'#0bc', '#09c', '#36b', '#639'
)
def setup():
global palavras
size(800, 800)
no_loop()
rect_mode(CENTER)
no_stroke()
def draw():
w = 100
for x, y in product(range(0, width, w), repeat=2):
d = width // w
cores = sample(palette, d)
for z in range(d):
fill(cores[z])
square(w / 2 + x, w / 2 + y, w / (z / 2 + 1))
def key_pressed():
redraw()
Based on Tom Larrow's experiment at: https://codeberg.org/TomLarrow/creative-coding-experiments/src/branch/main/x_0049/x_0049.py
d'aprés Vera Molnar "interruptions" (https://collections.vam.ac.uk/item/O1193775/interruptions-drawing-vera-molnar/)dapr
- To listen: recording.mp4
"""
A reticule of colored circles forms The Beatles's Abbey Road album cover
"""
import py5
def setup():
py5.size(1000, 1000)
py5.color_mode(py5.HSB)
img = py5.load_image('ar.jpg')
py5.no_stroke()
py5.background(0)
s = 10
w = py5.width // s
for i in range(w):
for j in range(w):
x, y = s // 2 + i * s, s // 2 + j * s
px = img.get(x, y)
h = py5.hue(px)
sat = py5.saturation(px)
b = 0.36 + py5.brightness(px) / 400
py5.fill(h, sat * 2, 255)
py5.circle(x, y, s * b)
py5.save('out.png')
py5.run_sketch()
D'aprés @ntsutae つぶやきProcessing https://twitter.com/ntsutae/status/1268432505356513280?s=20
from itertools import product
circles = []
intersections = []
def setup():
size(600, 600)
for x, y in product(range(100, 550, 50), repeat=2):
r = random(10, 60)
circles.append((x, y, r))
for xa, ya, ra in circles:
for xb, yb, rb in circles[1:]:
if (xa, ya) != (xb, yb):
pts = calc_cci(xa, ya, ra, xb, yb, rb)
intersections.extend(pts)
background(0, 0, 100)
stroke(255)
no_fill()
for x, y, r in circles:
circle(x, y, r * 2)
no_stroke()
fill(255, 0, 0)
for x, y in intersections:
circle(x, y, 5)
def calc_cci(x0, y0, r0, x1 ,y1, r1):
d = dist(x0, y0, x1, y1)
a = (r0 ** 2-r1 ** 2+d ** 2) / (2 * d)
hsqd = r0 ** 2 - a ** 2
if hsqd == 0:
return [(x0 + a * (x1 - x0) / d, y0 + a * (y1 - y0) / d)]
elif hsqd > 0:
h = sqrt(hsqd)
x2 = x0 + a * (x1 - x0) / d
y2 = y0 + a * (y1 - y0) / d
xa, ya = x2 + h * (y1 - y0) / d, y2 - h * (x1 - x0) / d
xb, yb = x2 - h * (y1 - y0) / d, y2 + h * (x1 - x0) / d
return[(xa, ya), (xb, yb)]
else:
return []
sketch_2023_01_03 [Processing Java] & [py5]
Java version:
// Para criar imagem com glitch a partir de
// arquivo JPG na sub-pasta /data
PImage img;
int n = 10; // número de passos estragando bytes!
String nomeArquivo = "sesc.jpg";
void setup() {
size(382, 510);
noLoop();
}
void draw() {
byte[] data=loadBytes(nomeArquivo); // carrega a imagem original
for (int i = 0; i < n; i++) {
int loc=(int)random(1, data.length); // sorteia uma posição no array
data[loc]=(byte)random(255); // sorteia um valor de byte e substitui
}
saveBytes("gliched_" + nomeArquivo, data); // salva um novo arquivo modificado
img = loadImage("gliched_" + nomeArquivo); // carrega a imagem modificada
image (img, 0, 0);
}
void keyPressed() {
saveFrame("###.png");
redraw();
}
Python version:
# using py5 (py5coding.org) imported mode
from PIL import Image
import io
def setup():
size(517, 707)
no_loop()
def draw():
with open('data/a.jpg', 'rb') as f:
list_jpg_bytes = list(f.read())
for _ in range(10):
loc = random_int(len(list_jpg_bytes) - 1)
list_jpg_bytes[loc] = random_int(1, 255)
stream = io.BytesIO(bytes(list_jpg_bytes))
new_img = Image.open(stream)
try:
image(convert_image(new_img), 0, 0) # PIL.Image to py5Image
except: # OSError / UnidentifiedImageError:
pass
def key_pressed():
save_frame("###.png");
redraw()
Genuary 2 - 10 minutes
def setup():
size(600, 600)
color_mode(HSB)
no_stroke()
rect_mode(CENTER)
def draw():
background(0)
m = frame_count #1 + mouse_x // 10
for x in range(100):
cx = 50 + x * 5
for y in range(100):
cy = 50 + y * 5
c = (x ^ y) ** 13 % m
fill(c * (255 / m), 255, 255)
# print(c, cx, cy)
square(cx, cy, 5)
if frame_count % 10 == 0 and frame_count <= 100:
save_frame('###.png')
Genuary 1 - loop
def setup():
size(600, 600)
blend_mode(ADD)
no_stroke()
def draw():
background(0)
xc = yc = 300
r = 250
for i in range(6):
m = cos(radians(frame_count / 2)) ** 2
a = radians(frame_count / 2 + 60 * i)
x = xc + r * cos(a)
y = yc + r * sin(a)
fill(0, 0, 255)
circle(x, y, 50)
x = xc + r * cos(a * m)
y = yc + r * sin(a * m)
fill(0, 255, 0)
circle(x, y, 50)
x = xc + r * cos(a * -m)
y = yc + r * sin(a * -m)
fill(255, 0, 0)
circle(x, y, 50)
2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018
The sketch-a-day project, images and code repository, by Alexandre B A Villares are licensed under Attribution-NonCommercial-NoDerivatives 4.0 International , except if marked/attributed otherwise in a file or code section. Please contact for licensing questions.