在Mathematica中可视化Root和Log函数
对于取n次根式,使用其实部
当做高度函数,可以实现可视化:
ViewRootSurface[n_Integer, resolution_Integer] := ParametricPlot3D[{r*Cos[theta], r*Sin[theta], r^(1/n)*Cos[theta/n]},{r, 0, 2}, {theta, 0, 2*n*Pi},PlotPoints -> {resolution, resolution*n},Boxed -> False, Axes -> False,AspectRatio -> 1, ViewPoint -> {-3, -3, 0}]ViewRootSurface[3, 20]
同样地,对于Log函数,使用相应的虚部作为高度函数,可可视化该函数:
ViewLogSurface[n_Integer, resolution_Integer] := ParametricPlot3D[{r*Cos[theta], r*Sin[theta], theta},{r, 0, 2}, {theta, 0, 2*Pi*n},PlotPoints -> {resolution, resolution*n},Boxed -> False, Axes -> False, AspectRatio -> 1/2, ViewPoint -> {-3, -2, 3}]ViewLogSurface[3, 30]