create mesh from a list of points

AIMS library and commands usage

Moderators: denghien, riviere

Post Reply
as_dub
Posts: 59
Joined: Fri Aug 19, 2005 4:09 pm
Location: Cleveland, Ohio

create mesh from a list of points

Post 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 !! :-)
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post 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
as_dub
Posts: 59
Joined: Fri Aug 19, 2005 4:09 pm
Location: Cleveland, Ohio

Post by as_dub »

Thank you Yann !

my object is convex, so that will work ! :D
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
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

Yes, the documentation is not so verbose :roll:
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
as_dub
Posts: 59
Joined: Fri Aug 19, 2005 4:09 pm
Location: Cleveland, Ohio

Post by as_dub »

it works fine ! Thank you very much !
as_dub
Posts: 59
Joined: Fri Aug 19, 2005 4:09 pm
Location: Cleveland, Ohio

Post 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
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post 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
Post Reply