DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Can Cloud-Native Computing Eliminate Technical Debt?

Trending

  • A Complete Guide to Open-Source LLMs
  • Understanding Europe's Cyber Resilience Act and What It Means for You
  • DevOps Uses a Capability Model, Not a Maturity Model
  • Adopting Agile Practices for Workforce Management: Benefits, Challenges, and Practices

Total Curvature of a Knot

Check out this practical application of the Fary-Milnor theorem.

John Cook user avatar by
John Cook
·
Oct. 03, 19 · Tutorial
Like (2)
Save
Tweet
Share
5.85K Views

Join the DZone community and get the full member experience.

Join For Free

knot-on-deck-of-dock


Tie a knot in a rope and join the ends together. At each point in the rope, compute the curvature (i.e. how much the rope bends, and integrate this over the length of the rope). The Fary-Milnor theorem says the result must be greater than 4π. This post will illustrate this theorem by computing numerically integrating the curvature of a knot.

You may also like: Fame, Difficulty, and Usefulness.

If p and q are relatively prime integers, then the following equations parameterize a knot.

    x(t) = cos(pt) (cos(qt) + 2)
    y(t) = sin(pt) (cos(qt) + 2)
    z(t) = -sin(qt)

This is, in fact, a torus knot because the curve stays on the surface of a torus (doughnut). We can get a trefoil knot, for example, by setting p = 2 and q = 3.

trefoil knot

Trefoil knot

We’ll use Mathematica to compute the total curvature of this knot and other examples. First the parameterization:

    x[t_, p_, q_] := Cos[p t] (Cos[q t] + 2)
    y[t_, p_, q_] := Sin[p t] (Cos[q t] + 2) 
    z[t_, p_, q_] := -Sin[q t]


We can plot torus knots as follows:

    k[t_, p_, q_] := { 
        x[t, p, q], 
        y[t, p, q], 
        z[t, p, q]
    }
    ParametricPlot3D[k[t, p, q], {t, 0, 2 Pi}]


Here’s a more complicated knot with p = 3 and q = 7.

(3,7)-knot

(3, 7) knot

Before we can integrate the curvature with respect to arc length, we need an expression for an element of arc length as a function of the parameter t.

    ds[t_, p_, q_] :=  Sqrt[ 
        D[x[t, p, q], t]^2 + 
        D[y[t, p, q], t]^2 + 
        D[z[t, p, q], t]^2
    ]


Now, we can compute the total curvature.

    total[p_, q_] := NIntegrate[
        ArcCurvature[k[t, p, q], t] ds[t, p, q], 
        {t, 0, 2 Pi}
    ]


We can use this to find that the total curvature of the (2,3) torus knot, the trefoil, is 17.8224, whereas 4π is 12.5664. So the Fary-Milnor theorem holds.

Let’s do one more example, this time a (1,4) knot.

an unknot

An unknot

You can see that this is not actually knot. This doesn’t contradict what we said above because 1 and 4 are not relatively prime.

When we compute its total curvature we get 24.2737, more than 4π. The Fary-Milnor theorem doesn’t say that total curvature in excess of 4π is a sufficient condition for a loop to be knotted; it says it’s necessary. Total curvature less than 4π proves that something isn’t a knot, but curvature greater than 4π doesn’t prove anything.

If you change out the 2s in the parameterization with a larger number, it’s easier to see from the graphs that the curves are on a torus. For example, if we plot the (3,7) knot again, replacing 2’s with 5’s, we can kinda see a torus inside the knot.

    ParametricPlot3D[
         {Cos[3 t] (5 + Cos[7 t]), 
          Sin[3 t] (5 +  Cos[7 t]), 
          Sin[7 t]}, {t, 0, 2 Pi}]


knot (3,7) with a larger radius

knot (3,7) with a larger radius



Further Reading

  • Introduction to R: The Statistical Programming Language.
  • How to Write R Script Explained with an Awesome Example.
  • How to Call Python From Mathematica, Including NumPy.
Knot

Published at DZone with permission of John Cook, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Can Cloud-Native Computing Eliminate Technical Debt?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: