Mathematica CDF Player 无法正确播放我的动画
我用 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]
I wrote an animation with Mathematica 8.04 and saved it as myfile.cdf. It plays nicely on my computer which has mathematica installed. If I play this on a different computer with only Mathematica cdf player installed, it only plays a fraction of the images. There is a command like Show[Graphical object1,Graphical object2, ... ]
.
I get an error Message from the CDF Player saying
"Show Gcomb: Could not combine Graphics objects in Show[..."
Does anybody know a solution?
EDIT: requested code
\[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]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个应该可以工作的版本。正如评论中提到的,您的 CDF 代码需要在不评估一行代码的情况下工作。
Here is a version that should work. As mentioned in the comments your CDF code needs to work without evaluating a line of code.