clojure-art

reefersleep 2025-02-26T09:27:45.244019Z

This is from a series of stuff I did with chains of shapes, essentially. It gets more interesting as it goes on (or so I think ๐Ÿ™‚ )

๐Ÿ˜ 1
โญ 3
reefersleep 2025-03-12T14:36:13.895779Z

One last before we move on to some other shape

โค๏ธ 5
Rachel Westmacott 2025-03-04T09:23:46.433249Z

Thank you for explaining your approach. I guess for this number of circles performance is not an issue. (It seems like a lot of cross-checking, but ๐Ÿคทโ€โ™€๏ธ)

reefersleep 2025-03-04T09:37:40.849139Z

Yes, it's very wasteful. You can of course do optimizations. I've considered stuff like dividing the canvas into quadrants (or maybe recursive quadrants, I think this has a name), then place the circles in lists for each quadrant and use an initial check to see which quadrant your current guess falls in, then only do overlaps with the list of circles for that quadrant. This would probably reduce the amount of overall checks considerably. But I haven't bothered, the compute/render time is under a second for the above images, so it doesn't matter ๐Ÿ˜„

๐Ÿ‘ 1
reefersleep 2025-03-03T15:51:37.927089Z

Adding a flow field of Perlin noise

๐Ÿ‘ 2
๐Ÿ’ฏ 1
๐Ÿ˜€ 1
2
Rachel Westmacott 2025-03-03T17:31:36.339429Z

None of these shapes seem to overlap. How do you avoid collisions?

reefersleep 2025-03-03T22:59:03.580909Z

Inelegant, indulgently inefficient circle packing. It's quite simple, really. For two points (x1,y1) (x2, y2) we can calculate the distance between them we with the formula sqrt((x2-x1)^2 + (y2-y1)^2) . So, for two circles A and B defined by their center coordinates and a radius each, we can calculate the distance between the centers, and see if it is smaller than or equal to (depending on your taste) A.radius + B.radius, well, then they overlap ๐Ÿค“ So if you want to pack just a bunch of circles on a canvas, pick a random position and radius, then check for overlaps with already placed circles. If none, put the circle in the list of placed circles and go again. If there's an overlap, increment your" missed_guesses" counter and see if you've hit your predetermined max. If you have, stop entirely, you're done, the end. If not, go again. Then at the end, render your placed circles ๐Ÿค“ (or interleave your rendering with your calculating, that can be fun as well)

reefersleep 2025-03-03T23:02:18.511529Z

For my chains, I just pick a random point and generate the chain of circles according to Perlin noise or whatever, then check each circle in the chain for overlaps with already placed circles. If any, I drop the chain and try again. If none, add the circles of the chain to the list of placed circles and go again ๐Ÿค“

eggsyntax 2025-03-10T13:19:00.047369Z

Adding the flow field absolutely nails it IMO chef_kiss Makes it feel very aquatic.

๐Ÿ™ 1
reefersleep 2025-03-05T15:32:05.003499Z

Half circles, just playing with shapes again

โค๏ธ 6
reefersleep 2025-02-28T12:54:42.172739Z

Next up: chained squares

๐Ÿ˜ 1
โญ 2
rafaeldelboni 2025-02-28T14:51:33.050279Z

so beautiful, those could be pen plotted I imagine

โค๏ธ 1
reefersleep 2025-02-28T15:28:38.195049Z

Thank you so much ๐Ÿค— I'd love to experiment with a pen plotter ๐Ÿค“

reefersleep 2025-03-13T08:20:41.863839Z

I thought I'd see how interlaced circles and squares looked ๐Ÿค“

โค๏ธ 6
๐Ÿงก 2
reefersleep 2025-02-27T09:15:25.722499Z

Intersecting chain links

reefersleep 2025-03-24T15:58:55.777039Z

I'd love to continue this particular thread, but I don't have any more material right now. I have some ideas, some concepts that I actually set out with from the very beginning, but I'm just too busy with other stuff (work/life responsibilities).

๐Ÿ‘ 2
reefersleep 2025-03-11T12:57:34.449779Z

Thanks ๐Ÿ™‚ I really enjoy flow fields! Such an easy way to generate movement, and you can hitch whatever you want onto it.

๐Ÿ’ฏ 1
reefersleep 2025-03-11T12:59:21.079929Z

Another image of flow-fielded chained squares, but with different size parameters, I guess? Can't recall.

reefersleep 2025-02-26T11:26:34.252709Z

Varying sizes of chain links

๐Ÿ‘ 3
๐Ÿ˜ 3
reefersleep 2025-03-06T10:20:17.579449Z

Flow-fielded chained squares

๐Ÿ˜ 5