模仿细胞的分裂--彩图,动态

发现一个数学过程可视化之后,跟细胞分裂很像;

ClearAll["Global`*"];
complexGrid = 
  Compile[{{max, _Real}, {n, _Integer}}, 
   Module[{r}, r = Range[-max, max, 2 max/(n - 1)];
    Outer[Plus, -I r, r]]];

complexHSB = 
  Compile[{{Z, _Complex, 2}}, 
   Module[{h, s, b, b2}, h = 0.5 + Arg[Z]/(2 Pi);
    s = Abs[Sin[2 Pi Abs[Z]]];
    b = Abs[Sin[2 Pi Im[Z]] Sin[2 Pi Re[Z]]]^0.25;
    b2 = 0.5 ((1 - s) + b + Sqrt[(1 - s - b)^2 + 0.01]);
    Transpose[{h, Sqrt[s], b2}, {3, 1, 2}]]];

domainImage[func_, max_: 2 Pi, n_: 700] := 
  ImageResize[
   ColorConvert[
    Image[complexHSB@func@complexGrid[max, 2 n], ColorSpace -> "HSB"],
     "RGB"], n];

domainPlot[func_, max_: Pi, n_: 500] := 
  ContourPlot[0, {x, -max, max}, {y, -max, max}, Contours -> {}, 
   RotateLabel -> False, 
   FrameLabel -> {"Re[z]", "Im[z]", 
     "Domain Colouring of " <> ToString@StandardForm@func@"z"}, 
   BaseStyle -> {FontFamily -> "Calibri", 14}, 
   Epilog -> 
    Inset[domainImage[func, max, n], {0, 0}, {Center, Center}, 
     2` max]];

list = Table[
   Manipulate[
    domainImage[(2 I)/(c - I #^2) &, Pi, 300], {{c, k}, 0, 5}], {k, 0,
     5, 0.1}];
Export["testDomainAgain.gif", list, "BackgroundColor" -> White, 
 "TransitionEffect" -> Background]

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值