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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:42:42+00:00 2026-05-27T18:42:42+00:00

I got a problem to solve. Look at the picture: Image . Red filled

  • 0

I got a problem to solve. Look at the picture:
Image.

  • Red filled Ellipse is an obstacle.
  • Black dots are beginning and end of “road”.
  • Blue line, is shortest way from one point to another.

I draw obstacles using mouse (mouse click creates ellipse), then i put in cords of start and the end, and then i use DrawLine to draw line from point to point. The question here is, how can i check or count, how many pixels of line, goes trough obstacle?

I thought of putting every pixel color in a 2D array before drawing the line, and then check it somehow on the numbers, counting shortest way from point to point, and checking how many 255’s (obstacle number) would it meet in that array? As you see, i can create obstacle that way, so line will go trough the middle, just some part of it, or even next to it. I am simply lacking any idea how to do that. I need it, so i could rate every “road”. More it goes trough obstacle, the less rate it gets.

Any ideas? Any algorithm?

  • 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-27T18:42:43+00:00Added an answer on May 27, 2026 at 6:42 pm
    1. Using the equations of the ellipse and the line, find the intersection points of the line with the outline of the ellipse (there may be 2, 1 or no intersections). You can find a worked example of this here.
    2. If there are indeed 2 intersection points, use the distance formula to calculate the distance between them.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a problem I'm not sure how best to solve. I have an
I've got a small problem I'm struggling to solve. Let's say I've got an
I've got a problem to solve in Jython. The function I've got looks like
Here is problem I'm trying to solve. It's for logistics company. I got all
So I'm trying to solve this problem that asks to look for palindromes in
I got some problem with my FSLex which I can't solve... All I know
The responses I've got to this question have solved the problem I had in
i got problem with my code and hopefully someone able to figure it out.
I've got problem with connecting to MySQL database on my freshly installed Windows 7
Got a problem with ADOMD.NET 8.0, SQL2008 and our app. It isn't giving us

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.