對于取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]