[Math] Parallel curve to a sine wave

calculusderivatives

I've been trying to find the formula for the offset/parallel to a sine wave. Not just the parametric equation, but the y = f(x) form.

Here's what I've done so far:
Read up on the parametric form and plugged in the x(t) and y(t) formulas. What I get is of course a parametric equation in terms of t.

If $$ y = \sin x $$

then the parameterization would be
$$ x = t $$
$$ y = \sin t $$

Plugging in the offset formula:

$$ x_d(t) = t + \frac{d\cdot\cos t}{\sqrt{1 + \cos^2 t}} $$
$$ y_d(t) = \sin t – \frac{d}{\sqrt {1 + \cos^2 t}} $$

Now, that's all accurate, but it doesn't put it into a function form. According to my calculus book, the next step is to solve each of these for t and then set them equal to one another. The problem is that they are kind of a mess, with those sinusoidal functions involved.

My question is: What's the y = f(x) form for an offset curve of a sine wave?

A little background: I need this because I'm trying to find the intersection point when 3 offsets of three $\pi\over3$-out-of-phase to each other sine waves intersect. Basically where the green, blue and red intersect at the same time in the link below. I can find it numerically, but I'd like it exactly because it's something of discovery to find out how the ancient people drew braids using just compass and straight edges.

I can draw it no problem in C#:
The intersection point was found using trial and error and is approximately 0.63. There are two blue lines, two red lines and two green lines, because I used +0.63 offset and -0.63 offset from the sine wave.

http://postimg.org/image/un06qseiv/

Thank you in advance for any help.

Best Answer

visualizing things in WebGl can help: https://www.shadertoy.com/view/XsByzd shows the assumption that the 2 points, p.xy, and the point on sin(x) that is closest to p.xy, are both on a line that is is 90° to y=cos(x);

you are not alone, finding the euclidean distance (or a good upper bound) of a point to any integral or surface is a core problem of procedural textures and raymarching (=sphere tracking), the iterative approach to raytracing, finding the intersection of a ray with anything (analytically).

there are some helpful identities for inequalities, useful for good upper bounds. like, knowing that: something => distance => somethingElse.