Re: Looking for function (x,y)



On 26 Apr, 22:35, donald.patter...@xxxxxxxxx wrote:
On Apr 26, 2:27 pm, Steve555 <foursh...@xxxxxxxxxxxxxx> wrote:

Hi,

I'm looking for a function similar to y = x from 0 to 1, where (0,0)
and (1,1) are fixed, but with tuneable parameters to give a
symmetrical convex or concave curve in between.
(I'm writing C code to allow the user to shape the output of an
oscillator).

Could this be done with one function, or would I need three (concave,
linear, convex) ?

Thanks for any advice

Steve

hi,
plotting y=x^n for various values (1/n for convex) might do what you
need, but that's probably not symmetric...

another way would to be to rotate the function y=x(1-x) to the
right location, since that's definitely symmetric about the line
x=1/2. to do this you would need your function to be parametric, but
on the plus side, there's only one parameter to tune. you can do this
by writing y=cx(1-x) in parametric form, ie x(t) = t, y(t) = ct(1-t)
for t=0..1 then apply a rotation (and stretch so that the function
ends up at (1,1))

in the end, you get the function f(t) = [x(t), y(t)]
where x(t) = t + c(t^2 - t)
and y(t) = t - c(t^2 - t)
and t goes from 0 to 1

then different c values will give you different symmetric concave,
convex and linear curves (c>0 gives convex, c=0 for linear, c<0 for
concave)

does this help/make sense?

Donald

It didn't make sense at first, but I'm glad I persevered and plotted
it! This is closest to what I was originally visualising, and it
appears to give a constant amount of bulge/sag for changes in c.
Thanks!, I learned a lot from going through this. The fly-in-the-
ointment, though, is that to get as extreme curvature in to the
corners (0,1), (1,0), as Randy's solution, y can exceed 1, or go below
0, which for my oscillator would result in distortion.

.



Relevant Pages

  • Re: Looking for function (x,y)
    ... symmetrical convex or concave curve in between. ... Could this be done with one function, or would I need three (concave, ... linear, convex)? ...
    (sci.math)
  • Re: how to identify identify overthrusting sheets.
    ... convexity would be inverted and the arc would be concave. ... Take a soft balloon or some other inflated sphere. ... Is it concave outward or convex outward? ... I can explain it with a cold overducted slab of lithosphere, ...
    (sci.geo.geology)
  • Re: how to identify identify overthrusting sheets.
    ... the overriding sheet form a convex orogenic arc moving onto the lower ... If the ocean crust was subducted, ... inverted and the arc would be concave. ... plane falling into the interior of the sphere is convex. ...
    (sci.geo.geology)
  • Re: Accelerating Universe is insult to Relativity
    ... Reason my "Concave & Convex theory" adds to GR concave curve of space,by ...
    (sci.physics)
  • Re: how to identify identify overthrusting sheets.
    ... the overriding sheet form a convex orogenic arc moving onto the lower ... If the ocean crust was subducted, ... inverted and the arc would be concave. ... Take a soft balloon or some other inflated sphere. ...
    (sci.geo.geology)

Quantcast