代码操作
说画就画
ClearAll["Global`*"]; x = Pi;
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}]]
p = Graphics3D[#, Boxed -> False, ImageSize -> 350] &@
NestList[Rotate[#, x/4, {x, -x, x}] &, Ball[Table[{[email protected] - Cos[100 t] [email protected], .5 [email protected] - Sin[100 t], t}, {t, 0, x/2, .001}], .06], 7];
list = rotateMeHarder1[p, {1, -1, 1}/8, 3 {x, -x, x/2}/2, {2, 5, 2}/5, 20, ViewAngle -> 50 Degree];
Export["PearlJewellery.gif", list]
输出结果
结果:
參考文献
參考了这里的代码:
时间: 2024-11-05 12:11:26