Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Weighted Alpha shapes

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Weighted Alpha shapes


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] Weighted Alpha shapes
  • Date: Thu, 7 Jun 2018 12:47:23 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:eNRAbRTWIEcZDDAuG1FufPvEEtpsv+yvbD5Q0YIujvd0So/mwa6yZxyN2/xhgRfzUJnB7Loc0qyK6/2mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbN/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6YL+Bxcr/HcN4AWWZMUMRcWipcCY28dYsPCO8BMP5foYbnuVQOqQa1CA6pBOz11DBIgmX63bc90+Q8HgDJwgggE8gKsHvOt9r6L7kdXPu6zKbWyjXDau1Z2Svn6InIfBAuu+2DXa53ccrLyUgjDR/KjlKVqYH8OT6ey+oDs2+e7+V6VOKvjXYqqw5wojizxscsl5LGipgJxVDD8CV0xps+K96gSENjfNKpE5hduzuHO4Z3Qs4uWWFltDggxrEYpZK2cjAGxZA7yxLFaPGKcpKE7g/nWeqPOzt0mXJodKy5ih2v60av0Pf8WdOx0FtSripKjN3MtncV2hHd8MSHT/x980al1DqV0gDc8OBEIUQtmarcNp4h3qQ8lp0NsUTDBCP2nlv5jLOOekUl/Oin9fjnb637qpKfNIJ4kBzyP6Uul8ClAek0LBICU3aH9emyzLHj+Ff2QLROjv04iKnZt5XaKNwepqGjHQBV1pwv6wy4Dze739UXg30HIEhBeB2dlIfmIE/BLev3DfihhFSslSlkx+zcPrzhDJXCNGTMkKvmfbZn609Q0hY8zdda555MELEOPOrzWlPttNzfFhI2LwO0zPzjCNlky4weWHmPDbOEMKPJql+F/fkvIumJZI8NojnxMfkl5/j0jX84g1ARZ6ep3YFEIEy/S/9pKkHcbXv3icoaCk8LuBA/Rarkkg6sSzlWMlO7UqZ0sjQyBYbgF4DeVo2pxriI1i22NpJbYWVLFkqdH37ja4KeSrEHbyfEcZwpqSANSbX0E9xp7hqprgKvk+M2fNqRwTURsNfY7PYw4uTSkR8o8jkuVpaS3maIQn1uj20BTCMxxrE5qkt4mA/ajfpIxsdAHNkW3MtnFx8gPMSFneN3DNX/RhjQcN6CVFG8U5OtBjRjFotske9LWF50HpCZtj6G3yeuBOVIxefNAZtqo+TZ1nn1YsFg1zDByqlniVQ6EJNC

Hello,

What is your version of CGAL? There was a bug in AS_2 till not so long ago where it failed to use weights sometimes. As far as I remember the bug fix came with CGAL 4.12. With master, and the following test code, I get the following output:

Alpha Shape computed
4 alpha shape edges
Optimal alpha: 11.7899

Faces...
    face:
        2.5 5 4
        3 3 0
        4 5.7 16
    squared radius directly from the kernel: 6.06026
    compute with AS, sq_r: 6.06026
   

    face:
        3 3 0
        8 3 0
        4 5.7 16
    squared radius directly from the kernel: 11.7899
    AS sq_r: 11.7899

Alpha values
    value: 0.57046
    value: 1.79264
    value: 3.82369
    value: 6.06026
    value: 11.7899

which seem to be what you expect.

Mael

On 06/04/2018 05:03 PM, Kathi Oe wrote:
Hello,

I want to compute Alpha shapes of weighted points in 2D (and later 3D).
When I compare my own implementation with CGAL, I get very different results for the alpha values of the simplices.

I tried this basic example:
point 0: 4 5.7 weight 16
point 1: 2.5 5 weight 4
point 2: 3 3
point 3: 6 4 weight -9
point 4: 8 3

We get the triangles 012 and 024, which is fine.
They should have squared radius 6.06 and 11.79, but CGAL gives me 2.15 and 6.62. I don't know where these numbers come from.

Just to be clear, my definition for the weighted Alpha shape is the following:
A simplex is contained in the Alpha shape of radius r if the smallest sphere orthogonal to all its points (AB orthogonal if d(A,B)^2-weight_A-weight_B=0) has weight <= r^2.

For triangle 012 I compute
solve (4 - x)^2 + (5.7 - y)^2 - 16 - w = 0, (2.5 - x)^2 + (5 - y)^2 -  4 - w = 0, (3 - x)^2 + (3 - y)^2 - 0 - w = 0
to get the center (x,y) and weight/radius^2 w of this weighted circumsphere, which indeed gives w=6.06...
Why is the alpha value in CGAL 2.15? The correct value does not even appear in the list of alpha values (which are 0.685 1.0625 2.15052 5.8225 6.25 6.6212).

Did I understand something wrong about how to use alpha shapes in CGAL?

Thanks for your help,
Kathi






Archive powered by MHonArc 2.6.18.

Top of Page