This is the code I use for intersecting lines I dont know who the original author is but it works perfectly. though I think you should look into that page on the wiki cos this is for straight lines and not really for curves anyways it might be of use to you its written in yabasic but that shouldnt be a problem
sub seg2seg(px,py,nx,ny, x1,y1,x2,y2)
local denom
denom = (y2-y1)*(nx-px) - (x2-x1)*(ny-py)
if (denom = 0.0) return 0
local nume_a
nume_a = ((x2-x1)*(py-y1) - (y2-y1)*(px-x1)) / denom
if (nume_a < 0.0) or (nume_a > 1.0) return 0
local nume_b
nume_b = ((nx-px)*(py-y1) - (ny-py)*(px-x1)) / denom
if (nume_b < 0.0) or (nume_b > 1.0) return 0
xi = px + nume_a*(nx-px)
yi = py + nume_a*(ny-py)
return 1
end sub