This is a study following a question of @BK on how to make a soap film like this.
A soap film follows some rules, which are the plateau's law
In very short, from graphs of planar soap bubbles.pdf attached at the bottom
- The Soap film consists of one-dimensional curves of constant curvature; that is, circular arcs or line segments that do not cross each other.
- At each endpoint of one of these arcs or segments, exactly three curves meet, and they form angles of 2π/3 with each other.
- The curvature of any one of the circular arcs (the inverse of its radius) is proportional to the difference in pressure between the bubbles it separates. Bubbles with the same pressure as each other are separated by line segments, with zero curvature.
How do we do that? (from Daniel Piker in thread)
- make a triangular mesh with tangent incircles,
- find the first isodynamic point of the pedal triangle of the incenter of each triangle.
in release 2025xGA, DS R&D provided the function to get a triangular mesh with tangent incircles!!!
So, I could start the study and will reuse the mode of the chimpanzee relaxed voronoi as a starting point
here is the logic
- optimize the mesh to get a triangular mesh with tangent incircles.
- create the pedal triangles of the incenters
- create the isodynamic points of the pedal triangles
- create an arc circle of the adjacents incenters and pedal triangle vertex in between
my starting mesh is this one
But the incircles of this mesh are not at all tangent to each others,
Optimize the mesh to get a triangular mesh with tangent incircles.
to make it tangent use Circle Packing from mesh. Then you get entire Circle packging from mesh.
Now you need to get rid of the circles that are not INCircles.
To do that,
- create dual circle packing of the initial "Circle packing from mesh"
- get all the centers of the dual circle packing
- get all the centers of initial "Circle packing from mesh" that are close to a center of the dual circle packing
and get rid of their circles in the initial "Circle packing from mesh"
then you only get the circles that are INcircles of deformed mesh.
I hope that in future we can also output the deformed mesh to easily retrieve the incircles only.
only the incricles of a triangular mesh - they are all tangent!!!!
2.create the pedal triangles of the incenters
- For Each INCircles, get all its intersections to the Dual circles
because of performance, I do it only for a limited zone around each INCircles,to limit the number of Intersection to calculate
the intersections correpond to the vertexes of the pedal triangle of the INCenter.
I keep only the circles with 6 intersections and I group the intersections by 2 closest points and keep only 1 point per group.
then in the end, I get 3 points, the vertexes of all the pedal triangles.
comment: Cluster function could used, but it is not so easy to set the tolerance, so I made a loop to group the points.
3. create the isodynamic points of the pedal triangles
I follow the method indicated in Wikipedia
Go to Construction Section
there are other methods, but this one gave best result
4. Create an arc circle of the adjacent incenters and pedal triangle vertex in between
I have to cluster all the pedal triangle vertexes into 2 closest points.
from these points I get the index of their respective pedal triangle and then of their respective isodynamic points.
In the end, I have grouped 3 points: 2 neighbouring isodynaic point and the pedal triangle vertex in the middle
those points are used to create the arcs.
I also removed by hand the arcs not connected to the mesh. (4 arcs in this case)
What is next?
the arcs corresponding to the mesh boundaries (no triangle existing) are not treated.
the monkey original mesh boundaries are also deformed. if not deformed, then the model is much more complex as we cannot get a fully tangent incircles on the boundaries. it requires to be tolerant with the tangency of the circles. I could not find a way.
projection to any surface... feasible.
"Circle packing from mesh" is great! DS R&D rocks
