Generating data from an oval

Input: endpoints μ,ν radius r, number (Subscript[n, p]) of points per unit square,standard deviation σ,number (Subscript[n, r]) of points generated from a normal distribution in the neighborhood of each point
a ∈ O([μ,ν],r); 
Output: distance;
Submodules: none needed

DataOval[a_,b_,r_,np_,sigma_,nr_,Ind_:0]:=Module[{Del,del=.2r,Nr,data,pi={},pod={},Pod,circle},
(*  
a: the left edge of the segment; b: the right edge of the segment; r: radius of generalized circle; 
np: number of points per unit square;
sigma: parameter from the normaln distribution;
nr: number of points generated from a normal distribution in the neighborhood of each data point pod[[i]];
Ind: If Ind ≠ 0 the results and the Figure are listed.
*) 
(* Defining of basic points *)
Del={{a[[1]]-r-del,b[[1]]+r+del},{a[[2]]-r-del,b[[2]]+r+del}};
Nr=Floor[np Area[Rectangle[{Del[[1,1]],Del[[2,1]]},{Del[[1,2]],Del[[2,2]]}]]];
data=RandomVariate[UniformDistribution[Del],Nr];
(* Defining [pod] inside of a circle with radius r *)
Do[
If[dist[data[[i]],a,b]≤ r,pod=AppendTo[pod,data[[i]]]
]
,{i,Nr}];
(* In each pod[[i]] nr points from normaln distribution are added *)
Do[
pi=AppendTo[pi,RandomVariate[MultinormalDistribution[pod[[j]],sigma IdentityMatrix[2]],nr]]
,{j,Length[pod]}];
Pod=Union[pod,Flatten[pi,1]];
(* Figure *)
If[Ind≠ 0,
slseg=ContourPlot[dist[{x,y},a,b]== r,{x,Del[[1,1]],Del[[1,2]]},{y,Del[[2,1]],Del[[2,2]]},ContourStyle->{Red}];
slPod=ListPlot[Pod,PlotStyle->{PointSize[.005]}];
Print[Show[slseg,slPod,PlotRange->Del,AspectRatio->Automatic,Frame->True,GridLines->Automatic,ImageSize->Small]];
Print["Oval: ",{a,b,r},"; Delta=",Del, "; |Pod|= ",Length[Pod]];
	];
{Pod,slseg}
]