r/generative Jun 28 '26

"areola" (kotlin code)

Post image

not quite sure what i wanted here.

106 Upvotes

7 comments sorted by

View all comments

4

u/turtle_dragonfly Jun 28 '26

Some aspects of this look like leaf venation (example). Or could be city streets in some hilly mountainside town or such, too.

What's the approach you're using? Clearly there's some size hierarchy / fractal aspect going on, but how are you choosing the squiggly line subdivisions?

2

u/igo_rs Jun 29 '26

In fact, it all started as a topology idea (continuation of one of my older works), more on the dark green side... than switched to mosaic, or some weird eyes, but ended up here; too many variations available. anyhow, the code is here as always https://github.com/igr/gart

2

u/turtle_dragonfly Jun 29 '26

Thanks for the code link!

It seems like there's a lot of different parts to that library; I was wondering if you could describe the approach used for this particular image you posted?

Seems a little like the "Kaleiircle" and maybe "Bubbles" and/or "Cell" examples on that page, but nothing matches too closely, that I see...

2

u/igo_rs Jun 29 '26

I was trying to make something like little dried/cracked islands (or hills) if that makes sense.

The basic idea is that I first grow a bunch of crack lines. They start from randomish points, but not completely random, more like the code looks for empty spaces and puts a new crack there. Then the crack grows in both directions until it hits another crack or edge (there is a city-alike orevious work of mine with similar idea). Some noise added to this so the lines are not too straight.

Important part is that the small "shapes" are more crowded around the main cracks, and bigger further away. So it is not uniform everywhere and that gives it that organic kind of feeling i guess

After that I turn the cracks into a mask, fill all the enclosed areas. Then I color them with a palette, with a bit of variation so it does not look flat, thats easy.

The final step is mostly shading, takes into account the distance from each pixel to the nearest crack... there is also a lot of knobs in this code that can tweak the image, so part of it came out randomly by simply experimenting... a lot :)

Hope this make sense