Hi to all
I have coordinates those represent a polygon (often with hole(s)). I need to obtain "triangulation" of the polygon so I can create (at runtime) a mesh (TGLFreeForm, not TGLMesh) with triangles, and the mesh must represent the polygon itself.
Problem is that polygon coords are nown only at runtime.
A second way should be to crete directly the mesh (FreeForm) using the polygon coords.
Can anyone help me?
Thanks in advance
Massimo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your question is a bit unclear, but if you mean the triangulation algorithm
itself, you should look into Delaunay triangulation or something similar,
e.g., the "Triangle" library at https://www.cs.cmu.edu/~quake/triangle.html
Hi to all
I have coordinates those represent a polygon (often with hole(s)). I need to
obtain "triangulation" of the polygon so I can create (at runtime) a mesh
(TGLFreeForm, not TGLMesh) with triangles, and the mesh must represent the
polygon itself.
Problem is that polygon coords are nown only at runtime.
A second way should be to crete directly the mesh (FreeForm) using the
polygon coords.
Thanks for reply.
More simply, what I need is to transform a polygon into a mesh, or better: create a TGLFreeform starting from a sequence of coords of a polygon (sometimes the polygon is complex, with holes inside).
As first step, the mesh can be 2D (without extrusion).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Basically what i need is like this sample.
It's only a sample.
Imagine I want to mesh a polygon like the capital A character.
It's a "complex" polygon with a hole inside.
As you see in the picture, on the left there are vertex of (two) polygons.
On the right it's showed what I need as result. A triangulation subdivision starting from vertex of polygon.
Basically what i need is like this sample.
It's only a sample.
Imagine I want to mesh a polygon like the capital A character.
It's a "complex" polygon with a hole inside.
As you see in the picture, on the left there are vertex of (two) polygons.
On the right it's showed what I need as result. A triangulation subdivision
starting from vertex of polygon.
Thanks for suggestion.
It seems interesting, but I have a request.
Because of for my application I use an older version of GLScene (that hasn't GLMeshLines unit), is there someone who can provide me the executable of that sample, just to see if it's useful for my purposes.
I wouldn't install new version just to test the sample.
I'll do later, in case the sample will be useful for me.
Thanks in advance
Massimo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi to all
I have coordinates those represent a polygon (often with hole(s)). I need to obtain "triangulation" of the polygon so I can create (at runtime) a mesh (TGLFreeForm, not TGLMesh) with triangles, and the mesh must represent the polygon itself.
Problem is that polygon coords are nown only at runtime.
A second way should be to crete directly the mesh (FreeForm) using the polygon coords.
Can anyone help me?
Thanks in advance
Massimo
Your question is a bit unclear, but if you mean the triangulation algorithm
itself, you should look into Delaunay triangulation or something similar,
e.g., the "Triangle" library at https://www.cs.cmu.edu/~quake/triangle.html
Lars
Fra: Massimo Zanoletti [mailto:massimoz@users.sf.net]
Sendt: 24. maj 2016 09:40
Til: [glscene:discussion] 93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Polygon triangulation
Hi to all
I have coordinates those represent a polygon (often with hole(s)). I need to
obtain "triangulation" of the polygon so I can create (at runtime) a mesh
(TGLFreeForm, not TGLMesh) with triangles, and the mesh must represent the
polygon itself.
Problem is that polygon coords are nown only at runtime.
A second way should be to crete directly the mesh (FreeForm) using the
polygon coords.
Can anyone help me?
Thanks in advance
Massimo
Polygon triangulation
https://sourceforge.net/p/glscene/discussion/93606/thread/b18cfba4/?limit=2 5#b004
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Thanks for reply.
More simply, what I need is to transform a polygon into a mesh, or better: create a TGLFreeform starting from a sequence of coords of a polygon (sometimes the polygon is complex, with holes inside).
As first step, the mesh can be 2D (without extrusion).
Basically what i need is like this sample.
It's only a sample.
Imagine I want to mesh a polygon like the capital A character.
It's a "complex" polygon with a hole inside.
As you see in the picture, on the left there are vertex of (two) polygons.
On the right it's showed what I need as result. A triangulation subdivision starting from vertex of polygon.
That is delaunay triangulation as posted previously. Also, see the
cutoutstar demo.
Fra: Massimo Zanoletti [mailto:massimoz@users.sf.net]
Sendt: 26. maj 2016 12:35
Til: [glscene:discussion] 93606@discussion.glscene.p.re.sf.net
Emne: [glscene:discussion] Re: Polygon triangulation
Basically what i need is like this sample.
It's only a sample.
Imagine I want to mesh a polygon like the capital A character.
It's a "complex" polygon with a hole inside.
As you see in the picture, on the left there are vertex of (two) polygons.
On the right it's showed what I need as result. A triangulation subdivision
starting from vertex of polygon.
Polygon triangulation
https://sourceforge.net/p/glscene/discussion/93606/thread/b18cfba4/?limit=2 5#b004/8412/765b/d77b
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/glscene/discussion/93606/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
Hi check the "MeshLines" in the "Examples" branches in SVN
Thanks for suggestion.
It seems interesting, but I have a request.
Because of for my application I use an older version of GLScene (that hasn't GLMeshLines unit), is there someone who can provide me the executable of that sample, just to see if it's useful for my purposes.
I wouldn't install new version just to test the sample.
I'll do later, in case the sample will be useful for me.
Thanks in advance
Massimo