Distance between two curves P=P1(t1) and P=P2(t2) for t1 in [a1,b1] and t2 in [a2,b2]
By narrowing the intervals I can improve the accuracy of the approximation
Q1, Q2: the closest points on the two curves,   d: their distance

a1   b1
a2   b2
Save by clicking here (with the right mouse button) the file on your computer
(change the name if you want, but leave ".htm").
At this point you can use it to calculate the distance between any pair of curves.
Just open the source code, edit x1(t) and y1(t), x2(t) and y2(t), and run "save".
You can repeat this several times.
abs(a)     / |a|                            log(a)   / log of a base e
acos(a)    / arc cosine of a                max(a,b)
asin(a)    / arc sine of a                  min(a,b)
atan(a)    / arc tangent of a               pow(a,b) / a to the power b
atan2(a,b) / arc tangent of a/b             random() / random n. in [0,1)
ceil(a)    / integer closest to a not < a   round(a) / integer closest to a 
cos(a)     / cosine of a                    sin(a)   / sine of a
exp(a)     / exponential of a               sqrt(a)  / square root of a
floor(a)   / integer closest to a not > a   tan(a)   / tangent of a
PI         / π