1

我用 Mathematica 8.04 编写了一个动画并将其保存为 myfile.cdf。它在我安装了mathematica的电脑上播放得很好。如果我在仅安装 Mathematica cdf 播放器的另一台计算机上播放它,它只会播放一小部分图像。有一个类似的命令Show[Graphical object1,Graphical object2, ... ]

我从 CDF 播放器收到一条错误消息,说

“Show Gcomb:无法在 Show[...”中组合 Graphics 对象

有人知道解决方案吗?


编辑:请求的代码

\[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]
4

1 回答 1

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]

数学图形

于 2011-12-10T12:02:23.743 回答