6

Is there a simple formula for a tight approximation of the torus knot length ? (specifically a formula that does not involve integrals or any iterative procedures). The torus knot parameters are $(p, q, R, r)$ where $(p,q)$ are co-primes and $R$ is major axis and $r$ is minor axis of the torus.

Note: The approximation formula I am looking for is for generating a torus knot curve in a $3D$ application and for this purpose I need to know how many control points to define for the whole torus knot curve such that the sampling is neither too sparse nor too dense.

Basically I would like to figure out an adaptive curve resolution algorithm that would adjust the number of control points based on the $(p,q,R,r)$ values set by the user interactively. An exact length of the curve would be preferable if this could be computed fast enough to be interactive (e.g. user can change parameters and the curve updates in real time based on code written in python).

What I have tried so far for my approximation of the number of control points is: $(pR + qr ) \times 20$, as if the "revolution" circles around the torus center and the "spin" circles around the torus tube are decoupled circles (e.g. $p$ revolution circles and $q$ spin circles total) multiplied by ($20$) number of points per unit length.

I arrived to this formula more or less by by trial and error and I'd like to get a tighter approximation of the torus knot length than this formula.

JMP
  • 22,637
DolphinDream
  • 203
  • 1
  • 6
  • 1
    Sure, for example $2\pi(R - r)$, the circumference of the inner latitude. If (as I guess) that's not the type of lower bound you're seeking, could you please add details to your question (how tight of bounds do you need, how computable, ...), and perhaps say what you've tried? Thanks. :) – Andrew D. Hwang Nov 11 '15 at 02:05

1 Answers1

5

The usual parametrization of a torus knot is $$ \left. \begin{aligned} x(t) &= \bigl(R + r\cos(pt)\bigr) \cos(qt), \\ y(t) &= \bigl(R + r\cos(pt)\bigr) \sin(qt), \\ z(t) &= r\sin(pt), \end{aligned} \right\} \qquad 0 \leq t \leq 2\pi. $$ The arc length is $$ \ell = \int_{0}^{2\pi} \sqrt{p^{2} r^{2} + q^{2}\bigl(R + r\cos(pt)\bigr)^{2}}\, dt. $$ Since $$ (R - r)^{2} \leq \bigl(R + r\cos(pt)\bigr)^{2} \leq (R + r)^{2}\quad\text{for all $t$,} $$ the arc length satisfies $$ 2\pi \sqrt{p^{2} r^{2} + q^{2} (R - r)^{2}} \leq \ell \leq 2\pi \sqrt{p^{2} r^{2} + q^{2} (R + r)^{2}}. $$ Is that close enough for your purposes?

  • 2
    This is perfect! Thank you so much. I actually decided to take the average of the lower and the upper bound you provided for my approximated length. :) It works great! – DolphinDream Nov 15 '15 at 00:10
  • You're very welcome; glad to hear the scheme works for you. – Andrew D. Hwang Nov 15 '15 at 00:32
  • Is there a way to adjust this estimate to provide bounds for the length of a subarc of a torus knot? – AegisCruiser Feb 16 '16 at 16:45
  • 1
    @AegisCruiser: The exact length for an arc is given by adjusting the bounds of integration. Depending how close these are (particularly, if they're separated by less than one period, $2\pi/p$, you should be able to get a decent approximation using either the trapezoid or midpoint method with a modest number of subintervals. – Andrew D. Hwang Feb 16 '16 at 18:57
  • Oh certainly, that makes a lot of sense. Thank you. – AegisCruiser Feb 16 '16 at 19:52