I am trying to plot a titled(7% to right side) sine wave type line whose length is 400 units and height of the wave is 90 units. I want the equation to be in the cartesian coordinates. kindly help me to resolve this problem.enter image description here

y = a * Sin [(x-h)/b] + k

I have tried this simple equation of sine wave to plot the following points and this plotnis symmetrical. Now my target is to shift or tilt the peak little bit towards the right side.

  • $\begingroup$ What have you tried? Also, there are many other parameters of interest for a "sine wave type" like frequency and phase. $\endgroup$
    – Pillsy
    Commented Dec 7, 2018 at 19:09
  • $\begingroup$ sir i have modified my question. $\endgroup$ Commented Dec 7, 2018 at 19:24

2 Answers 2


Standard sine wave height 90 and period 400.

y == 90 Sin[(2 π x)/400]

You want a 7% tilt which I assume means the offset is 0 at y = 0, so the offset should be proportional to the Abs[y]

Tilted equation.

y == 90 Sin[(2 π (x - .07 Abs[y]))/400]

We have a transcendental equation, so use FindRoot.

Table[{x, y /. FindRoot[ y == 90 Sin[(2 π (x - .07 Abs[y]))/400], {y, Sin[x]}]}, {x, 0, 400, 10}];

p1 = ListPlot[%];

Compare with unaltered sine wave.

p2 = Plot[90 Sin[(2 π x)/400], {x, 0, 400}];

Show[p1, p2]

enter image description here

If you meant the tilt to be to the left for negative y's, use y instead of Abs[y].

  • $\begingroup$ thank you, sir, your answer is very helpful. the plot is perfect but I have a little confusion about the FIndRoot command I want the simple equation which I could use in "Gmsh" meshing software to plot my required 3D structure. Gmsh did not provide any FindROot command. kindly please guide me about this and suggest me some method by which I can get the points without using FindRoot command $\endgroup$ Commented Dec 9, 2018 at 20:14
  • $\begingroup$ I'm not familiar with Gmsh and have no idea about its computing capabilities. If you can't feed the table of points computed with Mathematica into the other program, but must compute with that program, this is probably the wrong forum for that question. You could compute points from the inverse; that is, find x given y` by x == (7*Pi*Abs[y] + 20000*(2*Pi*n + ArcSin[y/90]))/(100*Pi) where n is an integer. $\endgroup$
    – Bill Watts
    Commented Dec 9, 2018 at 22:47
a=1;h=0;b=1;k=0; (* or whatever you wanted *)
tiltPercent = .07; (* or whatever percent *)
y = (a * Sin[(x-h)/b] + k) - (tiltPercent*x)
Plot[y, {x,0,10}] (* or whatever range *)

Unless I'm misunderstanding the question (very possible) this is not a plotting question, but a question on how to mathematically decrease the Sin[] function linearly. Let me know if this helps, or I'm way off what you were looking for!

  • $\begingroup$ sir, you have rotated the wave and by this, every peak is higher than the previous one. I want the sinusoidal which should not be vertically shifted. $\endgroup$ Commented Dec 8, 2018 at 13:58
  • $\begingroup$ So when you say tilted to the right, do you mean the entire box containing the plot should be tilted? How do you plan to tilt the plot without a vertical shift? Perhaps you could draw by hand what you want and upload a scanned picture of it so we can get a better idea? $\endgroup$ Commented Dec 9, 2018 at 16:37
  • $\begingroup$ respected sir, by tilt to right i mean the peak of the wave should be tilted towards right side and there should be not change in the horizontal plot. $\endgroup$ Commented Dec 9, 2018 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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