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

  • Home
  • SEARCH
  • 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 6540713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:00:46+00:00 2026-05-25T11:00:46+00:00

I got a list of triangles in a triangular grid like this: __________________ /\

  • 0

I got a list of triangles in a triangular grid like this:

__________________
/\      /\      /\
  \    /  \    /
   \  /    \  /
____\/______\/____
    /\      /\
   /  \    /  \
  /    \  /    \
\/______\/______\/
/\      /\      /\
  \    /  \    /
   \  /    \  /
____\/______\/____

A triangle can either be present or not. I need to get a path around the triangles like:

 ========
\\      /\\
 \\    /  \\
  \\  /    \\
   \\/______\\========
    \\      /\      //
     \\    /  \    //
      \\  /    \  //
       \\/======\//

I need to get the bold lines in clockwise order around the triangles. What algorithm can I use to get this? I can already classify triangles into groups using disjoint set, but I have no idea how to get the path around a group.

  • 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-25T11:00:46+00:00Added an answer on May 25, 2026 at 11:00 am

    An isolated triangle has three lines round it. If you add another triangle beside it, you lose one line where they merge, and gain two others from the new triangle. So you can keep track of the set of lines that appear as boundaries to a group of triangles placed beside each other, and you can also keep track of which of these lines meet which other lines.

    I am assuming here that only sharing a boundary joins two triangles in a group, and not sharing a point. Lines meet at a point, and if only sharing a boundary counts as joining two triangles, then each outer line is connected with just one other outer line at each of its ends.

    If you follow (e.g. with depth first search) the graph formed where nodes are lines and links between lines show where a line is adjacent to another line, you will trace a cycle of lines – it can’t be more complicated than that because any single line meets at most two other lines, one at each of its end points.

    If your group of triangles has no holes inside it you will then retrieve a single cycle which is its outer boundary. If the group of triangles has holes in it you will retrieve the outer boundary and a cycle for each of the holes. The outer boundary must be the cycle that contains the largest area, because it contains all of the holes.

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

Sidebar

Related Questions

In Python, I've got a list of dictionaries that looks like this: matchings =
I got a list, programmed like this: public class MyList<T> . Is there any
I've got a triangular mesh class which contains a list of nodes (2d in
How shall sort this in ASC order? I got List<List<UInt32>> full of records of
I got this list: words = ['how', 'much', 'is[br]', 'the', 'fish[br]', 'no', 'really'] What
Alright so I've got list in JS formatted like so: { text:item1here, link: 0},
I've got a list in a Python program that contains a series of numbers,
I've got a list of items in an order to show in asp.net --
I've got a list of links which have a click event attached to them,
I've got a list of points, and a route that an external provider has

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.