Re: Looking for function (x,y)



On 27 Apr, 06:00, "Stephen J. Herschkorn" <sjhersc...@xxxxxxxxxxxx>
wrote:
Steve555 wrote:
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)?

What do you mean by "symmetric"? Do you mean that the graph of f is
symmetric with respect to the line x + y = 1? If so, I have two thoughts.

- Pick conic sections passing through (0,0) and (1,1) with an axis
lying on the line x + y = 1. You have to make sure that y is a
function of x for x in [0,1] for these.

- Consider functions of the form g(x) = +/- [b x (sqrt(2) - x)] ^a
where a and b are positive. Rotate the graph 45 degrees. For the
resulting graph to determine y as a function of x, (a,b) will be
resticted.

In both cases, the linear function does not fit into the suggested form.

--
Stephen J. Herschkorn sjhersc...@xxxxxxxxxxxx
Math Tutor on the Internet and in Central New Jersey and Manhattan

Thanks, Stephen. g(x) = +/- [b x (sqrt(2) - x)] ^a , looks the most
perfectly symmetical to me (which is of course what I asked for), but
given the computation cost of this (along with the 45degree rotation),
I would have to calculate it in advance and stored the results is a
lookup table.

(Hmmm, makes me think, if I calculated and stored just the extreme
values, maybe I could do a linear interpolate between x=y and those
values, on-the-fly.)

Steve

.



Relevant Pages

  • Re: Clear writing about relativity
    ... Hence tau() is not linear. ... But Einstein said it must be. ... A schoolboy should know enough maths to understand a graph. ...
    (sci.physics.relativity)
  • Re: Clear writing about relativity
    ... Hence tau() is not linear. ... But Einstein said it must be. ... A schoolboy should know enough maths to understand a graph. ...
    (sci.physics.relativity)
  • Re: Clear writing about relativity
    ... Hence tau() is not linear. ... But Einstein said it must be. ... A schoolboy should know enough maths to understand a graph. ...
    (sci.physics.relativity)
  • Re: Clear writing about relativity
    ... Hence tau() is not linear. ... But Einstein said it must be. ... A schoolboy should know enough maths to understand a graph. ...
    (sci.physics.relativity)
  • Re: Looking for function (x,y)
    ... symmetrical convex or concave curve in between. ... For the resulting graph to determine y as a function of x, will be resticted. ... the linear function does not fit into the suggested form. ...
    (sci.math)