Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Computing visibility polygon from a point in the boundary

Subject: CGAL users discussion list

List archive

[cgal-discuss] Computing visibility polygon from a point in the boundary


Chronological Thread 
  • From: Natanael Ramos <>
  • To:
  • Subject: [cgal-discuss] Computing visibility polygon from a point in the boundary
  • Date: Mon, 16 Sep 2019 16:16:01 -0300
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:0JyM2hd/rFPFzuUnKvdg7xhWlGMj4u6mDksu8pMizoh2WeGdxcS6Yx7h7PlgxGXEQZ/co6odzbaP6Oa5AidZusrJ8ChbNsAVDVld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbdgMutyu+95YDYbRlWizqhe7NyKwi9oRnMusUMjoZuN6g8xgHUrnZGdOha2G1lKF2OlBr4+su84YRv/itNt/4/7cJMTbn2c6ElRrFEEToqNHw46tf2vhfZVwuP4XUcUmQSkhVWBgXO8Q/3UJTsvCbkr+RxwCaVM9H4QrAyQjSi8rxkSAT0hycdNj4263/Yh8pth69Guh2hphh/w4nJYIGJMfd1Y63Qcc8GSWdHQ81cUTFKDIGhYIsVF+cOMuZWoYf+qVUTsxWxGRKhBObzxjJSnHL6wbE23uYnHArb3AIgBdUOsHHModvtLqgSTfq6zK/Swjrda/NdxCvz55LNchAmuvGHQLV9cczLyUY1EgPFiU6QpJfkPzyJzOgNrm6b7+t8Wu21jm4nsxt9rSO1xso1jITCm4wbylfB9SpjwYY1I8W1SFZmbt6qCpdQtieaOo1rSc0hW2FloDs2x7IItJKhYSQG1JUqywTdZvCdfIWF7ArvWPiNLTp8nn5oe7Kyiwyv/UWhy+DwTMa53VVMoyFYiNfDrGoN2AbW6sWfSvty4EOh2TGX2gDP8O5EOF00mrDBK5E7xr48jJsTvljZEi/rnkX2jbOZeV8h+uiw8ejoea/mqoedN49ylA7+LrwjltGwDOk2KAQCQnSX9OWm2LDh50H0T7tHguUzkqbDsZDaIcobprS+Aw9Qyosj7Qy/AC2j0NQfhnkKN1NFdw6dg4j0PVHOIez3Au26g1S0ijtk3OrGMqX7AprRNnjDjKvhfbFl5kFAxwo819Rf64tJBbEAO/L8RlLxtMfDDhIiKAy1w+PnCM1n2Y8EWGKPBLWZMKLIvlOS6OIvObrEWIhAszn0L70p5uXlkGQisV4bZ6igm5UNO16iGfEzBUyFaHzlj9NJK24PuRF2GOrwgViFShZSbDCvWaM37zQjToi8W9SQDruxiaCMiX/oVqZdYXpLXwjVQCXYMr6cUvJJUxq8Z8pokzgKT7+kEtJz1BroqQn7wLNiNqze4H9B7M6x5J1O/+TW0CoK23lsFc3EjjOMRCdpmGIDTjoumqpl8xQklwWzlJNgivkdLuR9ovNEVgBgaczAxvVnAsr7XkTAdZGUTletS9C+RzsrHIo8

Hello all,

My name is Natanael Ramos. I'm using the CGAL library to compute Visibility Polygons from a point p within a simple polygon P, where p is in the boundary of P.
I'm using the class "Simple_polygon_visibility_2" and when the visibility polygon is computed, the results seem to be wrong. I'm send in the attachment both the polygon P (poly.pdf) and the resulting visibility polygon (vis.pdf).
In this example, I'm interested in finding the visibility polygon from the vertex labeled "7". As you can see, the resulting visibility polygon has the edge from "4" to "5" (and consequently, the triangle "7-4-5") which is not valid, since this triangle is not part of P.

I've read the paper from Joe and Simpson, and they mention:

"For a boundary viewpoint z, we orient the vertices of P in counterclockwise order and label them z, v_0, v_1, ..., v_{n-1}, v_n and z, where
v_0 is the successor vertex of z and v_n is the predecessor vertex of z. We also assume that the coordinate system is translated and rotated so that z is at the
origin and v_0 is on the positive x-axis"

I think that maybe this is the issue, because I'm not sure if CGAL's implementation tests whether the query point is on the boundary or not and if so, treats it as an especial case.
If so, do I have to do this translation/rotation a priori?

Best Regards,

Natanael Ramos

Attachment: polygon.pdf
Description: Adobe PDF document

Attachment: vis.pdf
Description: Adobe PDF document




Archive powered by MHonArc 2.6.18.

Top of Page