Circle Packing on Complex Surfaces

Hi everybody, I’m new to the forum.
I’m a student trying to do a circle packing on the Richmond Surface.

I’ve got some satisfying results so far, but non perfect. Tried doing a remesh placing singularities and tried to get a perfect equilateral mesh (which i didn’t get btw). Then I used tangent circles, but it is giving me weird results on the ups and downs of the surface, making the circles REALLY big. I’m a bit stuck in this point. I’m pretty satisfied with the results on the plane part of the surface, just the ups and downs look weird… Any suggestion anybody?? :thinking:

Here’s using TangentCircles on the mesh

Here’s using Incircles
I tried getting the centers of all the circles and building a collider after that with the average circle size, but circles move too much and get a bit overlapped, so the result is not optimized anymore (too much blank space…)

I have attached the GH file if anybody wants to check it out! (128.2 KB)

Thanks everybody!!! :smile:


Hi @Asola8, welcome to the forum

For the collision based approach, if you are careful with the radius, you should be able to get a better packing than that. I find it sometimes helps with finding a better packing to increase the radius to the point where they are overlapping slightly to push each other into a more regular arrangement, then slowly reduce it until they only touch (a bit like cooling processes in crystal formation). (25.4 KB)

For the other way with the tangent incircles, the connectivity does not change, and you don’t have control over the circle sizes - they will take whatever size is needed to allow them to become tangent.


…and here’s an example with the incircle approach: (21.0 KB)

As a third approach, you could take a principal curvature aligned quad mesh (which can be hard to find on complex shapes, but I think you can get it directly from the parametrization for this surface) and use the Isothermic energy.
(This is actually the only one where you will get a true circle packing - the other 2 methods actually give tangent sphere packings, and taking sections of these spheres in the tangent plane gives circles which can be very close to tangent, but will only be exactly tangent when the surface they are packing on is a plane or a sphere).


Hi Daniel, thanks for the fast response!

Those are nice approaches! I forgot to mention that we have a circle count limitation (200-400) since we are going to build them in the MPDA (Barcelona) programme in june.

When I try your methods without subdividing (and also mine) the gaps get bigger and I don’t get the optimal position leaving some some overlaps… Any idea?

*Edit: We are looking to doing them as same radius circles which makes it more difficult in the areas of high curvature…

1 Like

Ah, it’s a nice program.

When you say ‘without subdividing’ are you talking about subdividing the mesh the points are moving around on?
Even if you are using a small number of points, having a smooth mesh for them to move on can help, because for a very coarse one, the creases can restrict their movement.

If you need equal radii, then the tangent incircles and isothermic methods aren’t suitable.

The result from the collision based one can probably be improved a bit from what is shown above, but with equal circles, there is a limit on how dense the packing can be. Even on a plane, the densest packings of circles in a finite region generally have lots of gaps with more than 3 sides and circles touching only 4 or 5 of their neighbours. For example, here are the best known packings for equal circles in a circle:


Yes it is definitely a nice program!

Thanks again for responding so soon.
By subdividing, I noticed in your file ( you were subdividing in the mesh to use it’s inner vertices as centers of the circles. That’s an interesting approach and it definitely gives awesome circle packings.
I had an interesting circlepacking as well using an adaptative remeshing, i’m gonna share some images now which are previous stages of this circle packing exercise.

Notice that the % index is the density of circle packing (in this first one it is wrong since the circles are overlapping a little bit)
Adaptative remeshing:

This one here is like cheating on the Isothermic one you were talking earlier, since it’s an “ellipse” packing.

Here you can see some uniform radius packings:

The same but with variable radius packings:

I understand we could use some variable radius, but not like a lot, i don’t know if I’m explaining myself correctly, like this approach here I used smaller circles on the outer bounds of the surface just to get a better packing there.
The small holes are to try and connect everything together.

The link you shared is very interesting for checking how circle packings work inside circles which could be appliable on the richmond since it is an annulus.

Again, thanks for answering and continuing this conversation going, much appreciated.


Hi Daniel! and @Asola8. Thank you very much for the answer. Here a quick test with the Isothermic goal using the wonderful quad remesher guided with some principal lines of curvature. (I used Dodo plugin :ok_hand: ) (5.0 MB) I guess, the better the mesh, the better will be the results without compromising the target surface fairness.


Hey Enrique - Nice work.
One thing to watch out for when quad remeshing is that it forces the grid to match the boundary, even when the curvature/guide field doesn’t. The valence 5 vertices near the outer edge and the valence 3 ones near the inner one are artefacts of this which do not match the true curvature directions (which can only ever have even valence singularities).
To avoid this I think it would help to use a curvature aligned boundary (which would be scalloped instead of circular) for the mesh. You can always cut it back to a different boundary such as a circle later.

1 Like


I used Dodo plugin for the curvature lines, and trimmed directly with the curves (not in an elegant mathematical way). Depending on the set of curves (even principal curves) QuadRemesher may introduce certain singularities, but after checking which curves where the bug, the result is homogeneous.
The Isothermic Goal is wonderful and converges really smooth when the mesh is suitable. Congratulations Daniel, and thanks! (1.2 MB)

(original richmond surface parametrization from @beremiz.2000 )