Form-finding 4
Vaults, minimal surfaces and mesh relaxation
Last updated
Vaults, minimal surfaces and mesh relaxation
Last updated
In this section we will develop soap film simulations using a new force expressing the concepts of pressure [] and surface tension []. This will allow to inflate and deflate membrane surfaces.
As a membrane surface gets inflated, its vertex normals change direction. This means that we need to recompute them for every simulation time step. In order to compute the normals at every mesh vertex we need to know for each vertex all the connected faces to it. The vertex normal, blue in the figure below, is the weighted average of the incident face normals, color coded green. The faces connected to a vertex form a fan-like shape. We need to thus expand our topology cluster such that beyond the edge table it also emits the fan table.
Computing the fan table is actually easier than the edge table, so the implementation uses basic components without python shortcuts. The idea is that for each vertex we need to check every face, to verify the presence of the vertex’s index “I” within the face’s “[A, B, C, D]” vertex index list.
We use four conditionals I == A
, I == B
, I == C
and I == D
, combined with OR
to capture the presence concept. We proceed using the computed table of “n x m” boolean values, where “n” is the number of vertices and “m” is the number of faces, to filter a list [0, m-1]
which produces the fan table.
Just to see this in action, let’s consider the simple case seen below. The vertex index values are in black, while face index values are in orange. We can visually verify that vertex “4” is connected to all faces “0”, “1”, “2” and “3”, while vertex “8” is only linked with face “3” and vertex “5” is connected to faces “1” and “3”.
The vertex and face Cartesian product can be visualized in the table below. For each cell we highlight the inclusion of the vertex index in the face. The rule for applying the red colour can be expressed as: is the row header value, ie. vertex index, present in the contents of a cell?
Vertex | Face
0
1
2
3
0
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
1
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
2
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
3
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
4
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
5
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
6
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
7
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
8
[0, 1, 4, 3]
[1, 2, 5, 4]
[3, 4, 7, 6]
[4, 5, 8, 7]
To build the fan table from the inclusion testing table above, we just need to remove all completely gray elements and replace the rest with the column header value. Do as such produces the fan table seen below which relates each vertex with a list of connected faces.
To compute the normal per vertex we need to first compute the normals per face and then take the average. The graph below captures this logic by first extracting the first three vertices of each face “pa“, “pb” and “pc“. We can compute two vectors along the face perimeter “u = pb – pa” and “v = pc – pb“. Taking the cross product “u × v = n” produces the normal vector for the face. We select face normals per vertex using the “list item” component guided by the fan table. Finally, we compute their sum and normalize the result.
Our pseudo-pressure force can be thus computed as a scaled version of normal per vertex using a strength multiplier. Note that we can use negative values for the strength factor which will cause motion against instead of along the normal direction.
The simulation below begins with a simple mesh grid and inflates a balloon shape by incorporating pressure, gravity, springs and drag. To anchor the grid’s edge points we use a slightly different approach compared to the one used earlier. Instead of fixing mesh vertices coincident to anchor points, here we use a rectangle such that all mesh vertices within it are free to move while the rest are fixed in place.
The soap film component wraps this functionality with the a new “fix” component which requires the list of mesh vertices and a rectangle shape. It emits zero masses for restrained points outside the rectangle and non-zero for all others.
The “free or fixed” component is implemented with yet more nested componentry, namely the “point in rectangle” inclusion testing logic. The output’s thereof, a list of Boolean values, is supplied to a conditional logic expression that computes the zero or non-zero masses required per particle.
The “point in rectangle” containment logic has been presented in the conditional expressions session in detail. Briefly, we check if point coordinates are included in both “x” and “y” domains defined by the rectangle’s minimum and maximum coordinate values.
The final iteration of the particle spring system presents a generic and reusable form of the setup requiring only one mesh and a list of anchors. The mesh may be drawn using CAD operations and imported or procedurally generated.
In this session we developed techniques for computational form-finding. We looked at compressive masonry vault structures as well as minimal tensile envelopes. Both of those examples gravitated about mechanical properties of materials expressed into surfaces. Nevertheless, the same approach can be used for general applications such as social network visualization, computer graphics mesh smoothing etc.
Computationally we developed concepts for modelling data relationships by use of indices stored in irregular containers. Indices connect items stored in a “master” list by pointing to their location. The approach has numerous applications including computer graphics, mechanical engineering, graph theory, social networks and databases for capturing and persisting node-edge relational information.
In terms of computational techniques we developed a few processes regarding data matching; for mesh edge extraction and vertex anchors. Matching one set of items to another, or even to itself for finding duplicates, requires use of Cartesian products or for every item performing an operation, typically a comparison, with every other item. This is also a very common process in general computation, performed in slightly different and more efficient way.
Finally, we extended ideas pertaining geometry and topology. We have a complete picture of the world of geometry comprised of concrete points, curves and surfaces and the world of topology comprised of relative nodes, edges and faces. For meshes the nodes map to vertices, edges map to linear segments and faces to triangles or quads. The same concept extends to Boundary Representation solids, or just BReps, where nodes are points, edges are spline curves, and faces are spline surfaces.
The equation for pressure expresses the force at a particle with direction normal to the surface and magnitude, proportional to both material and geometric properties. Surprisingly the force is related to mean curvature, but while curvature is trivial to compute for smooth surfaces, it is fairly involved for meshes []. As such we will only compute the normal and scale it with a fictional strength value.
A typical application of particle and spring systems is mesh smoothing sometimes also known as mesh relaxation. The objective is to reposition mesh vertices smoothly using the force balance or energy minimization logic of the particle-spring system. The animation below illustrates smoothing a rectangular grid with an internal hole as an example. By fixing all mesh boundaries it is also possible to smooth only internal mesh vertices. A famous example of using this technique in architecture is the Great Court of the British Museum in London [] by Foster and Partners.