Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Using J.M.'s implementation of polyharmonic splinesJ.M.'s implementation of polyharmonic splines:

points = {1, 1, 0.2} # & /@ 
   Select[RandomReal[{-1, 1}, {20, 3}], f @@ Most@# > 0 &];
f[x_, y_] := 1 - x^2 - y^2
pointsByF = ({1, 1, 1/f @@ Most@#} # &) /@ points;
zByF[x_, y_] := Evaluate@polyharmonicSpline[pointsByF, {x, y}];
z[x_, y_] := f[x, y] zByF[x, y]
Show[Plot3D[z[x, y], {x, -1, 1}, {y, -1, 1}, Exclusions -> None, 
  RegionFunction -> (f[#1, #2] >= 0 &)], 
 Graphics3D[{Black, Sphere[points, 0.02]}], BoxRatios -> Automatic, 
 PlotRange -> All]

enter image description here

Using J.M.'s implementation of polyharmonic splines:

points = {1, 1, 0.2} # & /@ 
   Select[RandomReal[{-1, 1}, {20, 3}], f @@ Most@# > 0 &];
f[x_, y_] := 1 - x^2 - y^2
pointsByF = ({1, 1, 1/f @@ Most@#} # &) /@ points;
zByF[x_, y_] := Evaluate@polyharmonicSpline[pointsByF, {x, y}];
z[x_, y_] := f[x, y] zByF[x, y]
Show[Plot3D[z[x, y], {x, -1, 1}, {y, -1, 1}, Exclusions -> None, 
  RegionFunction -> (f[#1, #2] >= 0 &)], 
 Graphics3D[{Black, Sphere[points, 0.02]}], BoxRatios -> Automatic, 
 PlotRange -> All]

enter image description here

Using J.M.'s implementation of polyharmonic splines:

points = {1, 1, 0.2} # & /@ 
   Select[RandomReal[{-1, 1}, {20, 3}], f @@ Most@# > 0 &];
f[x_, y_] := 1 - x^2 - y^2
pointsByF = ({1, 1, 1/f @@ Most@#} # &) /@ points;
zByF[x_, y_] := Evaluate@polyharmonicSpline[pointsByF, {x, y}];
z[x_, y_] := f[x, y] zByF[x, y]
Show[Plot3D[z[x, y], {x, -1, 1}, {y, -1, 1}, Exclusions -> None, 
  RegionFunction -> (f[#1, #2] >= 0 &)], 
 Graphics3D[{Black, Sphere[points, 0.02]}], BoxRatios -> Automatic, 
 PlotRange -> All]

enter image description here

Source Link
user484
user484

Using J.M.'s implementation of polyharmonic splines:

points = {1, 1, 0.2} # & /@ 
   Select[RandomReal[{-1, 1}, {20, 3}], f @@ Most@# > 0 &];
f[x_, y_] := 1 - x^2 - y^2
pointsByF = ({1, 1, 1/f @@ Most@#} # &) /@ points;
zByF[x_, y_] := Evaluate@polyharmonicSpline[pointsByF, {x, y}];
z[x_, y_] := f[x, y] zByF[x, y]
Show[Plot3D[z[x, y], {x, -1, 1}, {y, -1, 1}, Exclusions -> None, 
  RegionFunction -> (f[#1, #2] >= 0 &)], 
 Graphics3D[{Black, Sphere[points, 0.02]}], BoxRatios -> Automatic, 
 PlotRange -> All]

enter image description here