zirk.us is one of the many independent Mastodon servers you can use to participate in the fediverse.
Literature, philosophy, film, music, culture, politics, history, architecture: join the circus of the arts and humanities! For readers, writers, academics or anyone wanting to follow the conversation.

Administered by:

Server stats:

761
active users

#Kotlin

46 posts33 participants2 posts today

The program no longer crashes and the fix was simpler than I thought.

Instead of comparing rounded doubles (what a silly idea) I did the proper thing, which is abs(a - b) < epsilon. A lot of times 🙂 Takes maybe half second to generate the design. Then I can pan, zoom and rotate to find a screenshot I like.

I'm thinking that the lines that end in lonely places should end with a tiny knot. I may try that next.

This iteration has been a big challenge: Generate shapes, get their concave hull, pack those hulls, calculate the transformation matrices mapping the original hulls to the packed ones. Apply those transformation matrices to the original shapes. Finally play with a 2D camera to find the right shot.

And I still have an interesting rounding bug which doesn't fit in this description :)