Okay so I'm pretty decent at maths, and fair at programming but I have no idea how I'd actually write mathematical line equations or check for intersections in script. Any tutorials or examples please?

Google the Bentley-Ottman algorithm.

Especially check out the Bartushka, Melhorn and Naeher article on the Wikipedia page.

Especially check out the Bartushka, Melhorn and Naeher article on the Wikipedia page.

Last edited on

I know how to find points of intersections given 2 linear equations by making them equal to each other and simply moving things about... But I think this method is a bit too abstract to stick into a computer isn't it?

And yes... google, will do...

EDIT: Well at the moment I'm not understanding an awful lot of it but it is 03:27 so I'll re-read when I'm a little more aware tomorrow, (further suggestions sill welcome)

And yes... google, will do...

EDIT: Well at the moment I'm not understanding an awful lot of it but it is 03:27 so I'll re-read when I'm a little more aware tomorrow, (further suggestions sill welcome)

Last edited on

I just did a whole huge post on this.

http://www.cplusplus.com/forum/general/107141/2/#msg581596

Skip down to "THE MATH" section.

http://www.cplusplus.com/forum/general/107141/2/#msg581596

Skip down to "THE MATH" section.

Oh cheers man, I've already been reading that post and noticed you've got a fair mind in it but I didn't keep going and I didn't notice "THE MATHS" bit on it :)

Topic archived. No new replies allowed.