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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:15:45+00:00 2026-06-08T05:15:45+00:00

I have several random line segments. I have to check if there is any

  • 0

I have several random line segments. I have to check if there is any intersection between any two line segments. Lines may be connected or not. What would be a good algorithm for this problem?

  • 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-08T05:15:46+00:00Added an answer on June 8, 2026 at 5:15 am

    Assuming you’re talking about line segments here (otherwise, simply compare the slopes of the lines: if they have unequal slopes, they intersect).

    To find out if a [single] intersection exists in a set of 2 or more line segments, you can use the Shamos-Hoey algorithm.

    To find all intersections in a set of 2 or more line segments, you can use the Bentley-Ottmann algorithm.

    Implementation of the two, and other “sweep-line” based algorithms, are abundantly available on the internet.

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

Sidebar

Related Questions

I know there have been several posts about random word generation based on large
I have several blocks that look like this: <div class='templatechoicedesigncss'> <img src='/images/templatepics/random(100x140).png' /> <p>
I have several listviews with two collumns like. I am building a stats application
I have several strings: (def a some random string) (def b this is a
I have several threads running concurrently and each of them must generate random numbers.
I have several independant int variables in my program. Is there a way I
I have several thousand text strings where the IMDB occures in fairly random positions,
The symptoms: I have the push_listener_concurrency set to broadcast but only several (random amount)
I have a question about random entries in Rails 3. I have two models:
I have several processes in which I use System.Random's default constructor to generate random

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.