1

I'm trying to impose a sine wave onto two different curves, sort of similar to this old question about an Archimedes spiral. Unfortunately I can't figure out how to incorporate the new sine wave into the more complex equations I'm dealing with.

The trefoil equation:
$x = sin(t)-2*sin(2*t)$
$y = cos(t)+2*(cos(2*t)$
$z = 3*sin(3*t)$

And the second curve:
$x = (15+sin(t/2))*cos(t)$
$y = (15+sin(t/2))*sin(t)$
$z = (15*cos(t/2)$

With t ranging from -2 pi to 2 pi. In both cases the new sine wave will have a length of 4 pi, though I would like to be able to change the position of nodes/antinodes within the curves.

  • For a sloppy way, you can just add 0.1sin(100t) to some or all of these (or cos). But the real problem is that you would need to pick a plane for the sine curves to live in as you run through the original curve. Some of the ways you view this will make the sine curve look flat from some direction. So you might need to re-evaluate what you are trying for. Would you prefer a spiral around the curve instead of a sine wave? – N. Owad Nov 16 '22 at 16:22
  • It would have to be in the direction of movement, unfortunately. So if the base line is (hypothetically) along the x=y then the sine wave would contribute equally to the x and y axes. – WaveInPlace Nov 16 '22 at 18:24

2 Answers2

1

I see you found an answer you are happy with, but I wanted to give my result anyway, which basically works for any parametric curve in $\mathbb{R}^3$.

All you really need to do is calculate the binormal (or normal if you choose) vector and multiply it by $b\sin(ct)$, for chosen small $b$ and large $c$, then add that to the original. If $r(t)$ is the vector valued function with your $x,y,$ and $z$, and $B$ is your binormal, then $$r(t) + b\sin(ct)B(t)$$

Here is what it looks like in Maple for $b=0.075$ and $c=200$. I was going to try to reparametrize by arclength, but it looks pretty decent as is, and Maple was not enjoying trying to compute the arclength integral. trefoil knot with a sine wave instead of the smooth curve.  It is rather jaggy looking

This might be a useful website: https://janakiev.com/blog/framing-parametric-curves/.

Update

As requested, here is the Maple code I used. I am sure it is rather close to any other software you might be doing this in. I was looking at both the normal and the binormal, which is why used the TNB frame. That just computes the tangent (T), normal (N), and binormal (B), all together, so tnb[3] is just grabbing the binormal and not using the other ones.

with(VectorCalculus);

fx := t -> sin(t) - 2sin(2t); fy := t -> cos(t) + 2cos(2t); fz := t -> 3sin(3t); r := t -> <fx(t), fy(t), fz(t)>;

b := 0.075; c := 200; k := t -> bsin(ct);

tnb := TNBFrame(r(t)); g := t -> r(t) + k(t)tnb[3]; plot3d(g(t), t = 0 .. 2Pi, numpoints = 10^6);

N. Owad
  • 6,822
  • That does seem a lot more general! Would you happen to have the code for the curve you've drawn here? I wasn't able to make heads or tails of the site you linked to. – WaveInPlace Nov 25 '22 at 12:59
  • @WaveInPlace Here it is. Let me know if this is not helpful and I will see what I can do. – N. Owad Nov 27 '22 at 16:02
0

Answering for those that may come after:

The solution was actually a lot simpler than I thought. This is layering a sine/cosine wave on top of another sine/cosine wave with the same phase/wavelength. So, just adjust the amplitude.

For the second curve: x=(15+sin(t/2))∗cos(t) -> x=0.9*(15+sin(t/2))∗cos(t) y=(15+sin(t/2))∗sin(t) -> y=0.9*(15+sin(t/2))∗sin(t) z=(15∗cos(t/2) -> z=0.95*(15∗cos(t/2)

The first curve is more complicated, but the same principle applies.