Any equation that fits in this shape? (variable concavity)

  • I
  • Thread starter mikejm
  • Start date
  • #1
31
1

Main Question or Discussion Point

I'm working on an audio synthesis project and I need an equation that can create these lines:

equation.PNG


That is, I would like an equation that describes a line that always passes through (0,1) and (1,0), and has a single coefficient parameter that can be varied to create functions of intermediate concavity/convexity like the red line shown.

The concavity/convexity should be symmetric as if mirrored along the line of y=x between the boundaries of (0,1) and (1,0). Anything outside that range is irrelevant.

Is there an equation that can do this?
 

Attachments

Last edited:

Answers and Replies

  • #2
.Scott
Homework Helper
2,455
851
If I set the center of circle to be (x,y) = (b,b) for b>=1, and then set the radius of the circle to cross through (1,0) and (0,1):
r = sqrt(bb+ (bb-1)) = sqrt(2bb - 1)
then the equation for the circle will be:
(x-b)^2 + (y-b)^2 = bb +(b-1)^2
xx-2xb+bb+yy-2yb+bb = 2bb-2b+1
xx-2xb+bb+yy-2yb+bb-2bb+2b-1 = 0
xx-2xb+yy-2yb+2b-1 = 0
y = (2b+/-sqrt(2bb-4(xx-2xb+2b-1)))/2
y = b+/-sqrt(bb-(xx-2xb+2b-1))

but we only want the bottom of the circle, so:
y = b-sqrt(bb-(xx-2xb+2b-1))
 
  • #3
34,053
9,913
##(1-x)^a + (1-y)^a = 1## - this can be solved for y if you prefer that: ##y=1-(1-(1-x)^a)^{1/a}##

a=1 gives a straight line, a=2 gives a quarter-circle, larger a give something that passes closer to (0,0). It is always symmetric as you can see from the first equation.
Example curves.
 

Related Threads on Any equation that fits in this shape? (variable concavity)

  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
1
Views
2K
Replies
11
Views
906
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
3
Views
2K
Replies
6
Views
1K
  • Last Post
Replies
3
Views
2K
Replies
3
Views
2K
  • Last Post
Replies
1
Views
965
Top