In the attached image are three functions. The first is a displacement function which takes angle $t$, and returns a radius. The third one is a semicircle and the second one is a semicircle with the displacement function $d()$ applied.
Note that the second function includes $y$ in the right hand side (inside $\text{atan2}$). I need to factor this equation so that it is entirely dependent on $x$, and there is no $y$ variable on the right hand side of the equation.
Reproduced here, the equation is:
$y=\sqrt{ d(\text{atan2}( y, x ) )^2 - x^2 }$
I need to get this ^ y moved to the left.
edit: bigger picture, I'm trying to do raycasting of a sphere with a displacement map using an orthographic camera. This is why I only care about the greatest y, because lower y are not visible to the camera due to occlusion. My thought was that if I could scan across with a single x, on a 2 dimension version of the problem I'd be closer to solving the 3 dimensional version.
edit: let me ask this a different way. Given a line, how can I find the location of a the points which this line intersects with the equation?
edit again: it seems the answer is binary search. http://http.developer.nvidia.com/GPUGems3/gpugems3_ch21.html