MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

KnotData not working right

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128344] KnotData not working right
  • From: Roger Bagula <roger.bagula at gmail.com>
  • Date: Mon, 8 Oct 2012 02:32:44 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

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



  • Prev by Date: Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • Next by Date: .NET/Link and freeware
  • Previous by thread: Re: using built in compiler
  • Next by thread: .NET/Link and freeware