Let us assume that we have a 2D Interpolating function u[x,y].
We can plot its contours by
ContourPlot[u[x,y],{x,xmin,xmax},{y,ymin,ymax}]
But how for given u0 can we extract all points x0,y0 such that u[x0,y0]=u0 in a table form?
Let us assume that we have a 2D Interpolating function u[x,y].
We can plot its contours by
ContourPlot[u[x,y],{x,xmin,xmax},{y,ymin,ymax}]
But how for given u0 can we extract all points x0,y0 such that u[x0,y0]=u0 in a table form?
u[x_, y_] := x + y
int = Interpolation @ Catenate @ Table[{{x, y}, u[x, y]}, {x, 0, 1, 0.1}, {y, 0, 1, 0.1}];
u0 = 0.5;
plot = ContourPlot[int[x, y] == u0, {x, 0, 1}, {y, 0, 1}]
Investigating
FullForm[plot]
leads to
pts = Cases[plot, _GraphicsComplex, Infinity][[1, 1]];
ListPlot[pts, PlotRange -> {{0, 1}, {0, 1}}, Frame -> True, AspectRatio -> 1]
The above extracts the deafult number of points used by ContourPlot. To extract more points, add PlotPoints -> 100 (or any other suitable number) as an option to ContourPlot.
x0,y0! – SpaceChild Jan 18 '17 at 15:58