Try this curve
This is valid for and and gives you half of the wave.
Now you can use the algebra of functions to reflect stretch and shift this any where.
To complete this wave you would graph
Let me know if this works for you.
Hi MHF community! Hi. I develop audio synthesis and sequencing application, and am currently exploring a new synthesis technique. As part of this, I'll be specifying three [x,y] co-ordinates. two of them will represent the 'base' of a waveform ie [a, b] and [c, b]. the third will represent the 'peak point' above the 'base' ie [d, e] where a<d<c and e>b. Now, I need a function with a user-specified parameter: 'skinniness' (s for short). When s is a low value, the function should draw a smooth curve from [a,b], with a peak at [d, e], then down back to [c,b]. The low s value means the curve should 'bow out' as much as possible. When s is an intermediate value, the curve should essentially look similar to a triangle ie a straight line from [a,b] to [d,e] and a straight line from [d,e] to [c,b]. When s is high, the curves between the points should be as 'sucked in' as possible; something that looks line an exponential from [a,b] to [d,e], and a reversed exponential from [d,e] back down to [c,b]. Assistance please to meet this objective?
Thanks for the function. Is this saying that y=1 if x=1?
Because, if 0<x<2 (as you have) and 0<y<10 (say) then the points could be:
first point: [0,0]
second point specified by user (which must be peak of wave): [0.2, 3]
third point: [2,0]
or:
first point: [0,0]
second point specified by user (which must be peak of wave): [1.6, 8]
third point: [2,0]
etc
So to get your first one you would use the function
I can't upload any files except .pdf so I changed this animated .gif file to a pdf so I could upload it. If you want to see it you will need to change it back to a .gifwave.pdf
This is what that would look like as s ranges between 0 and 100 and going though the points you gave.
Here is the maple code used to generate the .gif file
Note that there is an artifact from the use of the Heaviside step function in the plot.Code:with(plots): z := piecewise(s <> 50, (exp(tan((1/100)*Pi*s-(1/2)*Pi)*x)-1)/(exp(tan((1/100)*Pi*s-(1/2)*Pi))-1), x); j := animate(plot, [((Heaviside(x)-Heaviside(x-.2))*3)*(eval(z, x = x/(.2))), x = 0 .. 2], s = 1 .. 99); k := animate(plot, [((Heaviside(x-.2)-Heaviside(x-2))*3)*(eval(z, x = -(x-2)/(2-.2))), x = 0 .. 2], s = 1 .. 99); display(j,k);
Brilliant! Meets the criteria perfectly
Just for my education, are there applications (perhaps Scilab?) where one can specify constraint criteria that a curve must fit, and the application then provides a few simulations with accompanying functions? I imagine it wouldn't be quite as straightforward as that...
Although TheEmptySet's function is useable, after working with it a bit I now realize that my specification was a tad incomplete. Is it possible for the curve to be completely continuous around the peak (like a sinewave is continuous)? EmptySet's function results in a discontinuity at the peak as a result of the splicing of two waveform halves. For example this function:
y = y1 + (x-x1)((-y1+y2/-x1+x2) + ((x-x2)((y1-y2/-x1+x2) + (-y2+y3/-x2+x3))/ (-x1+x3))
does the trick, but has the deficiency that it does not support s-parameter based curve variability. (Another advantage of the aforementioned function is that the start and end points need not be in the same plane ie they can have different y values).
I do not know what the protocol is on this forum if the requester realizes a deficiency in the specification after a solution satisfying the original criteria is posted, so apologies in advance, but the IDEAL situation would be if the curve does what EmptySet's curve does, with the additional requirements that:
a) The curve be smooth all the way (ie continuous through the peak point)
b) It be possible for the end points of the curve to have differing y values
Do I need to create a new post? Again, sorry!
I am confused. The function is continuous at the peak! I need to ask clarification then. I am guessing you mean differentiable? If so how differentiable? is enough?
If this is the cases you have contradicted what you asked for in the first post
While this is continuous it cannot be differentiable at the peak for all values of s.When s is an intermediate value, the curve should essentially look similar to a triangle ie a straight line from [a,b] to [d,e]
Also for the 2nd question by using the algebra of function you can change the y coordinate of either side of the wave.
sorry yes, by continuous I meant not just no breaks, but no 'bends/kinks/sharp corners'. yes, this implies differentiable and 'continuously differentiable C1 class' would be enough I believe. As for the triangle analogy, if the sides and apex are a little 'curved' it is fine...I just meant 'sort of' approaching a triangle; if it deviates from a triangle appearance more or less, it is not a deal breaker...