I think what you are seeking for is a funcion r(theta) such that
d(r)/d(r⊥) = d(r)/d(theta) * 1/r = - Ak sin(k theta)
and max(r) = base_radius + amplitude; min(r) = base_radius - amplitude
If so, the solution is r = C exp(A cos(k theta))
A = 0.5 ln((base_radius + amplitude)/(base_radius - amplitude))
C = sqrt((base_radius + amplitude)(base_radius - amplitude))
the corresponding code is
def inner(theta, n_petals, amplitude, base_radius):
A = 0.5 * np.log((base_radius + amplitude) / (base_radius - amplitude))
C = np.sqrt((base_radius + amplitude) * (base_radius - amplitude))
return C * np.exp(A * np.cos(n_petals * theta))
If this is not what you are seeking for, cloud you please describe your expectation mathmatically?