Plotting 3D level sets in Paraview
Surfaces can be represented as certain levelsets for some 3D functions. Given a set of points with values attached to them a level set associated to a certain number will separate the points into two sets: with values higher or lower than the number considered. It is nice to have good looking plots when working with the levelset method in shape optimization. Paraview is a nice, open source framework, which has the right tools in order to produce high quality plots.
I’ll briefly describe below how to use Paraview to make some nice pictures of levelsets. First of all, you’ll need your data in some format that Paraview can understand. I use vtk file format for which there is a nice automated interface in the software I use for the optimization (FreeFem++). In the vtk file you need to have a set of points and a scalar value attached to them.
If you want to create levelsets associated to certain values, follow the steps below:

 Load your file (containing points with at least a scalar value) and click Apply.
 Next, go to Filters/Alphabetical and select “Cell Data to Point Data” (if you forget to do this, you’ll get a rough surface where you see the discretization). Click Apply.
 Then apply the Contour filter (by clicking the button or going in Filters/Alphabetical). You’ll have to select the field for which the contours will be drawn and then put in the values of the levelsets you want to see. Click Apply. An example can be seen below.
If your levelset cuts the boundary of the domain, Paraview will draw a hole there. If you want to have a closed region instead, you need to use the IsoVolume filter instead of the Contour one. The difference is that you need to specify two values and Paraview will draw the surface enclosing the points corresponding to these values. Many other features are directly available: you can color the level set following another scalar value, you can set the lighting, etc. You can also symmetrize your geometry using the Reflect filter. Below you can see a result built from my work.
You can also create animations in a pretty straightforward way. Just go to View and select the Animation box. Then you’ll see the animation options. Add a Camera object with Orbit field selected. You’ll be presented with multiple options, like the center of rotation, direction of the vertical and initial position. Once everything is set, click the play button to see the animation. Then go to File/Save Animation to save it to a file.
I heard that Paraview could to many things when dealing with visualization aspects, but I hesitated to use it until now since the interface is not straightforward. The use of Filters is not clear in the beginning, but after playing with some examples, everything becomes really easy to use. The next step is to automatize all this using scripts.
Happy New Year!
Print your Matlab models in 3D
The emergence of 3D printers opens a whole new level of creation possibilities. Any computer generated model could be materialized as soon as it can be transformed in a language that the 3D printer can use. This is also the case with objects and structures which emerge from various mathematical research topics. Since I’m working on shape optimization problems I have lots of structures that would look nice printed in 3D. Below you can see an example of a 3D model and its physical realization by a 3D printer.
I want to show below how can you can turn a Matlab coloured patch into a file which can be used by a 3D printer. The first step is to export the Matlab information regarding the position of the points, the face structure and the colours into an obj file format. This is not at all complicated. Vertex information is stored on a line of the form
where is exactly the character , give the coordinates of the points and give the colour associated to the point in the RGB format. The face information can be entered in a similar fashion:
where are the indices of the points in the corresponding face. Once such an obj file is created, it can be imported in MeshLab (a free mesh editing software). Once you’re in MeshLab you should be able to export the structure into any file format you want, which can be understood by a 3D printer (like STL). Once you have the stl file, you can go on a 3D printing website like Sculpteo and just order your 3D object.
Optimal triangles with vertices on fixed circles
Let and suppose is a triangle such that there exists a point which satisfies , , . What is the relative position of with respect to the triangle such that
a) The area is maximized;
b) The perimeter is maximized.
This was inspired by this answer on Math Overflow.
Eigenvalues – from finite dimension to infinite dimension
We can look at a square matrix and see it as a table of numbers. In this case, matrices and below are completely different:
If instead we look at a square matrix as at a linear transformation things change a lot. Since the transformation is arbitrary, it seems normal that does not act in every direction in the same way, and some directions are privileged in the sense that the transformation is a simple dilatation in those special directions, i.e. there exists and a nonzero vector (the direction) such that . The values and the corresponding vectors are so important for the matrix that they almost characterize it; hence their names are eigenvalue and eigenvector which means own value and own vector (eigen = own in German). It turns out that and above both have the same eigenvalues , and because they are distinct, both the matrices are similar to the diagonal matrix ( and are similar if there exists invertible such that ).
Torricelli point and angles of 120 degrees
Denote a triangle with angles smaller than . The point which minimizes the sum is called the Torricelli point of the triangle . One interesting property of the Toricelli point, besides the fact that it minimizes the above sum is that all the angles formed around are equal and have .
I will prove here that the fact that the angles around are of can be derived without any geometric considerations, just from the fact that is the solution of the problem
Master 7
(For the context and pervious posts look on the Shape Optimization page for the links)
As a result of the theorem proved in the previous post and of the fact that every limit is lower semicontinuous we can see that the functional
is lower semicontinuous on the space .
Definition 1 We say that a set of , is an admissible configuration if there exist linearly independent vectors and a continuous function with zeros precisely at points such that we have .
Using the above result we can see that if is an admissible configuration then the functional defined by
is lower semicontinuous on
where is the unique solution of the system
where is chosen such that all are positive.
Master 6
(For the context see the Shape Optimization page where you can find links to the first 5 parts)
A particular consequence of the ModicaMortola Theorem is that the functional
is lower semicontinuous with respect to the convergence for on the set
where the equalities are, as usual, up to a set of measure zero. It would be nice if a similar result would be true for multiphase systems, where a functional of the form
is a limit and therefore semicontinuous, for where
Let’s first remark that allowing the function in the ModicaMortola theorem to have more than two zeros does not suffice. Indeed, if we allow to have zeros , then the limiting phase will take only two values and or and , depending on the constraint . This means that functionals of the form we presented above cannot be represented as a limit when the function is scalar, but with more than two zeros. This obstacle can be overcome by passing to the multidimensional case. This approach is presented by Sisto Baldo in [1] and we will present the ideas of this approach below.