2025 | 2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018
Hoping 2025 will be a good year!
tris = sequence.reshape(20,3)
face_centers = vs[tris].mean(axis=1)
Preparing for an icosahedron!
phi = (py5.sqrt(5) + 1) / 2
a = phi * f
b = 1 * f
vs = np.array([
(a, b, 0),
(a, -b, 0),
(-a, -b, 0),
(-a, b, 0),
(b, 0, a),
(-b, 0, a),
(-b, 0, -a),
(b, 0, -a),
(0, a, b),
(0, a, -b),
(0, -a, -b),
(0, -a, b),
])
A tetrahedron with #py5 and a bit of #NumPy ... Maybe tomorrow I'll tackle the icosahedron, but if I'm tired, I might do just use the built-in box() for the hexahedron ;)
#Voronoi #Delaunay #scipy
Work in progress... things that used to work (in previous studies) look confusingly broken.
Maybe, just maybe, I'm getting to enjoy using #NumPy.
Slowly working on some #NumPy skill so I can get back to my combinatorics explorations (thinking about removing rotations and reflections...)
#vtracer raster to svg tool from the visioncortex group.
#scipy #Voronoi #shapely
Another "hello py5" sketch made during an impromptu "corridor track" tutorial
Ramalho @[email protected] (e Feurzeig, , Solomon & Papert) tinham razão: andar e virar é mais fácil...
I love to play/create an #LSystem, check discussion at py5coding/py5generator#555
more Slider tweaks
I now can use the mouse wheel to control my naive sliders!
Today I worked on this with a friend to whom I'm teaching Python classes: 336 configurations made from 4 truchet modules (diagonaly divided squares with black and white sides) plus black and white squares. Removing rotations!
1200 polykings of order 1, 2, 3, 4, 5 and 6 (https://en.wikipedia.org/wiki/Pseudo-polyomino)
704 one-sided octominoes, using code inspired by a great talk by Hamish Campbell https://pyvideo.org/kiwi-pycon-2013/polyominoes-an-exploration-in-problem-solving-w.html
Inspired by this post from Armchair Epistemologist: https://hostux.social/@rcriii/112406728834440508
2811 ways of coloring a grid of 3 x 3 squares removing rotations...
31 ways of coloring a grid of 2 x 2 squares removing rotations? Is this correct?
WIP, this is still including and excluding some rotated configs with same geometry and different painting :( I'd be happy if it included all or excluded all the painting variations. Working on it.
1434 configurations of ways of dividing a square (using a grid of 9 subsquares) The colors now show the minimum number of colors you need to color the regions,
2810 ways of partitioning a square using 5 x 2 subsquares, shown on a 38 x 74 grid of 2812 positions.
1200 ways to divide a square using only the squares and smaller diagonals from a grid of 3x3 points (edges, mid-side and center of the square).
456 ways to subdivide a 4 x 2 rectangle (merging 1 x 1 sub-regions)
1434 ways of subdividing a square merging areas from a grid of 9 subsquares.
512 configurations, ways of "enclosing" elements from a 3 x 3 grid
There are 1295 ways of making enclosed areas using the segments and shorter diagonals of a 3 x 3 grid of points. 1296 if you consider the "empty" case of not enlosing any area.
animation shows some examples of black and white triangles in a 4 x 4 point grid being merged (with same color triangles)
broken but fun! #debugaesthetics
WIP
WIP
based on Jim Bumgardner's sketch https://openprocessing.org/sketch/41142 from 2011.
Trying to replicate the "Tecniquim tiling" idea from John
Inspired by Rougier's first example in From Python to Numpy
sketch_2024_09_08 [faded-parsons-visual]
The daily sketch was a "Parsons Problems" puzzle, the code on the link produces both the "chequered image" and the YAML for the the puzzle page
#shapely
#shapely
#shapely experiment... not brilliant but fun.
Playing with Ziaplot
#networkx #3d #graph
G = nx.balanced_tree(4, 5)
pos = nx.spring_layout(G, dim=3, seed=1)', margin, margin)
#networkx #graphviz #pygraphviz
I think this is my first attempt at combining py5 and networkx :) #networkx #graphviz
#IslamicPatterns
More #IslamicPatterns studies.
#QuadraticBezier #CubicBezier #CatmullRom
Working on the curves demo sketch. Now you can switch modes and it can print the code generated. You can still drag the handles but I didn't record it. #CubicBezier #QuadraticBezier
#QuadraticBezier curves have a single control point. I find them easier to work with, sometimes...
Updating my #BezierCurve interactive example.
#shapely buffers, subtractions and instersections
More #IslamicPattterns studies.
Studying #IslamicPatterns with hexagons.
Inspired by @JeanBaptisteEt4's work: https://mathstodon.xyz/@JeanBaptisteEt4/112837724665792089 #tiling #tesselation
Reproducing a pixel manipulation example from Guzdial & Ericson's Media Computation with Python!
Not at all what I wanted :( playing with layers (geodataframes) from#prettymaps, but getting confused because I'm terrible with #matplotlib data (c) OpenStreetMap contributors ttps://www.openstreetmap.org/copyright
work in progress ... #osmnx data (c) OpenStreetMap contributors https://www.openstreetmap.org/copyright
Work in progress... tesselation studies
sketch_2024_07_13 [cpy5]
130 rectangles on a 5 x 5 grid of points.
100 rectangles on a 5 x 5 grid of points
A first baby step towards Tetris with py5. Python's dicts are so cool!
Em colaboração com Nariz Coletivo d'aprés Warhol...
Kind of works... based on Stand-up Maths video abou rotation without rotation (3 skews) https://www.youtube.com/watch?v=1LCEiVDHJmc
Back to drawing text with colors for highlights. I have an earlier sketch that uses Python's tokenize to draw source with some basic syntax coloring https://github.com/villares/sketch-a-day/tree/main/2023/sketch_2023_08_14, this one is simpler (preparing for another idea).
another nasty SVG + pymunk failure
Not very good WIP :(
sketch_2024_06_14 [blender geometry nodes]
I'm happy with this, I converted yesterday's sketch to an OO strategy and I could solve my "parent angle alignment" wishes.
the true May 17th's sketch
#PyConUS I made this during my tutorial :)
40 different ways to divide a square using points from a 3x3 grid.
WIP on "partitioning"
WIP
Revisitando uma ideia de sketch de 2018 inspirado em um sketch de manoloide (Manuel Gamboa Naom)
Formas básicas, preenchimento, traço e interação usando draw(). Esse sketch do dia é bem bobo, mas o codigo anotado vira um quebra-cabeças de Parsons em https://abav.lugaralgum.com/faded-parsons-visual
#pymunk
#pymunk
#pymunk experiments... trying to extend pymunk.Body with a DrawableBody class (instead of monkeypatching pymunk.shape.Poly & etc.)
#Numpy
#pymunk
#DebugAesthetics
40 hexágonos brancos a partir de uma grande de 3x3 pontos. Em branco em quadrados pretos, dispostos em uma grade de 8 colunas e 5 linhas em um fundo azul.
All the 125 possible not self-intersecting polygons form a 3 x 3 grid of points (without rotations and translations).
Success! All the possible simple quadrilaterals from a 3 x 3 grid of points. Yesterday I had broken my hashing function that made it possible to eliminate rotations (it is possible to eliminate reflections too, but I like to have them)
still WIP, my translation/rotation elimination strategy didn't work (so turned it off on this output)
WIP ... hard to debug
Fiddling with https://github.com/Botffy/polyskel/tree/master
#scikitgeometry #skgeom
#OpenSimplexNoise #Numpy
the red text encodes the neighbours state
WIP
for facet in bs:
with py5.begin_shape(py5.LINES):
py5.vertices(vs[v] for v in itertools.chain(*facet))
Now using #shapely as suggested by @[email protected] :)
circle and line segment collision, based on: http://www.jeffreythompson.org/collision-detection/line-circle.php point_circle
rect collisions
Still capture of anolher animated gesture experiment
Another animated mouse gesture experiment
Another animated mouse gesture experiment
Another animated mouse gesture experiment
Another animated mouse gesture experiment
Sorru, no music.
#genuary30 just porting ad using a Processing shader example
#genuary29 using a 3D sdf based mesh library
#genuary27 the gif degraded the color gradients :(
#genuary26 Inspired by deconbatch's "Poor man's Diffusion Limited Aggregation" Istead of calculantig costly distance, I'm reading a pixel from the canvas and seeing if it falls in the "black halo". I started not showing the halo, but changed my mind.
#genuary25
not engough energy for #genuary24 :(
#genuary23
#genuary22
#genuary21 #LibreTranslatePy #LibreTranslate
#genuary20 with shapely
#genuary19 Variation of an early flocking experiment
#genuary18 Bauhaus (inspired by Albers)
Badly done #genuray17
#genuary16
#genuary15 Physics (using pymunk)
#genuary14
#genuary13
#genuary12 "lava lamp" OpenSimplexNoise
#genuary11 inspired by Anni Albers
#genuary10 ASCII
#genuary9
#genuary8 Double-pendulum simulation based on pygame code by Bryan Brickman
#genuary7 progress bar
#genuary6 screensaver (based on earlier Processing sketches for "tweetprocessing")
#genuary5 d'aprés Vera Molnar "interruptions" (https://collections.vam.ac.uk/item/O1193775/interruptions-drawing-vera-molnar/)
#genuary4 pixels
#genuary3 droste
#genuary2 no palette
#genuary1 #genuary2024 lots of particles
2025 | 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.