Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Inconsistent point/convex hull distance computation values

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Inconsistent point/convex hull distance computation values


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Inconsistent point/convex hull distance computation values
  • Date: Tue, 22 Nov 2016 08:59:04 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:2JfNShXco86dJH4bcM6prVcvCabV8LGtZVwlr6E/grcLSJyIuqrYZhSHt8tkgFKBZ4jH8fUM07OQ6PG7HzZcqs/Z4ThCKMUKDEBVz51O3kQJO42sNw7SFLbSdSs0HcBPBhdO3kqQFgxrIvv4fEDYuXao7DQfSV3VPAtxIfnpSMaJ15zkn7P6x5qGaApBgH+xYKh5MQ6thQTXrMgfx4V4eYgrzR6c6EBFce1N2WJlIxq3mAz94dv4vLFu9CFdp+gw2cdLTaLgbuVyBehDCDM8MmcposjvnRbGRAqLoHAbVzNFwVJzHwHZ4USiDd/KuSzgu78l1Q==
  • Organization: GeometryFactory

The planes of the facets of the polyhedron are not initialized.
See [1] for example for how to initialize them.

Sebastien.

[1] http://doc.cgal.org/latest/Convex_hull_3/Convex_hull_3_2quickhull_3_8cpp-example.html

On 11/22/2016 06:45 AM, SirM2X wrote:
Given two groups of points A and B, I'd like to compute the distance of all
the points in B to the convex hull of A. I've done this before, and I know
that I can leverage AABB trees for this. I thought I knew everything that
was involved in this computation, but I have a feeling that I don't.
Below is a short code of what I'm trying to do



From what I "thought" I knew, I computed the distance of the query point
with the closest point of the AABB tree using /squared_distance/ function
(stored in /distToPoint/ in the above snippet). But then, I felt the results
were off a bit, so I tried computing the query point's distance to the
closest face. Again I used /squared_distance/ but this time on the face's
plane (basically computing point/plane distance, stored in /distToFace/
above.)

If my understanding was correct, the two values had to be equal, but it
seems that this is not the case and I am super confused as to why :(

Also, I noticed that if I change my kernel from /Simple_cartesian<float>/ to
(say) /Simple_cartesian<double>/, I'd get nan values instead of distances,
and again, I have no idea why this is happening.

Any helps is greatly appreciated :)



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Inconsistent-point-convex-hull-distance-computation-values-tp4662388.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page