3

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.

Community
  • 1
  • 1
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
  • 1
    Edited and opened the question to the world – Dr. belisarius Apr 09 '11 at 05:18
  • @belisarius: Opened it to the world, then promptly smacked your solution down! :) – Simon Apr 09 '11 at 05:45
  • @Simon Yeah. I was working on it since Qiang left me a comment on the other question. We have all the rep business setup in order :) – Dr. belisarius Apr 09 '11 at 05:46
  • @belisarius: A perfect plan! BTW, talking about the "rep business" I chucked 100rep down on the [default ColorData in Plot](http://stackoverflow.com/questions/5399216/how-to-change-the-default-colordata-used-in-mathematicas-plot) question... since the problem's probably impossible (unless you work at WRI) I doubt that it will help things. – Simon Apr 09 '11 at 05:47

1 Answers1

3

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}]

enter image description here

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:

enter image description here

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190