# Geometry Nodes: Straight Lines on Intersections of Circle Instances

I have a Geometry Nodes setup that creates instances of Curve Circle on points of another Curve Circle. How could I modify it in such a way, that the circle instances would be separated by straight lines instead of intersecting each other?

I attached a drawing showing what effect I have in mind.

#### Context:

I'm trying to procedurally generate a napkin based on the design below. I want to be able to change the size and the number of circles etc. The geometry I'm trying to create based on the answers to this question will be populated with equally distributed points, on which I will spawn the toroids.

This is based on:

Geometry Nodes: How to find the intersection of two splines (not line segments)

So you have a circle spawning smaller circles on its vertices, where the edge of the big circle is the $$d$$, and the $$r$$ is of course also known:

The difference is, you're not interested in obtaining the intersection, rather the circle excluding this arc, so you need to first alter the linked setup to select the entire overlapping part, rather than just the upper part, and then invert it, and set the cyclicity:

Unfortunately this works for only one side, and for two sides you need to assemble it 'manually' - can't take the advantage of inverted arcs, due to an overlapping geometry (could maybe do some trick like spawning a circle on top of overlapping arcs and keep only points that don't overlap), so I just approached it more rigorously by first defining all the points of arcs like the original (from linked answer) "Down - Left", then rotating (green zone) all points by $${{τ \over n} \over 2} = {0.5 τ \over n} = {π \over n}$$ - the Tau means a full circle, $$τ \over n$$ is the angle between the edges of the big circle instancer, the division by two comes from the fact the instance is not aligned to either edge (fortunately), it's aligned to a vertex being an average of the two edges, so it's rotated halfway through towards each edge.

There is some trial-and-error where I would just swap Math: subtract node's operands to get the correct sign etc., so I would bet it can be optimized (but why bother)

This is not yet finished, no straight segments, also only by coincidence it works with the extremes (all the way through negative radius) and has overlapping geometry in such a case:

The cyclic trick no longer works for two arcs, but what can be done is merging two curves into one by creating a new curve with matching number of points and sampling positions from the arcs:

• Wow. (The rest of this comment is padding) Commented Sep 10, 2023 at 18:07
• Thank you so much! I could not expect a better reply 🙌 Commented Sep 11, 2023 at 7:56