_the_beginner_'s blog

By _the_beginner_, history, 4 years ago, In English

Hi, i am now learning to solve geometric problems. I need to cross two lines. On the internet i found only solution through solving the system of equations, but i heared there is another solution that uses vector (dot / cross) product. Could you tell me there i can read about it or explain/give me the code.

  • Vote: I like it
  • -16
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +6 Vote: I do not like it

I wondered about the same when I solved UVa 378 — Intersecting Lines: You could solve it using Linear Algebra, however I read a interesting solution that used cross product to solve it. After a little search I found that It was solved using homogenous coordinates.

Here is my submission for UVa 378 using that method : https://gist.github.com/same-lame-name/08b61e6e3f77451b1da64773a02b7489

Most importantly there is a quora answer that will definitely help : https://qr.ae/pNvxQ4

this is my first comment. So, sorry if this comes out ill formatted.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Here is nice tutorial on using c++'s complex. There is a chapter about intersection there.