Circle → rounded square
Superellipse Explorer
Geometry
x = R[1 + sgn(cos t)|cos t|^(2/m)]
y = R[1 + sgn(sin t)|sin t|^(2/m)]
|(x−R)/R|^m + |(y−R)/R|^m = 1
m = 1: diamond; m = 2: circle; m = 4: rounded square. Larger m approaches a square. The centre is (R,R); the bounds are 0 to 2R on both axes.