Message Boards Message Boards

0
|
6654 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Pause on presentation

How to put Pause on presentation of a gif file using the Table Mathematica function?

f[x_]:=x^3-8/;x>=0;f[x_]:=-4 x-8/;x<0;
gg=Table[{
pt={PointSize[0.025],Red,Point[{{k, f},{2, 0}, {6, 0}}]},
li={Line[{{2, 0}, {k , f}, {6, 0}, {2, 0}}]},
po={Opacity[0.3], RGBColor[0.5, 0.5, 0.5],Polygon[{{2, 0}, {k , f}, {6, 0}}]},
tx={Text["x",{7.5,-0.8}],Text["y",{-0.4,11.6}],Text["O",{-0.4,-0.8}],Text["j",{3.5, 10}],Text["A",{6.2, 0.8}],
Text["B",{1.6,0.8}],Text["P", {k + 0.6, 0.6 + f}]},
leg=Inset[Row[{"Área: ", 2 Abs[f]}], {5,7}, Left],
g[k_]:=Plot[{f}, {x,-2.6,2.65},PlotStyle->{Blue,Thickness[0.01]},AspectRatio->1,
ImageSize->200,Axes->True,AxesStyle->Arrowheads[0.05],
Ticks->{{{-1,""},{-2,""},{1,""},{2,""},{3,""},{4,""},{5,""},6},{-8,-4,4,8}},
TicksStyle->Directive[12],PlotRange->{{-3,8},{-9,12}},
Epilog->{tx,pt,po,li,leg}]};
g,{k,{0,0.5,0.5,0.5,0.5,1,1,1,1,1,1,1.4,1.4,1.4,
1.4,1.4,1.7099759466766968`,1.7099759466766968`,
1.7099759466766968`,1.7099759466766968`,1.7099759466766968`,
1.7099759466766968`,2,2.2239800905693152`,2.2239800905693152`,
2.2239800905693152`,2.2239800905693152`,2.2239800905693152`,2.2239800905693152`,
2.35,2.35,2.35,2.35,2.5}}];
Export["graph02.gif",gg]
6 Replies
PS: the previous question was put by me!
Posted 10 years ago
There is a bug in Mathematica code earlier that present a variable triangle with a vertex in the graph of the function; then, the correction:

f[x_]:=x^3-8/;x>=0;f[x_]:=-4 x-8/;x<0;
gg=Table[{
pt={PointSize[0.025],Red,Point[{{k, f},{2, 0}, {6, 0}}]},
li={Line[{{2, 0}, {k , f}, {6, 0}, {2, 0}}]},
po={Opacity[0.3], RGBColor[0.5, 0.5, 0.5],Polygon[{{2, 0}, {k , f}, {6, 0}}]},
tx={Text["x",{7.5,-0.8}],Text["y",{-0.4,11.6}],Text["O",{-0.4,-0.8}],Text["f",{3.5, 10}],Text["A",{6.2, 0.8}],
Text["B",{1.6,0.8}],Text["P", {k + 0.6, 0.6 + f}]},
leg=Inset[Row[{"Área: ", 2 Abs[f]}], {4.5,7}, Left],
g[k_]:=Plot[{f}, {x,-2.6,2.65},PlotStyle->{Blue,Thickness[0.01]},AspectRatio->1,
ImageSize->200,Axes->True,AxesStyle->Arrowheads[0.05],
Ticks->{{{-1,""},{-2,""},{1,""},{2,""},{3,""},{4,""},{5,""},6},{-8,-4,4,8}},
TicksStyle->Directive[12],PlotRange->{{-3,8},{-9,12}},
Epilog->{tx,pt,po,li,leg}]};
g,{k,{0,0.5,0.5,0.5,0.5,1,1,1,1,1,1,1.4,1.4,1.4,
1.4,1.4,1.7099759466766968`,1.7099759466766968`,
1.7099759466766968`,1.7099759466766968`,1.7099759466766968`,
1.7099759466766968`,2,2.2239800905693152`,2.2239800905693152`,
2.2239800905693152`,2.2239800905693152`,2.2239800905693152`,2.2239800905693152`,
2.35,2.35,2.35,2.35,2.5}}];
Export["graph02.gif",gg]
The code continues with an error because of a right brackets;sending the attached file; will the imagem produced can be published to the community to see? Thank you.
Attachments:
My gif file "variable triangle with a vertex on the graph of a function" is evolving to what I call pertection!
Will annexed, see "Exemplo 3"
Attachments:
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract