Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: KnotData not working right
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Roger Bagula

Posts: 101
Registered: 7/12/09
KnotData not working right
Posted: Oct 8, 2012 2:52 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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 \
Gauss-Bonnet 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[%]




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.