Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6168841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:45:26+00:00 2026-05-23T22:45:26+00:00

After experimenting with some triangulation work I ran across the question on how to

  • 0

After experimenting with some triangulation work I ran across the question on how to determine if a polygon has a hole?

I know how to handle a known hole but am unsure of how to determine if one exists.

Example:

Given the following vertices:

0 ( 0, 0)
1 ( 0,20)
2 (20,20)
3 ( 0,20)
4 ( 2, 2)
5 ( 6, 2)
6 ( 6, 6)
7 ( 2, 6)

How do I know if it is a simple polygon such as:

enter image description here

or a non-simple/complex polygon like:

enter image description here

I ask because the data that I will have to work with has the potential of being a polygon with a hole, but I will have no knowledge beforehand of it being so.

note: the polygon will never be complex. I just need to know when the vertices of the outside of the polygon ends and the vertices comprising the hole begin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:45:27+00:00Added an answer on May 23, 2026 at 10:45 pm

    From the vertices alone you cannot infer the layout of the polygon’s edges. You will need to keep the edges as well (for example as pairs of vertices).

    In your example, another graph layout would be, for instance, 0-1-5-6-2-3-7-4-0 where the resulting polygon contains no hole at all.

    If you have the edges, you can align them so that they form circles, i.e. group those with common second/first element together: (0, 1), (1, 2), (2, 3), (3, 0) and (4, 5), (5, 6), (6, 7), (7, 4). If there is a hole, there will be two or more such groups which cannot be grouped together any further. You can then find out whose points are within the area surrounded by the other points to know where the hole is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this question , I was reminded of when I was taught Java
I am experimenting with the c-language right at the moment, yet i have some
After experimenting with a handful of new addons for Firefox, I've managed to permanently
I'm diving into web development after ten years of desktop development and I'm experimenting
I am, for some time, experimenting with LLVM , simply because. It does, however,
After experiencing numerous problems with a certain media player, it got me thinking is
After reading the Head First Design Patterns book and using a number of other
After the suggestion to use a library for my ajax needs I am going
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no
After being told by at least 10 people on SO that version control was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.