jpc*_*dre 3 3d wolfram-mathematica r geometry-surface
我有数据x和y时间z=z1, z=z2 and z=z3.我想在3d图上绘制数据并用3d表面逼近曲线并知道表面的方程.这会更容易在R或Mathematica上实现吗?比如我怎么能用R做呢?谢谢
数据(示例):
For z=0
y 0.00 1.50 1.92 2.24
x 0.0000 0.0537 0.0979 0.2492
For z=2
y 0.00 2.21 2.83 3.07
x 0.0000 0.0173 0.0332 0.0655
For z=5
y 0.00 0.29 2.49 3.56
x 0.0000 0.0052 0.0188 0.0380
Run Code Online (Sandbox Code Playgroud)
在Mathematica中:
假设你有一组点qt:
ListPointPlot3D[qt]
Run Code Online (Sandbox Code Playgroud)

您可以轻松构建插值函数:
Plot3D[Interpolation[qt][x, y], {x, -2, 2}, {y, -2, 2}, Ealuated -> True]
Run Code Online (Sandbox Code Playgroud)

如果需要显式函数模型,可以建议并计算其参数:
model = a x^2 + b y^2;
fit = FindFit[qt, model, {a, b}, {x, y}];
Show[Plot3D[model /. fit, {x, -2, 2}, {y, -2, 2}, PlotRange -> All],
ListPointPlot3D[qt, PlotStyle -> Directive[PointSize[Medium], Red]]]
Run Code Online (Sandbox Code Playgroud)

编辑
绘制漂亮的图表相当容易:
