Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Back
Earlier in this thread 1 post
Open post
@bit101@mstdn.social on mstdn.social
Now and then I'll just dig up some old standard creative coding technique, make a solid, reusable function for it, and add it to my libraries. Circle packing was not in there yet. It is now.
Open post
bit101 @bit101@mstdn.social
· 3mo ago
Boosted by @GroupNebula563@mastodon.social
Replying to
42
9
11
0
Sign in to interact

Conversation (9)

Open reply Open reply
bit101
@bit101@mstdn.social · Jul 05
12
5
2
Open reply Open reply
bit101
@bit101@mstdn.social · Jul 05
Thread reply
13
1
1
Open reply Open reply
bit101
@bit101@mstdn.social · Jul 05
Thread reply
most of my code libraries are contained in two modules. blcairo, which is all rendering code. It's got the cairographics bindings. And bitlib, which is pretty much everything else, but knows nothing about rendering. The biggest part of that is probably geom, which has points, lines, circles, rectangles, polygons, all kinds of shapes - but only as models of shapes. blcairo knows how to render them all. This circle packing just returns lists of circles, which makes it very flexible.
4
0
0
Open reply Open reply
ipsquiggle
@ipsquiggle@sunny.garden · Jul 05
Thread reply
@bit101@mstdn.social All lovely 🤩 Curious, what algorithm does it use? What kind of configuration? I haven't written this kind of code in a long time, but I recall many of my efforts at reuse were resisted, even something as simple as a particle often wanted a shape or api specific to a project, and it didn't feel right to create uberclasses.
1
2
0
Open reply Open reply
bit101
@bit101@mstdn.social · Jul 05
Thread reply
@ipsquiggle@sunny.garden I write everything in Go, as part of a couple of custom frameworks I built that use Cairographics C bindings. I think it's pretty standard circle packing. Find a random point that's not in an existing circle, what's the largest circle you can create from there that doesn't overlap another circles. With a few other constraints and parameters.
1
1
0
Open reply Open reply
ipsquiggle
@ipsquiggle@sunny.garden · Jul 05
Thread reply
@bit101@mstdn.social Do you get one circle at a time, feeding the existing ones back in, or do you provide the inital constraints and get a whole bunch out? Is the circle a Very Standard thing in your framework? Is it an abstract circle or does it know about drawing? Heh, I'm suddenly very curious about this. I'm just think about how back when I was using processing, everything was "draw" oriented, and so maybe I had no data to reuse against. I think my approach would be so different now! I really gotta get back to it sometime...
0
2
0
Open reply Open reply
Perpetuaλ β 🇺🇦 :emacs:
@kf@sonomu.club · Jul 05
@bit101@mstdn.social it may be an old trick, but this version of it is very beautiful 🙂
2
0
0
Open reply Open reply
SOMETHING WONDERFUL HAS HAPPENED TO YOUR leah :oh_no:
@millihertz@oldbytes.space · Jul 05
@bit101@mstdn.social is it an 8?
1
0
0
Open reply Open reply
Dave bauer
@davebauerart@mastodon.social · Jul 06
@bit101@mstdn.social And they look cool!
0
0
0
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p
313k7r1n3

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Pricing
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 17:19:05 UTC