欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

算命用琥珀水晶球

程序员文章站 2022-07-03 21:54:49
...
h = DensityPlot3D[
  Sin[x] Cos[y] Sin[z], {x, y, z} \[Element] Ball[{0, 0, 0}, 5], 
  PlotTheme -> "Classic", ColorFunction -> "Rainbow", Boxed -> False, 
  Axes -> False, PlotPoints -> 100]

rotateMeHarder1[g_, vertical_, viewpoint0_, center_List: {0, 0, 0}, 
  nframes_Integer: 15, opts : OptionsPattern[]] := 
 Module[{grlist}, 
  grlist = Table[Show[g, ViewVertical -> vertical,ViewVector -> {RotationMatrix[2 Pi/nframes i, vertical].(viewpoint0 - center) + center, center}, SphericalRegion -> True, opts], {i, 0, nframes - 1}]]

h01list = 
 rotateMeHarder1[h, {0, 0, 1}, {8, 8, 8}, {0, 0, 0}, 50, 
  ViewAngle -> 50 Degree]

Export["amber-crystallBall.gif", h01list, "TransparentColor" -> White, 
 "TransitionEffect" -> "Background", "DisplayDurations" -> 0.1, 
 "AnimationRepetitions" -> Infinity]

ListAnimate@h01list

算命用琥珀水晶球