Hello,
I am interested in studying the behavior of certain types of parametrizations on the sphere. However, I only know how to generate them discretely. I am able to refine the mesh to a higher and higher density, but I would like to actually interpolate the data that I have.
My data are stored as a k by n by 3 array of values. Each row corresponds to one of the parameter lines, and each column corresponds to the other parameter line. How do I provide a domain and interpolate this array into a surface parametrization?
The key problems here are:
- I want my interpolation to pass through my data points *EXACTLY*.
- I want to specify the domain of my parameter variables.
My initial thoughts:
a) If I didn’t care about the interpolation passing through the points, I could use a BSplineFunction[], but I want to gaurantee that my sample points are in the interpolation.
b) I can’t figure out how to get Interpolation[] to take in data which are k by n by 3 and generate a parametrization. It seems like I need to have things in terms of Monge patches (i.e. {x, y, f(x,y)} but I can’t write my data in that format).
For example, given a sample of spherical coordinates, can we reconstruct a spherical coordinate parametrization of the sphere?
Here is some code to get started:
r[u_, v_] := N@{Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]};
spherePts = Table[r[u, v], {u, 0, 2 Pi, Pi/10}, {v, 0, Pi, Pi/20}];
Show[Graphics3D@Sphere[], ListPointPlot3D[spherePts, PlotStyle -> {PointSize[0.05]}]]
(* How do I specify a different domain here? *)
bsplineFunc = BSplineFunction[spherePts]
ParametricPlot3D[bsplineFunc[u, v], {u, 0, 1}, {v, 0, 1}]
(* These two values should be equal to each other, if the bsplineFunc \passed through all the interpolation points exactly. *)
bsplineFunc[1/2, 1/2] == spherePts[[11, 11]]
bsplineFunc[1/2, 1/2]
spherePts[[11, 11]]
Any thoughts would be greatly appreciated.
Best wishes,
Andy
By the way: I apologize for the poor formatting of the post. I was unable to copy and paste my Mathematica code into the Mathematica textboxes. Instead, I had to first paste as text and then convert the text into Mathematica code. How do I insert the output of Mathematica code + images, for example?
