tetgen library- tetrahedralize without convex hull - convex-hull

I am trying to tetrahedralize my mesh using tetgen library. However it creates convexhull on the mesh like in the picture. How can I tetrahedralize my mesh while preserving boundary surface of the mesh using tetgen library?

Okay, I found the problem. Setting the parameter plc as 1 fixes the problem.

Related

spherical mesh using pdepe

I was wondering if it possible to have a spherical mesh using the pdepe function of Matlab? My system of pdes are defined in a sphere, so I want to solve accordingly. My internet search didn't give helpful results, unfortunately. Thank you in advance!

generating irregular mesh of a cube

I want to generate a mesh for solving the Laplace equation on using FEM. I want to solve it on a cube and I would like to mesh the cube using tetrahedra. Is there a way to do this in MATLAB using unstructured meshes, i.e. that I can choose if the density if elements should be higher in a specific region?

create a quad mesh over an image matlab

I am trying to implement this paper
Patch based Image warping for Content aware Retargeting
I am half way through in its implementation in matlab, when I came across the warping using quad mesh. The section III.c suggests me to formulate the image as a quad mesh with vertices, edges and quad faces. I have searched, but did not get the concrete result as to how to do this in matlab. Can you please tell me how to represent image as a quad mesh in matlab? Thanks in advance.
Update :
Pics from the paper stating the requirements better. Can you also please see the paper and tell me if am looking for the right thing?

I have a point set in image,how to find the External irregular shape circling all the points by Matlab

I got a point set after executing SIFT algorithm.Now I want to find the external irregular shape of those points.Is there anyone knowing the relevant functions in Matlab? Notice that I don't want the convex hall.Thank you!
If you want convex hull, (unclear based on your comment... you can edit questions btw), look up convhull.
If you don't want convex hull, a Delaunay triangulation will probably get you started since the result captures both the convex hull of the points, but also the internal structure such that you may be able to remove some edges from the outside of the returned triangulation.

Mesh Generation in MATLAB

Is there any subroutine, in MATLAB, that takes in a list of points, and return me a good mesh that I can use to show to my colleagues, such as this?
Actually, all I need is just a simple 2D mesh generator that takes in a series of X, Y coordinates (that defines the boundary of the area), and give me back a list of elements that can mesh that area well. I can do the rest by using MATLAB command to interpolate the Z value.
Edit : I am not interested to use MATLAB to produce the above looking plot. I am interested in using a MATLAB library to obtain a list of elements so that when I plot those element myself (not in MATLAB itself; but in my own C# program), I can obtain this meshed surface.
PS: I know there is this DistMesh, but I am looking for something simpler - something built-in direct in MATLAB perhaps. And no, meshgrid is not mesh generation.
It sounds like you want to create a finite element mesh, starting with a set of points defining a boundary of a region and then generating a triangular mesh that creates more points within that region. I don't think there's a "simple" solution for this problem.
The closest "built-in" solution would probably be the Partial Differential Equation Toolbox, specifically some of the Geometry Algorithms like INITMESH and REFINEMESH.
The link you gave to DistMesh appears to be another good solution. There are also a few submissions on the MathWorks File Exchange that you could take a look at:
MESH2D by Darren Engwirda
Finite Element Toolbox 2.1 by Rasmus Anthin
That picture looks exactly like the one from the griddata documentation. The example in there looks like what you want.
SFTOOL will easily make the picture that you show.
A thin-plate spline, e.g., TPAPS, should also do the job.
I think the user-created 'gridfit' is the best I've come across for a single surface, much better/prettier than griddata.
Mesh generation as in Delaunay Triangulation + Steiner Points? There is a builtin Delaunay function in MATLAB.
If your surface is the z=f(x,y) form you can use:
http://www.advancedmcode.org/how-to-plot-a-coloured-surface-from-3d-scatter.html
If your surface is concave look for surface reconstruction on the same website.