Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Intersection of lines

Author
Message
Manson
21
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 8th Nov 2002 02:30
Does anybody have a function for checking if 2 lines cross each other?

Not where they intersect, just if they do,,,
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 8th Nov 2002 05:24
Hope this works



"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 8th Nov 2002 16:51
Perhaps that last line should be:

if (ua# >= 0.0) and (ua# <= 1.0) and (ub# >= 0.0) and (ub# <= 1.0) then exitfunction 1

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
Manson
21
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 8th Nov 2002 20:37
Thanks!
I'll check it out!
BTW: I'll use it to create a function to draw polygon-objects of triangles,,, With the possiblity of 'holes' or 'islands' inside them.
Primeraly for use as floors/ceilings in FPS games,,,
You want a copy when it's done?

Login to post a reply

Server time is: 2024-04-25 16:24:07
Your offset time is: 2024-04-25 16:24:07