Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] about Alpha_Shape
- Date: Mon, 14 Nov 2011 19:04:35 +0100
Juan Carlos Lopez Alfonso wrote:
Hi Sebastien:
First of all thank you again for your answer and your comments. I have done my homework but I cant see any result when I use alpha_shape. I have a set of points that you can see in mi file PTV_all.off wich is a triangulation with matlab. I have tried to use Alpha_Shape to obtain a triangulation of my set of point where the shape of these domain of points were adjusted, but without lucky. I have read the documentation, but there not examples of how I can handle the result of these alpha_shape.
http://dl.dropbox.com/u/2516160/MAIN.cpp
There are several problems in your code:
First, you set alpha to 0, so you will get only all the points.
Try calling find_optimal_alpha(1) and then set_alpha to the result
for example.
The second problem is that in your output functions, you consider all
simplices where as you should only consider non-exterior simplices
(and probably use the REGULARIZED version to avoid having components
of dimension less than 3).
See the Alpha_shape_3 class documentation here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Alpha_shapes_3_ref/Class_Alpha_shape_3.html
See here the classification of simplices:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Alpha_shapes_3/Chapter_main.html#Subsection_42.2.3
http://dl.dropbox.com/u/2516160/PTV_all.off
Looking at your input, I have a question, are trying to reconstruct a
shape from polygonal contours in parallel planes?
When I run my code, I obtain a .off or vtk file with a similar triamgulation of matlab, but i want to obtain a triangulation of the shape of these points not of the convex hull of them.
Could you see my code and give me any suggestion or way to do this?
On the other hand, in all examples of the documentation they use "Exact_predicates_inexact_constructions_kernel" why do you say me that use "Exact_predicates_exact_constructions_kernel" instead?
Examples are written with an inexact construction kernel because when
the data is not to nasty there is usually no problem and the computation
is faster. In you case you probably have bad elements (almost flat
tetrahedra for example) and the squared circum-radii cannot be computed
using double.
Buried here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Alpha_shapes_3/Chapter_main.html#Section_42.4
You can read:
"the CGAL::Alpha_shape_3<Dt> requires a kernel with exact predicates and exact constructions"
We have something under review to address this problem with an inexact
construction kernel.
Sebastien.
Best regards and waiting for your help
Juan Carlos
On Mon, Nov 14, 2011 at 2:57 PM, Sebastien Loriot (GeometryFactory) < <mailto:>> wrote:
Juan Carlos Lopez Alfonso wrote:
Hi Sebastien:
First of all thank you for your answer and your comments.
In these links you can find my file of set of points and the
code of my example, which is simple and exactly as the example
"42.5.2 Building Basic Alpha Shapes for Many Points" on the
Alpha_Shape charapter of Cgal documentation.
http://dl.dropbox.com/u/__2516160/MAIN.cpp
<http://dl.dropbox.com/u/2516160/MAIN.cpp>
http://dl.dropbox.com/u/__2516160/Brainstem_all.txt
<http://dl.dropbox.com/u/2516160/Brainstem_all.txt>
When replacing Exact_predicates_inexact___constructions_kernel
by Exact_predicates_exact___constructions_kernel, the assertion is
gone. Explanation is here:
http://www.cgal.org/FAQ.html#____inexact_NT
<http://www.cgal.org/FAQ.html#__inexact_NT>
Alpha_shapes_3 require constructions so to guarantee the result to be
correct you need to use a kernel with exact constructions.
About my first question, I beleived that with alpha_shape was
obtained an approximated surface of my set of points. In my
problem I have a set of points and I need that my resultant
triangulation has the exactly same set of points, in the surface
and in the interior (I want to create a triangulation of a head
with their interior organs).
I don't get your point. Are you talking about missing singular vertices
because of the REGULARIZED mode you used in alpha_shape? If so, use
Alpha_shape_3::GENERAL instead.
http://www.cgal.org/Manual/__latest/doc_html/cgal_manual/__Alpha_shapes_3_ref/Class___Alpha_shape_3.html
<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Alpha_shapes_3_ref/Class_Alpha_shape_3.html>
Sebastien.
Best regards and waiting for your help
Juan carlos
On Mon, Nov 14, 2011 at 2:24 PM, Sebastien Loriot
(GeometryFactory)
<
<mailto:>
<mailto:
<mailto:>>>
wrote:
Juan Carlos Lopez Alfonso wrote:
Hi all,
There are any form to use 3D Alpha_Shapes with a general
triangulation like Triangulation_3? because Delaunay
triangulation or Regular triangulation move my points in
order
to obtain a linear approximation of the original shape and I
need to have a triangulation from a fix set of points.
Nor Delaunay, nor Regular triangulation moves your points.
It's building
a triangulation on top of your point set, so what do you mean?
On the other hand, I have created a Delaunay Triangulation
(Delaunay dt;) from a set of points and when I try to
create an
alpha_shape (Alpha_shape_3 as(dt);) I have the following
error:
CGAL::Assertion_exception !!!
Did you read this?
http://www.cgal.org/FAQ.html#____inexact_NT
<http://www.cgal.org/FAQ.html#__inexact_NT>
<http://www.cgal.org/FAQ.html#__inexact_NT
<http://www.cgal.org/FAQ.html#inexact_NT>>
If yes, showing some code might help giving you an answer.
Sebastien.
Best regrads and thank in advance
Juan Carlos
-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/____wws/info/cgal-discuss
<https://lists-sop.inria.fr/__wws/info/cgal-discuss>
<https://lists-sop.inria.fr/__wws/info/cgal-discuss
<https://lists-sop.inria.fr/wws/info/cgal-discuss>>
-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/__wws/info/cgal-discuss
<https://lists-sop.inria.fr/wws/info/cgal-discuss>
- [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/15/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Juan Carlos Lopez Alfonso, 11/14/2011
- Re: [cgal-discuss] about Alpha_Shape, Sebastien Loriot (GeometryFactory), 11/14/2011
Archive powered by MHonArc 2.6.16.