Page **1** of **1**

### create mesh from a list of points

Posted: **Tue Dec 05, 2006 12:28 am**

by **as_dub**

Hello !

I would like to create a mesh which is not a sphere or a cube or any basic shape.. I couldn't find the way to do this, could you tell me if I can do this easily (or hardly...)?

For example I have 10 points that represent a surface, I would like to create the mesh for which the triangles (at the end of the mesh file) would be the nearest neighbors between the points of the mesh. Do you know if there is an Aims command that could do that for me ? Or how should I do this ?

Thank you !

Anne-Sophie back on BV !!

Posted: **Tue Dec 05, 2006 8:28 am**

by **Yann Cointepas**

Hi Anne-Sophie,

If your object is convex, you can use AimsConvexHull. It takes a list of points and writes a mesh corresponding to the convex hull of these points. However, if you really need that triangles edges represent closest neighbor relationship, or if your object is not convex, you will have to do it yourself.

Yann

Posted: **Tue Dec 05, 2006 6:56 pm**

by **as_dub**

Thank you Yann !

my object is convex, so that will work !

Could you give me a very short sample of the input file ? (i.e. the -i "file containing 3D points")

I guess it has to contain on the first line the number of 3D coordinates, and then the 3D coordinates (but waht format ?)

A sample of an existing file would be great ! Thank you in advance !

Anne-Sophie

Posted: **Tue Dec 05, 2006 9:48 pm**

by **Yann Cointepas**

Yes, the documentation is not so verbose

The format is a text file. One value for the number of points then N * 3 numbers for the coordinates. Here is a sample for a cube:

Code: Select all

`8`

0 0 0

10 0 0

0 10 0

10 10 0

0 0 10

10 0 10

0 10 10

10 10 10

Yann

Posted: **Tue Dec 12, 2006 12:56 am**

by **as_dub**

it works fine ! Thank you very much !

Posted: **Fri Apr 13, 2007 5:44 pm**

by **as_dub**

Hello Yann,

I notice that AimsConvexHull doesn't take every points to do the triangulation (some points are ignored, and not use to build the mesh) is it possible to constrain it to take ALL the points and not more ? or do you know a Matlab function that could do this ? (if fact, the best would be a function that creates a surface from a list of vertex using the closest neighbours to build the faces)

Thank you !

AS

Posted: **Fri Apr 13, 2007 6:23 pm**

by **riviere**

Hi,

Yes it's normal: AimsConvexHull makes a... convex hull, an objects which volume contains all the points, and which is always convex. So any point which would make it not convex is ignored (it is not at the boundary of the convex hull, but inside the volume). I'm not sure I am clear, but a convex hull has a precise mathematical definition.

So what you want is not a convex hull because it is not necessarily convex. But we don't have any algorithm to perform this. It is potentially very complex to do so because there are ambiguities on which points to link together.

Denis