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 8633381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:28:58+00:00 2026-06-12T09:28:58+00:00

Say I have a grid with 9 points: 1 2 3 4 5 6

  • 0

Say I have a grid with 9 points:

1       2     3


4       5     6



7        8    9

Each point / node can be connected to other nodes to form segments:

1       2     3
|
|
4       5     6
|       |
|       |
|       |
7-------8-----9

In this illustration, 1 is connected to 4, 4 is connected to 1 and 7, 7 is connected to 4 8, 8 is connected to 5 and 9, 5 is connected to 8, and 9 is connected to 8.

If I simply rendered this like this:

for each node n1
for each node n2 in n1
create segment from n1 to n2.

This would generate a lot of duplicate segments.

Would there be a way to do it so that I only create the necessary number of segments?

My goal is to be able to say, break the link between 1 and 4 and connect 1 and 5 together and regenerate the grid.

I’m trying to generate a simple city.

Thanks

  • 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-06-12T09:28:59+00:00Added an answer on June 12, 2026 at 9:28 am

    The structure illustrated in your ASCII drawings is called a graph. In particular, you are trying to generate a planar graph. There are several common ways to represent a graph data structure in a computer program.

    These Wikipedia links are very heavy on the mathematical theory, but I hope you find them helpful.

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

Sidebar

Related Questions

Let's say i have a 2d linear grid and a point in said grid.
Say, we have an N-dimensional grid and some point X in it with coordinates
Let's say I have some grid that looks like this _ _ _ _
a grid of NxN is given. each point is assigned a value say num
So my grid at this point dynamically expands to whatever height and I can
Say I have a grid of 5x5, with each cell in the grid numbered
Let's say I have a grid of squares, each with their coordinates (x and
Say I have a grid, I click an object and it displays in a
Say I have a Telerik MVC Grid, AJAX bound and I want to put
Say I have a very simple WPF grid (6 rows x 6 columns) defined

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.