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.


Thank you in advance for any help.

  • $\begingroup$ It seems like you're just shifting the sine wave without any sort of rotation. Is that correct? $\endgroup$ Feb 29, 2016 at 20:29
  • 1
    $\begingroup$ I suspect "numerical methods" may be the best you can do with these formulas. But did ancient people really draw sine waves (or curves at fixed distances from sine waves) at all, let alone using only compass and straightedge? $\endgroup$
    – David K
    Feb 29, 2016 at 20:33
  • $\begingroup$ I don't think I understand your question. If you just want to shift the sine upwards or downwards, you can just add a constant? $\endgroup$ Feb 29, 2016 at 20:46
  • 1
    $\begingroup$ Definitely not just shifting, an offset is what I'm going for. In the attached jpeg you'll see that what's draw isn't quite a sine wave. It's parallel to a sine wave though. $\endgroup$ Feb 29, 2016 at 21:00
  • $\begingroup$ You want something which is simply not there. You know the parametric expression, you know that it would not convert to explicit form, and still you want to convert it to explicit form. Then again, maybe you don't need all those parallel curves? Maybe a simple vertical offset (the way it is done in your picture) will suffice? $\endgroup$ Apr 28, 2017 at 9:26

3 Answers 3


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.


You cannot solve for $t$ from second equation and plug it into the first ( or the other way, first into the second). So $y=f(x)$ form is not possible.

As it is parametric form is fine. If the base curve is not closed form like the sine curve but available in a parametrized form then a differential equation of a parallel curve can be defined using the normal offset direction.Entire thing can be numerically integrated. And, as it is here only in a plot we can see it composed together.

Maybe the ancients appreciated art more than accuracy not available then.

The lines are not strictly parallel (In 3-space called Bertrand surfaces) . Braids can be filled with 3 colors, two colors overlap, first orange one (needles) remain so.

enter image description here


If $\gamma(t) = \bigl(u(t), v(t)\bigr)$ is a parametrization of a plane curve ($t$ in some interval of real numbers), and if the component function $u$ is one-to-one (i.e., does not achieve the same value at two distinct $t$, so that $\gamma$ traces the graph of some function), then $(x, y) = \gamma(t)$ satisfies $y = f(x)$ is and only if $v(t) = f\bigl(u(t)\bigr)$ for all $t$ in $I$, in and only if $$ f = v \circ u^{-1}. $$ In words, an explicit formula $y = f(x)$ for a graph traced by a parametric curve relies implicitly on one's ability to invert the component function $u$ (i.e., to solve for the parameter), and in practice "usually" depends explicitly on being able to invert $u$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.