Mathematica CDF Player无法正确播放我的动画

时间:2011-12-05 12:56:15

标签: wolfram-mathematica mathematica-8

我用Mathematica 8.04写了一个动画并将其保存为myfile.cdf。它在我安装了mathematica的计算机上运行良好。如果我在安装了Mathematica cdf播放器的另一台计算机上播放它,它只播放一小部分图像。有一个像Show[Graphical object1,Graphical object2, ... ]这样的命令。

我从CDF播放器收到错误消息

  

“显示Gcomb:无法在Show [...”

中组合图形对象

有人知道解决方案吗?


编辑:请求的代码

\[Phi] = -\[Pi]/6;
A2 = 1.5;
Kreis = ParametricPlot[{2.5 Cos[ t], 2.5 Sin[t]}, {t, 0, 
    2 \[Pi]},(*AspectRatio->1,*)
   PlotStyle -> {{Thickness[.005], RGBColor[1, 1, 1]}}, 
   AxesLabel -> {"Re", "Im"}, Ticks -> {{-3, 3}, {-3, 3}}, 
   ImageSize -> {338, 338}];

   sinus1 = Plot[Sin[x], {x, 0, 2 \[Pi]} , 
   PlotStyle -> {{Thickness[.005], RGBColor[1, 0, 0]}}, 
   Ticks -> {{0, \[Pi]/2, \[Pi], 3 \[Pi]/2, 2 \[Pi](*,5\[Pi]/2,3\[Pi],
      7\[Pi]/2,4\[Pi]*)}, {-3, -1, 1, 3}}, AxesLabel -> {"t", ""}, 
   PlotRange -> {{0, 2 \[Pi]}, {-2.5, 2.5}}, ImageSize -> {525, 525}];
sinus2 = Plot[A2 Sin[x - \[Phi]], {x, 0, 2 \[Pi]}, 
   PlotStyle -> {{Thickness[.005], RGBColor[0, 1, 0]}} ];
sinus3 = Plot[A2 Sin[x - \[Phi]] + Sin[x], {x, 0, 2 \[Pi]}, 
   PlotStyle -> {{Thickness[.005], RGBColor[0, 0, 1]}} , 
   PlotRange -> {{0, 2 \[Pi]}, {-2.5, 2.5}}];


Kreisbewegung = 
 Animate[(*\[Phi]3=ArcTan[(Sin[t]+A2 Sin[t-\[Phi]])/(Cos[t]+A2 Cos[
  t-\[Phi]])];
  A3=Sqrt[(Cos[t]+A2 Cos[t-\[Phi]])^2+(Sin[t]+A2 Sin[t-\[Phi]])^2];*)


  GraphicsRow[{Show [Kreis,(*ParametricPlot[{Cos[ s],Sin[s]},{s,0,t},
     PlotStyle->{{Thickness[.005],RGBColor[1,0,0]}}],
     ParametricPlot[{A2 Cos[ s],A2 Sin[s]},{s,0,t-\[Phi]},
     PlotStyle->{{Thickness[.005],RGBColor[0,1,0]}}],
     ParametricPlot[{ A3 Cos[s],A3 Sin[s]},{s,0,\[Phi]3},
     PlotStyle->{{Thickness[.005],RGBColor[0,0,1]}}],*)

     Graphics[{
        Red, Arrowheads[.05], Arrow[{{0, 0}, {Cos[t], Sin[t]}}],
       { Thickness[.0015], Red, Line[{{Cos[t], 0}, {Cos[t], Sin[t]}}]},


        Green, Arrowheads[.05], 
       Arrow[{{0, 0}, {A2 Cos[t - \[Phi]], A2 Sin[t - \[Phi]]}}],
        {Thickness[.0015], Green, 
        Line[{{A2 Cos[t - \[Phi]], 0}, {A2 Cos[t - \[Phi]], 
           A2 Sin[t - \[Phi]]}}]},
       Blue, Arrowheads[.05], 
       Arrow[{{0, 0}, {Cos[t] + A2 Cos[t - \[Phi]], 
          Sin[t] + A2 Sin[t - \[Phi]]}}],
        {Thickness[.0015],
        Blue, 
        Line[{{Cos[t] + A2 Cos[t - \[Phi]], 
           0}, {Cos[t] + A2 Cos[t - \[Phi]], 
           Sin[t] + 
            A2 Sin[t - \[Phi]]}}]},                                   


                  Axes -> True, AxesOrigin -> {0, 0}, Ticks -> None ,
           PlotRange -> {{-3, 3}, {-3, 3}}, AxesLabel -> {y, x}, 
       AspectRatio -> 1/1}]],



    Show[sinus1, sinus2, sinus3, 
     Graphics[{Thickness[.0015], Green, 
       Line[{{t, 0}, {t, A2 Sin[t - \[Phi]]}}],

                        RGBColor[0, 1, 0], PointSize[0.013], 
       Point[{t, A2 Sin[ t - \[Phi]]}],


                         Thickness[.0015], Red, 
       Line[{{t, 0}, {t, Sin[t]}}], 

                         RGBColor[1, 0, 0], PointSize[0.013], 
       Point[{t, Sin[t]}],


                         Thickness[.0015], Blue, 
       Line[{{t, 0}, {t, Sin[t] + A2 Sin[ t - \[Phi]]}}], 

                         RGBColor[0, 0, 1], PointSize[0.013], 
       Point[{t, Sin[t] + A2 Sin[ t - \[Phi]]}]


                     } ] 
                     ]


    }], {t, 0, 2 \[Pi]}, AnimationRate -> 0.01]

1 个答案:

答案 0 :(得分:1)

这是一个应该有效的版本。正如评论中所提到的,您的CDF代码需要在不评估一行代码的情况下工作。

\[Phi] = -\[Pi]/6;
A2 = 1.5;
Kreis = ParametricPlot[{2.5 Cos[t], 2.5 Sin[t]}, {t, 0, 
    2 \[Pi]},(*AspectRatio->1,*)
   PlotStyle -> {{Thickness[.005], RGBColor[1, 1, 1]}}, 
   AxesLabel -> {"Re", "Im"}, Ticks -> {{-3, 3}, {-3, 3}}, 
   ImageSize -> {338, 338}];
sinus1 = Plot[Sin[x], {x, 0, 2 \[Pi]}, 
  PlotStyle -> {{Thickness[.005], RGBColor[1, 0, 0]}}, 
  Ticks -> {{0, \[Pi]/2, \[Pi], 3 \[Pi]/2, 2 \[Pi](*,5\[Pi]/2,3\[Pi],
     7\[Pi]/2,4\[Pi]*)}, {-3, -1, 1, 3}}, AxesLabel -> {"t", ""}, 
  PlotRange -> {{0, 2 \[Pi]}, {-2.5, 2.5}}, 
  ImageSize -> {525, 525}]; sinus2 = 
 Plot[A2 Sin[x - \[Phi]], {x, 0, 2 \[Pi]}, 
  PlotStyle -> {{Thickness[.005], RGBColor[0, 1, 0]}}];
sinus3 = Plot[A2 Sin[x - \[Phi]] + Sin[x], {x, 0, 2 \[Pi]}, 
   PlotStyle -> {{Thickness[.005], RGBColor[0, 0, 1]}}, 
   PlotRange -> {{0, 2 \[Pi]}, {-2.5, 2.5}}];

Manipulate[
 (*\[Phi]3=ArcTan[(Sin[t]+A2 Sin[t-\[Phi]])/(Cos[t]+A2 Cos[t-\[Phi]])];
 A3=Sqrt[(Cos[t]+A2 Cos[t-\[Phi]])^2+(Sin[t]+A2 Sin[t-\[Phi]])^2];*)
 GraphicsRow[{Show[Kreis,(*ParametricPlot[{Cos[s],Sin[s]},{s,0,t},
    PlotStyle->{{Thickness[.005],RGBColor[1,0,0]}}],
    ParametricPlot[{A2 Cos[s],A2 Sin[s]},{s,0,t-\[Phi]},
    PlotStyle->{{Thickness[.005],RGBColor[0,1,0]}}],
    ParametricPlot[{A3 Cos[s],A3 Sin[s]},{s,0,\[Phi]3},
    PlotStyle->{{Thickness[.005],RGBColor[0,0,1]}}],*)
    Graphics[{Red, Arrowheads[.05], 
      Arrow[{{0, 0}, {Cos[t], Sin[t]}}], {Thickness[.0015], Red, 
       Line[{{Cos[t], 0}, {Cos[t], Sin[t]}}]}, Green, Arrowheads[.05],
       Arrow[{{0, 0}, {A2 Cos[t - \[Phi]], 
         A2 Sin[t - \[Phi]]}}], {Thickness[.0015], Green, 
       Line[{{A2 Cos[t - \[Phi]], 0}, {A2 Cos[t - \[Phi]], 
          A2 Sin[t - \[Phi]]}}]}, Blue, Arrowheads[.05], 
      Arrow[{{0, 0}, {Cos[t] + A2 Cos[t - \[Phi]], 
         Sin[t] + A2 Sin[t - \[Phi]]}}], {Thickness[.0015], Blue, 
       Line[{{Cos[t] + A2 Cos[t - \[Phi]], 
          0}, {Cos[t] + A2 Cos[t - \[Phi]], 
          Sin[t] + A2 Sin[t - \[Phi]]}}]}, Axes -> True, 
      AxesOrigin -> {0, 0}, Ticks -> None, 
      PlotRange -> {{-3, 3}, {-3, 3}}, AxesLabel -> {y, x}, 
      AspectRatio -> 1/1}]], 
   Show[sinus1, sinus2, sinus3, 
    Graphics[{Thickness[.0015], Green, 
      Line[{{t, 0}, {t, A2 Sin[t - \[Phi]]}}], RGBColor[0, 1, 0], 
      PointSize[0.013], Point[{t, A2 Sin[t - \[Phi]]}], 
      Thickness[.0015], Red, Line[{{t, 0}, {t, Sin[t]}}], 
      RGBColor[1, 0, 0], PointSize[0.013], Point[{t, Sin[t]}], 
      Thickness[.0015], Blue, 
      Line[{{t, 0}, {t, Sin[t] + A2 Sin[t - \[Phi]]}}], 
      RGBColor[0, 0, 1], PointSize[0.013], 
      Point[{t, Sin[t] + A2 Sin[t - \[Phi]]}]}]]}], {t, 0, 2 \[Pi]}, 
 SaveDefinitions -> True]

Mathematica graphics