The 23 ways of dividing a 3x3 grid into 2, 3 and 4 triangles, excluding rotations.
Find the sketch-a-day archives and tip jar at: https://abav.lugaralgum.com/sketch-a-day
Code for this sketch at: https://github.com/villares/sketch-a-day/tree/main/2026/sketch_2026_02_20 #Processing #Python #py5 #CreativeCoding
Find the sketch-a-day archives and tip jar at: https://abav.lugaralgum.com/sketch-a-day
Code for this sketch at: https://github.com/villares/sketch-a-day/tree/main/2026/sketch_2026_02_06 #Processing #Python #py5 #CreativeCoding
#introduction
- I'm currently working on a PhD at Unicamp
- I should be tooting less and concentrating, but… ask me about drawing with #Python! Check out #py5 and #pyp5js, they bring in the drawing vocabulary from #Processing & #P5js
- I’d like to collaborate on open resources to teach programming in a visual context & I keep a list of tools for teaching Python with visual output at https://github.com/villares/Resources-for-teaching-programming
- I make a new drawing with code everyday & I put the results at https://github.com/villares/sketch-a-day
- 2024 Update: Adding more "please support me" things in my profile links!
#EndUserPogramming #NotADeveloper #CreativeCoding #EduComp
# Abreviated version from https://github.com/villares
#トゥートProcessing #py5
from collections import deque
history = deque(maxlen=512)
def setup():
size(600, 400)
no_stroke()
color_mode(HSB)
def draw():
background(51)
for i, (x, y) in enumerate(history):
fill(i / 2, 255, 255, 128)
circle(x, y, 8 + i / 16)
if history:
history.append(history.popleft())
def mouse_dragged():
history.append((mouse_x, mouse_y))
def key_pressed():
history.clear()