问题
I came across this post and found belisarius' answer interesting. Wondering whether he someone can post his
complete mma code and give some explanation. In general, my question is about how to achieve this kind of annimation/plotting behavior in mma. It looks amazing to me!
Many thanks.
回答1:
Please tell me if further explanation is needed.
x[t_] := {Cos@t, Sin@t, .1 t} /; t <= 3 Pi;
x[t_] := {Cos@t, Sin@t, .3 Pi (4 - t/Pi)} /; t > 3 Pi;
plotRange = {{-110, 110}, {-110, 110}, {-10, 110}};
z1 = ParametricPlot3D[100 x[t], {t, 0, 4 Pi}, PlotRange -> plotRange];
hel = Import["ExampleData/helicopter.dxf.gz",
ViewPoint -> {10, 10, 10}, AlignmentPoint -> {80, 80, 80}];
zz = Table[
Show[z1,
Graphics3D[
Translate[Rotate[First[hel], t + Pi/2, {0, 0, 1}], 100 x[t]]],
PlotRange -> plotRange], {t, 0, 4 Pi, 4 Pi/15}];
Export["c:\\test.gif", zz, "DisplayDurations" -> .5]
(* Or
Animate[Show[z1,
Graphics3D[
Translate[Rotate[First[hel], t + Pi/2, {0, 0, 1}], 100 x[t]]],
PlotRange -> plotRange], {t, 0, 4 Pi}]

One could calculate the heli rotation using the curve derivatives. Too lazy to do it right now.
Edit
To comply with Sjoerd's home decoration rules:

来源:https://stackoverflow.com/questions/5603044/moving-an-autocad-dxf-solid-along-a-3d-path-in-mathematica