' - - File: IX_Extra1.txt
'  Radius of curvature = | R'{t} |^3  /  |R'{t} x R''{t}  |
' Note: sPwr[, explained in the document, not listed on the keyboard pad.

F<t> = <t, t^3 /8 - 2*t, 0>
R{t} = sDiv[sPwr[sMag[vDiff[F]],3], sMag[vCross[vDiff[F],vDiff[F,2]]]]

' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

'   Step 1:  Plot the curve, Fa{t}; find its derivative , Df{t}, & plot to estimate the zeros. See Unit IIIZeros Files.
Fa{t} = t^3 /8 - 2*t  :  Df{t} = Diff[Fa,t]  :  Dp<t> = <t, Df, 0>
t0 = -4 :  tf = 4 : n = 200
'Plot[F, Dp,{t, t0,tf,n}]              ' (Shown inactive after the plot--see below.

' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'   Step 2:  Observe the graph and bracket the zeroes. Set the tolerance.
to = 0.001  ' Tolerance for the zero accuracy.
Zero[Df,{-3,-2,z0}to]               ' Assign z0, zerocrossing; leave undefined.
Za{t} = z0
Zero[Df,{2,3,z1}to]                  ' Assign z1, zero crossing; leave undefined.
Zb{t} = z1
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' Execute above and locate the zeros. 
' Find the coordinates for the min/max given the zeroes of the 2nd derivative.
c1 = Fa{z0}  :  c2 = Fa{z1}     '  Check the graph if values are reasonable.
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'   Step 3: Draw the circles with the proper offsets.
'    c1 (& c2) as centers, compute both Rc{c1} and Rc{c2} for both circles..

ra = R{z0}  :  rb = R{z1}
Ra<t> = <ra*Cos[t] +z0, ra*Sin[t] + (c1 - ra), 0 >       ' First parametric equation for circle.
Rb<t> = <rb*Cos[t] +z1, rb*Sin[t] + (c2 + rb), 0>       ' Second equation.

' Comment  out the above Plot command & rewrite:
Plot[F, Ra, Rb, {t, t0, tf, n}]
<t=1>   ' Any value to enable worksheet display for checking.




