How to maintain a smooth surface in CDFs while playing? [duplicate]

This question already has an answer here:

PolarPlot render oddities

3 answers

I created a CDF for viewing the Möbius Band, and its generation.

1.- When it´s PAUSED the surface is soft and you can see with quality.

2.- But when you are playing and move the segmente that generate Möbius Band, …. the band seems to be less quality, and you can see point-squares, instead a soft line in the border.

…as you can see:

How can i do to maintain the surface …. soft!!

Any option in SaveDefaults?…. to save more points???

————- This code is edited after cormullion message
f[u_] = {2 Sin[u], 2 Cos[u], 0}
g[u_] = {0, Sin[u/2], Cos[u/2]}
ParametricPlot3D[f[u] + v g[u], {v, -1, 1}, {u, 0, 2 Pi},
PlotRange -> {-3.2, 3.2}, Axes -> True, AxesLabel -> {x, y, z},
Mesh -> None, ExclusionsStyle -> {None, Red},
PlotStyle ->
Directive[Green, Opacity[0.75`], Specularity[White, 20]],
PerformanceGoal -> “Quality”],

ParametricPlot3D[f[u] + v g[u], {v, -1, 1},
PlotRange -> {-3.2, 3.2}, Axes -> True, AxesLabel -> {x, y, z},
Mesh -> 1, MeshShading -> {Red, Blue}, PlotStyle -> Thick],
PerformanceGoal -> “Quality”], {u, 0, 2 \[Pi], Appearance -> “Open”},

Style[” En Verde vemos la famosa Cinta de Mobius”, Darker@Green],
Style[” También vemos la barra que la genera, al ir girando su \
centro sobre el plano z=0, a la vez que la barra gira un ángulo de \
180º. Dicha barra la pintamos de dos colores para ver su \
orientación”, Darker@Gray],
Style[” La Parte Azul=Parte positiva”, Darker@Blue ],
Style[” La Parte Roja=Parte Negativa”, Darker@Red],
Style[“IMPORTANTE: Fijarse como la barra comienza cabeza arriba, \
pero, tras completar el movimineto de los 360º, llega cabeza abajo”,
Style[“Creado y Diseñado por:”, Darker@Blue],
SaveDefinitions -> True]



2 Answers


The best (most straightforward) way to do this is to generate a table of figures and export the table instead of the Play[] function. That way, each plot will be entirely pre-computed. In dynamic blocks, Mathematica only computes as much as it needs to. It will show a lower-quality version while playing, then increase the quality when it’s paused. This is further discussed here:

Just swap your



t = Table[plot[i],{i,1,limit,stepsize}];

You can then play through with


or export the table directly with


Edit: Just to be clear, an example:

t = Table[Plot[Sin[x + a], {x, 0, 2*Pi}], {a, 0, 2*Pi, 0.1}];
Manipulate[t[[i]], {i, 1, Length[t], 1}]
Export[“videofile.avi”, t];



i can´t view the result of this. i obtain a list of plot, but no graphs, that i can view.
– Mika Ike
Jun 5 ’13 at 8:04

Without seeing the code (is it possible to see the code in a CDF file?), it’s not clear where to make the changes. I can’t see the slowdown on something similar (I tried to make it complex to slow it down and go blocky but it wouldn’t).

{(2 + s*Cos[a*t])*Cos[t],
(2 + s*Cos[a*t])*Sin[t],
{s, -1, 1},
{t, 0, 2 \[Pi]},
Lighting -> “Neutral”,
PlotPoints -> 50,
ImageSize -> {500, 500},
Boxed -> False,
Mesh -> False,
Axes -> False,
PlotStyle -> Directive[
Texture[ExampleData[{“TestImage”, “Lena”}]],
Specularity[1, 20]],
TextureCoordinateFunction -> ({#1, #2} &),
PerformanceGoal -> pg
{Red, Thick, Line[{
{(2 + -1 Cos[a*line])*Cos[line],
(2 + – 1*Cos[a*line])*Sin[line],
{(2 + 1 Cos[a*line])*Cos[line],
(2 + 1 Cos[a*line])*Sin[line],
{{a, 1/2}, 0, 1, .01, Appearance -> “Labeled”},
{{pg, “Speed”}, {“Speed”, “Quality”}},
{line, 0, 2 Pi},
ControlPlacement -> Top]



jajaja :-)) very good!!! You are a math-progrmamer-artist1 🙂
– Mika Ike
Jun 4 ’13 at 19:04



i have edited de first message, and copy the code, @cormullion
– Mika Ike
Jun 4 ’13 at 19:14



@mika good work! But this question has I think been answered now…
– cormullion
Jun 4 ’13 at 19:34



@cormulliom Yes, This question has been solved!
– Mika Ike
Jun 5 ’13 at 8:02