Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12002

KnotData not working right

From Roger Bagula <roger.bagula@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject KnotData not working right
Date 2012-10-08 06:52 +0000
Message-ID <k4tt7l$sf3$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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[%]

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

KnotData not working right Roger Bagula <roger.bagula@gmail.com> - 2012-10-08 06:52 +0000

csiph-web