The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Inactive » 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*)
(* E2 %80 \
%93 Bonnet_theorem*)
NIntegrate[Sum[k[t][[i]], {i, 1, Length[k[t]]}], {t, 0, 2*Pi}], {n,
1, Length[a]}]
Table[p /.
Sum[k[t][[i]], {i, 1, Length[k[t]]}], {t, 0, 2*Pi}] -
2*Pi (2 - 2*p) == 0, p], {n, 1, Length[a]}]

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.