Converting a cartesian curve into parametric form I have a scalar field which I have interpolated using Bicubic Interpolation (https://en.wikipedia.org/wiki/Bicubic_interpolation). I am interested in finding out the midpoint of a countour of this field.
The equation of the curve is $$\sum_{i=0}^3\sum_{j=0}^3a_{ij}x^iy^j=p(x,y)=p_o$$
$p_o$ is the value at which I need the countour. To find the midpoint, I figured that if we could in some way convert this to a parametric equation with one parameter(t) varying from 0 to 1, we could just use the value of x,y corresponding to t=0.5.
Is there any way this could be done ?
 A: Common way to solve this kind of contours is via implicit functions and $y=f(x)$:
$$p(x,y)=p_0$$
$$\Rightarrow p(x,f(x))=p_0$$
$$\Rightarrow f(x) \text{ can be calculated from the equation}.$$
Basically it relies on the fact that the contour defined by $p(x,y)=p_0$ can be represented as a heightmap f(x).
Because your $p(x,y)$ formula is such complicated, the process might be more difficult than expected. We normally do this only with simple shapes like circles, so I can't help with applying the procedure with your bicubic interpolation formula.
This answer has the procedure done with circles: Circles and generic implicit functions
If closed form solution is too difficult, the procedure can be used as numerical solution, by choosing $x$ first, and then going nearer to $f(x)$ with distance function $dist(x) = p(x,f(x))-p_0$ where $dist(x)$ gets nearer to 0.
There's well known root finding algorithm, from Blinn's blob's paper, which is ordinarily used for ray marching 3d scenes, but it basically takes f(x), divides it by some (lipschitz) constant, and then goes forward that amount in x direction to go nearer to the root. Iterating the process allows finding the root. (that procedure supposedly doesnt jump over the root, if function is lipschitz continuous)
But in this case, we'd need to use the process in y-direction instead of x-direction, i.e. changing f(x) and calculating dist(x) at each step.
