[Dune] Barycentric coordinates

Oliver Sander oliver.sander at tu-dresden.de
Wed Feb 10 14:56:10 CET 2016


Hi Marco,

so what you really want to do is point location in your grid (that's the technical term for
"finding the element that contains a given point")?  There is quite a number of papers on this
subject.  For 2d grids I got very good results using the randomized algorithm from

@techreport{brown:TR-Cambridge-97,
author      = "Peter J.C. Brown and Christopher T. Faigle",
title       = "A Robust Efficient Algorithm for Point Location in Triangulations",
institution = "Cambridge University",
year        = 1997,
month       = feb}

Best,
Oliver

On 10.02.2016 14:48, Agnese, Marco wrote:
> Hi Carsten, hi Aleksejs,
> 
> what I need is, given an entity and the global coordinates of a point, to compute its barycentric coordinates.
> 
> Then, if the point is not inside the entity, I can take the minimum barycentric coordinate to know which neighbouring entity is more likely to contain the point (and repeat this procedure until I find the entity which contains the point). 
> 
> The only alternative method is to recursively explore the neighbours until I find the entity which contains the point. But I think it is much less efficient (or maybe not??)
> 
> Cheers,
> Marco  
> 
> ________________________________________
> From: Carsten Gräser <graeser at mi.fu-berlin.de>
> Sent: 10 February 2016 13:35
> To: Agnese, Marco; Dune
> Subject: Re: [Dune] Barycentric coordinates
> 
> Hi Marco,
> to map local coordinates to barycentric coordinates you
> can just evaluate the P1 shape functions at this point.
> 
> Best,
> Carsten
> 
> Am 10.02.2016 um 14:09 schrieb Agnese, Marco:
>> Hi,
>>
>>
>> I need to compute the barycentric coordinates of a point.
>>
>> Before reinventing the wheel, is there something already implemented
>> within Dune? I have looked inside dune-grid and dune-geometry but I
>> haven't found anything.
>>
>>
>> If nothing is implemented, do you think would be useful to add this
>> feature to Dune (I think it should be added as a method of Dune::Geometry)?
>>
>> Obviously I will implement such a method.
>>
>>
>> Cheers,
>>
>> Marco
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160210/21361f22/attachment.sig>


More information about the Dune mailing list