In[]:=
project12[v_]:={v[[1]],v[[2]]};
In[]:=
f[x_,y_]:=y;
In[]:=
regDef[x_,y_]:=If[(x^2+(y-1)^2<1)||(x^2+(y+1)^2<1),True,False];
In[]:=
data=Table[{x,y,If[regDef[x,y],f[x,y],Sqrt[-1]]},{x,-2,2,.02},{y,-2,+2,.02}];
In[]:=
data=Flatten[data,1];
In[]:=
Dimensions[data]
Out[]=
{40401,3}
In[]:=
ListPlot[Map[project12,Select[data,#[[3]]≠Sqrt[-1]&]],PlotRangeAll,PlotStylePointSize[Small],AspectRatioAutomatic]
Out[]=
In[]:=
ListPlot3D[data]
Out[]=