Question about 2D Visibility

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about 2D Visibility

Andy Li
Hi there,

The example file of "Visibility_2/general_polygon_example.cpp " shows the
visibility of a vertex which is on the polygon. Could you please give me an
example of how to judge visibility of a vertex which is in the polygon area?

Best regards,
Andy Li.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Question about 2D Visibility

Sebastien Loriot (GeometryFactory)
In this example:


https://doc.cgal.org/latest/Visibility_2/Visibility_2_2simple_polygon_visibility_2_8cpp-example.html

the query is q a user given point.

Sebastien.

On 5/21/19 12:03 PM, Andy Li wrote:

> Hi there,
>
> The example file of "Visibility_2/general_polygon_example.cpp " shows the
> visibility of a vertex which is on the polygon. Could you please give me an
> example of how to judge visibility of a vertex which is in the polygon area?
>
> Best regards,
> Andy Li.
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Question about 2D Visibility

Andy Li
Thanks for your reply.

I noticed the example which you gave. But this example applies to simple
polygon, not for the polygon with holes. The following example shows the 2D
visibility of the boundary point of the polygon with holes, not for the
inside point. Could you show me how to use this code to do that, please?
Thank you.

https://doc.cgal.org/latest/Visibility_2/Visibility_2_2general_polygon_example_8cpp-example.html

Best regards,
Andy Li



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Question about 2D Visibility

Andy Li
In reply to this post by Sebastien Loriot (GeometryFactory)
Thanks for your reply.

I noticed the example which you gave. But this example applies to simple
polygon, not for the polygon with holes. The following example shows the 2D
visibility of the boundary point of the polygon with holes, not for the
inside point. Could you show me how to use this code to do that, please?
Thank you.

https://doc.cgal.org/latest/Visibility_2/Visibility_2_2general_polygon_example_8cpp-example.html

Best regards,
Andy Li



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Question about 2D Visibility

Sebastien Loriot (GeometryFactory)
You can use the same function as from the other example, each example
is using different functions documented here:
https://doc.cgal.org/latest/Visibility_2/classVisibility__2.html

What you have to do also is the locate part to get the face of the
arrangement containing your query point, like in the other example.

Sebastien.



On 5/24/19 9:35 AM, Andy Li wrote:

> Thanks for your reply.
>
> I noticed the example which you gave. But this example applies to simple
> polygon, not for the polygon with holes. The following example shows the 2D
> visibility of the boundary point of the polygon with holes, not for the
> inside point. Could you show me how to use this code to do that, please?
> Thank you.
>
> https://doc.cgal.org/latest/Visibility_2/Visibility_2_2general_polygon_example_8cpp-example.html
>
> Best regards,
> Andy Li
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss