Monday, November 01, 2021

[yplhzwod] curve to (1,1)

there are an infinite number of parabolas between 2 points.  here are 6 elegant ones between (0,0) and (1,1):

  1. y = x^2
  2. y = 1 - (1-x)^2 = 2*x - x^2 = x*(2-x)
  3. y = sqrt(x)
  4. y = 1 - sqrt(1-x)
  5. (x+y)^2 - 4*y = 0
  6. (x+y)^2 - 4*x = 0

the 5th and 6th parabolas are oriented at 45 degrees.  for both, their axis of symmetry is the line x+y = 1 , the perpendicular bisector between (0,0) and (1,1).

the 5th is tangent to the horizontal line y=0 at (0,0) and to the vertical line x=1 at (1,1).  between (0,0) and (1,1) the parabola has the following formula.  it is concave up:

y = 2 - 2*sqrt(1-x) - x

in terms of its tangencies, this parabola is like a circle of radius 1 centered at (0,1):

x^2 + (y-1)^2 = 1

Between (0,0) and (1,1), the formula for the quarter circle, the southeast quadrant from 3 o'clock to 6 o'clock, is

y = 1 - sqrt(1-x^2)

the 6th parabola is tangent to the vertical line x=0 at (0,0) and to the horizontal line y=1 at (1,1).  between (0,0) and (1,1) the parabola has the following formula.  it is concave down:

y = 2*sqrt(x) - x

in terms of its tangencies, this parabola is like a circle of radius 1 centered at (1,0):

(x-1)^2 + y^2 = 1

Between (0,0) and (1,1), the formula for the quarter circle, the northwest quadrant from 9 o'clock to 12 o'clock, is

y = sqrt(2*x - x^2)

generalizations:

one could construct similar curves of the form y = abs(x)^r and corresponding r-th root.  r does not have to be an integer.  similar to gamma correction.

similarly, one could generalize the quarter circle to quarter squircle or superellipse.

one could construct 4 similar curves with 2^x and log(x)/log(2) between (0,1) and (1,2).  shift vertically if you want to go from (0,0) to (1,1).  it is not 6 curves because there is no elegant 45-degree axis.  for 2^x, slope at endpoints are log(2) and 2*log(2), not particularly elegant numbers.

other exponential and logarithmic bases requiring scaling and shifting to go from (0,0) to (1,1).  perhaps these free parameters make things less elegant.

track transition curve (cornu spiral), actually two track transition curves, between straight lines y=0 and x=1, minimizing the curvature at the point of maximum curvature, presumably the midpoint, but not sure how to confirm this.  or, similar track transition curve between straight tracks y=0 (from negative infinity to (0,0)) and y=x (from (1,1) to positive infinity).

brachistochrone or tautochrone (cycloid).  half of a hump of a cycloid has aspect ratio pi/2 ~= 1.57, so, to preserve the timing properties, only one end of a portion of a cycloid between (0,0) and (1,1) can have an orthogonal tangent.

another interesting family has an inflection point.  the first curve below is like a sigmoid function (horizontal slope at endpoints) but not asymptotic.

y = (1-cos(x*pi))/2
y = arccos(1 - 2*x)/pi

same idea but with cube and cube root:

y = (1 + (2*x - 1)^3)/2 = 4*x^3 - 6*x^2 + 3*x
y = (1 + realcuberoot(2*x - 1))/2

where realcuberoot is the real root (not principal root) when the input is negative.  Mathematica calls it Surd.

further generalizable with splines, many free parameters.

No comments :