Calculate number of roads/lines a line crosses

  • Thread starter Thread starter Rich2020
  • Start date Start date
  • Tags Tags
    Line
Rich2020
Messages
4
Reaction score
0
Hi guys,

I have a really tricky problem here and I'm hoping that there is a math guru here who can help.

The problem

Using Google maps, I need to allow a user to draw a line. This line can be in any direction and basically, I need to determine if the user has drawn the line over a road and if so, how many.

Below is an example:
The image doesn't seem to be showing so here is the link: http://postimg.org/image/iuj9e8jfj

With Google Directions service, I am able to get the nearest road of the dropped marker (markers indicated by arrow in image).

For a single road, I believe that I can do this with Pythagoras, but for multiple roads by brain starts to boil.

If anyone here could help, I'd really appreciate it. I appreciate it is pretty tough so I'm open to all suggestions.

Thanks!
 
Last edited by a moderator:
Mathematics news on Phys.org
I really don't understand what you want to do. Do you want to calculate he number of roads the line is intersecting?
 
adjacent said:
I really don't understand what you want to do. Do you want to calculate he number of roads the line is intersecting?

Yes, exactly that :)
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top