
KnotData not working right
Posted:
Oct 8, 2012 2:52 AM


I did this with torus knots and got a spectrum of results but using the built in KnotData[] I only get one result that is much higher: a = KnotData[All] (* knot definition*)
w = {x, y, z} = KnotData[a[[n]], "SpaceCurve"][t] (* Gaussian curvature definition for the curve*) r[t_] = w mag[v_] := Sqrt[v[[1]]^2 + v[[2]]^2 + v[[3]]^2] w2 = Cross[r'[t], r''[t]] k[t_] = Cross[r'[t], r''[t]]/mag[r'[t]]^3 (* calculation of surface Integral of Gaussian curvature by the \ GaussBonnet theorem*) (*http://en.wikipedia.org/wiki/Gauss% E2 %80 \ %93 Bonnet_theorem*) Table[ NIntegrate[Sum[k[t][[i]], {i, 1, Length[k[t]]}], {t, 0, 2*Pi}], {n, 1, Length[a]}] Table[p /. Solve[NIntegrate[ Sum[k[t][[i]], {i, 1, Length[k[t]]}], {t, 0, 2*Pi}]  2*Pi (2  2*p) == 0, p], {n, 1, Length[a]}] ListLinePlot[%]

