1

I am trying to figure out how to control the equation to make a controllable equidistantly sine wave(or you can say same period sine wave) on spiral with some parameters.

I want to Offset a constant distant d on a spiral.

I successfully made a equation of Archimedean Spiral which can be controlled by some parameters. BUT the sine waves are not same period. The parametric form of Archimedean Spiral is: $$x(t) = a\cdot t\cdot \cos(t)$$ $$y(t) = a\cdot t\cdot \sin(t)$$

To make a distant d, I need to know the Normal unit vector of the equation. First I differentiate the parameter formula to obtain the tangent vector(T1) and I get: $$T1 = (a\cdot cos(b\cdot t)-b\cdot t \cdot sin(b\cdot t), b\cdot t \cdot cos(b\cdot t)+ a\cdot sin(b\cdot t))$$

then normalize T1 by Wolfram(1) can get T2; $$T2 = (a\cos(bt)-bt\sin(bt), bt\cos(bt)+ a\sin(bt))\frac{1}{\sqrt{b^2 t^2 + 1}}$$

Next, differentiate T2 to get Normal vector N1 by Wolfram(2)

get N1 and simplify: $$N1 = (-\sin(bt)-bt\cos(bt), \cos(bt)-bt\sin(bt))\frac{b(b^2 t^2 + 1)}{\sqrt{b^2 t^2 + 1}^(3/2)}$$

the unit vector of N1 will be N2 show as: $$N2 = (\sin(bt)+bt\cos(bt), -\cos(bt)+bt\sin(bt))\frac{-1}{\sqrt{b^2 t^2 + 1}^(1/2)}$$

So a point P on the spiral offset along the normal direction with a distant d can be like: offset d

then I change d to d'; d' = d(1 + A * sin(25t)) to make 25 sine waves on the spiral, and the amplitude can be control by parameter A(it is from 0 ~ 1) I draw on Desmos to show out :https://www.desmos.com/calculator/kvtd6aihab Desmos draw Watch the gif in the comments' link[gif]

I wonder how to fix the equation to make every sine wave have the same period. I found some similar example. Equation of sine wave around a spiral? this one is about same period sine wave. $$x(t) = (at + \sin(bt^2)) \cos(t)$$ $$y(t) = (at + \sin(bt^2)) \sin(t)$$

I try some ways on my desmos. I add some exponential parameter to decay the sine wave but it's not good enough https://www.desmos.com/calculator/89yyu30xcr

So I try to use MATLAB to do the same calculation steps but always fail

MY GOAL:

1.Use the MATLAB to do the same steps as original Archimedean Spiral equation on the same period sine waves equation $$x(t) = (at + \sin(bt^2)) \cos(t)$$ $$y(t) = (at + \sin(bt^2)) \sin(t)$$ 2.Add some decay equation on the offset d equation to make every sine wave same period.

Please help me! Thank you!

MuLin
  • 21
  • MORE LINKS down there: Wolfram(1): reurl.cc/83044y Wolfram(2): reurl.cc/XWmOvR Desmos Gif[gif]: i.stack.imgur.com/qWQFb.gif – MuLin Jun 27 '21 at 07:31

1 Answers1

1

$\newcommand{\Vec}[1]{\mathbf{#1}}$Not entirely sure I understand what you're asking, but briefly, the period of the sine is non-constant because the spiral is not parametrized at constant speed.

Here are some ideas, including suggestions for managing the calculations manually and framing in terms of the differential geometry of plane curves, that are too long for a comment.

Let $a > 0$ be a real number. The Archimedean spiral $x(t) = at\cos t$, $y(t) = at\sin t$ is a polar graph $r = at$. Let's first work out some formulas for general polar graphs.

Generalities: The polar graph $r = f(t)$ and its derivatives are conveniently expressed in terms of the orthonormal vector-valued functions $$ \Vec{e}_{1}(t) = (\cos t, \sin t),\quad \Vec{e}_{2}(t) = \Vec{e}_{1}'(t) = (-\sin t, \cos t). $$ We have $(x(t), y(t)) = f(t) \Vec{e}_{1}(t)$, so the product rule gives $(x'(t), y'(t)) = f'(t) \Vec{e}_{1}(t) + f(t) \Vec{e}_{2}(t)$. The unit tangent vector is $$ T(t) = \frac{f'(t) \Vec{e}_{1}(t) + f(t) \Vec{e}_{2}(t)}{\sqrt{f(t)^{2} + f'(t)^{2}}}. $$ A unit normal field may be found by rotating this a quarter turn counterclockwise: $$ N(t) = \frac{f'(t) \Vec{e}_{2}(t) - f(t) \Vec{e}_{1}(t)}{\sqrt{f(t)^{2} + f'(t)^{2}}}. $$

The remaining issue in "deforming" the polar graph in a controlled way is to parametrize by arc length. This can always be done in principle, but cannot always be done in closed form. Fix a starting parameter $t_{0}$, and define the arc length function by $$ s(t) = \int_{t_{0}}^{t} \sqrt{f(u)^{2} + f'(u)^{2}}\, du. $$ This is strictly increasing (unless we try hard to make it otherwise), so there is an inverse function $t = \tau(s)$. Substituting, we obtain the unit speed parametrization $$ X(s) = (x(\tau(s)), y(\tau(s))) = f(\tau(s)) (\cos \tau(s), \sin \tau(s)). $$ Because $T$ and $N$ are geometrically-defined, $T(t) = T(\tau(s))$ and $N(t) = N(\tau(s))$.

If we perturb $X$ by a fixed-frequency (with respect to arc length) sine wave, the period will be constant.

Archimedean spiral: We have $f(t) = at$, so $f'(t) = a$, $\sqrt{f(t)^{2} + f'(t)^{2}} = a\sqrt{1 + t^{2}}$, and $$ s = a \int_{0}^{t} \sqrt{1 + u^{2}}\, du = \tfrac{1}{2}a[t\sqrt{1 + t^{2}} + \ln(t + \sqrt{1 + t^{2}})]. $$ (This may also be written in terms of hyperbolic functions.) In order to parametrize the Archimdean spiral by arc length, we have to invert this functional relation, which appears to be doable only numerically. Let's continue to write $t = \tau(s)$ for the inverse.

We have $X(s) = a\tau(s)(\cos\tau(s), \sin\tau(s))$ and $$ N(\tau(s)) = \frac{(-\sin\tau(s), \cos\tau(s)) - \tau(s)(\cos\tau(s), \sin\tau(s))}{\sqrt{1 + \tau(s)^{2}}}. $$ To parametrize the curve offset by a distance $d = g(s)$, we may use $X(s) + g(s)N(\tau(s))$.

  • Thank you for your reply! These steps make me more understand what I am calculating at . – MuLin Jun 28 '21 at 04:22
  • I think what makes me stuck is the form of Archimedean spiral equation. I just found out another equation to show Archimedean spiral: x(t) = (a + bt)cos(t) ; y(t) = (a + bt)sin(t). I think this form is more similar to my target equation showed on above. – MuLin Jun 28 '21 at 04:31
  • I am calculating the equation by using these steps. Will the form affect the result? And can I do the same steps on this equation? – MuLin Jun 28 '21 at 04:35
  • Or should I change the form of the same period sine waves equation? And How? – MuLin Jun 28 '21 at 05:09
  • If instead $f(t) = a + bt$, then $f(t)^2+f'(t)^2=b^2+(a+bt)^2$, which has the same abstract form as if $f(t) = at$. The arc length integral is still elementary in the technical sense, and there will be the same obstacle to inverting explicitly, but otherwise everything still stands. – Andrew D. Hwang Jun 28 '21 at 13:39