Wednesday, January 27, 2021

Genuary 2021 Day 27: "Monochrome Gradients without Lines"

"Rubber Duck-lish?"




Monochrome, yes. Gradients, um, ok. Without lines, well...

I interpreted the "without lines" to mean that I shouldn't be drawing straight lines or line segments. So, the only primitives I used was the Circle, which I used to halftone an image. 

I first used my ray marcher to render an image of a donut plus two spheres. I used a Smooth Union operator ("Smooth Union Operator" is the name of my easy listening jazz trio). You can see a falloff - or "gradient" in the shading of the donut and the top sphere, so that's something to work with. The second sphere is below and to the right, mostly hidden. The camera angle and positions of the spheres, as well as rotation of the overall thing is largely procedural, so I didn't have a lot of control over it. There was an initial configuration that looked uncomfortably anatomical, so I adjusted some values to get this configuration.



I then switched over to plotterworld, generated a blue noise point grid (of course), then for each of the points, I sampled the raster image, giving me a gray value from 0 to 1, 0 = black, 1 = white. I wrote a small function that turned a gray value into a list of circle radii that would give me darkness options. I had a list of candidate radii, and I greedily output radii that would approximate the gray fraction. Black = all radii, white = no radii, 40% might be the biggest circle alone, 50% might be the biggest circle and the second smallest circle.

I was somewhat clever this time, and I sorted my points by X, so that I drew from left to right:













Tools Used: My ray marcher, AxiDraw, Pentel .5mm pen

Languages Used: Python

Development Time: ~1 hour

Drawing Time: ~100 minutes

What's Generative Here: The camera position, the orientation, and the basic geometry of the donut + spheres are all randomly generated. I then use a random blue noise pointset to sample that image for halftoning.


No comments:

Post a Comment