# plotting tilted sine wave

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. 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.

• What have you tried? Also, there are many other parameters of interest for a "sine wave type" like frequency and phase. – Pillsy Dec 7 '18 at 19:09
• sir i have modified my question. – Muti Ur Rehman Khan Dec 7 '18 at 19:24

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] If you meant the tilt to be to the left for negative y's, use y instead of Abs[y].

• 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 – Muti Ur Rehman Khan Dec 9 '18 at 20:14
• 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. – Bill Watts Dec 9 '18 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!

• 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. – Muti Ur Rehman Khan Dec 8 '18 at 13:58
• 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? – Reedinationer Dec 9 '18 at 16:37
• 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. – Muti Ur Rehman Khan Dec 9 '18 at 19:31