Saturday, January 23, 2021

Genuary 2021 Day 23: ", no gradient" (variant)


"More Colorful Ripples. Chance of Gradient"




I decided to revisit this one, to try a few things. I kept the basic ideas, but altered the implementation. First up, instead of randomly positioning the color strings, I placed the color strings in an RGB cube, and randomly oriented that cube (generativity!) within the canvas.

I then replaced my square sampling of the SDF field with a triangular mesh, based on a Delaunay triangulation of a Bridson blue noise point set.

This allowed me / required me to rewrite my "Marching Cubes" implementation to be a "Marching Triangles" implementation, except that I guess "Marching Triangles" is the name of a different algorithm. Rewriting my marching squares actually simplified things.

I then did my ripples rendering - first with a version that just colored the segment of the ripple based on the closest color string, which was kind of interesting.

But then I rewrote it to do a weighted sum based on the inverse distance to each of the color strings. Which I think violates the "no gradient" part of the prompt. Bah! I'm not beholden to prompts! They serve me, not the other way around! Also, this is a variant, I feel like I have even more flexibility than the prime work.

I added an "edge pool" class, which collects line segments and accumulates them into long polylines. This made the ripple drawing a lot faster. And it invited me to draw the underlying triangle mesh, which is kind of interesting in the raster picture, but overwhelming when drawn on the AxiDraw.

 







No comments:

Post a Comment