I was trying to extract the border from a 2D mesh. The only function that i could find on the FreeFem Documentation is only applied for a 3D mesh (mesh3, extractborder). I hope someone could help me on this topic, i was trying to find the solution for a long time, the border that i want to extract could be from a simple square or maybe more difficult from a random shape. The reason i want to extract the border is to define the initial condition for a simulation of the traffic flow.
Thank you but what i do really need was how to extract a part of the border, to set the initial limitation. For example it could be one edge of a square, half of the circle or random edge from a random shape. Because in my project, i already have the totally border extracted now all i need is just a part of it.
Thank you for your reponse, i have tried your code and try to apply it into my project, but it didn’t work in my case. Because in my project, the whole border was taken from a random picture. The problem here is there is no way to identify the label of the edge that we want to extract. The function ‘extractborder’ require label of the edge to be able to extract. I was thinking about using matrix to identify the label of the edge wanted but I didn’t find any informations about this on any documents. I hope you can help me solve this problem.