Message Boards Message Boards

0
|
8238 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Animate picture 2D on Moodle

How can I put a picture taken withe the Animate function on my page Moodle eloctricics of my school, as it is appended?


 
 Animate[
  xmin = -5; xmax = 5; ymin = -a; ymax = 5 a;
  AA = {a Sin[2 t], a - a Cos[2 t]}; NN = {0, 2 a};
  MM = {(2 a Sin[2 t])/(1 - Cos[2 t]), 2 a};
  PP = {(2 a Sin[2 t])/(1 - Cos[2 t]), a - a Cos[2 t]};
  f[x_] := (2 a)^3/((2 a)^2 + x^2);
  tx = {Text["\!\(\*
 StyleBox[\"x\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", {xmax - 0.2, -0.2}], Text["\!\(\*
StyleBox[\"y\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", {-0.2, ymax - 0.2}], Text["\!\(\*
StyleBox[\"O\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", {-0.2, -0.3}], Text["\!\(\*
StyleBox[\"A\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", AA + {0.2, -0.2}], Text["\!\(\*
StyleBox[\"N\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", NN + {0.2, 0.2}], Text["\!\(\*
StyleBox[\"M\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0., 0., 0.]]\)", MM + {0, 0.2}], Text["\!\(\*
StyleBox[\"P\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontWeight->\"Plain\",\nFontSlant->\"Italic\",\n\
FontColor->RGBColor[0, 0, 1]]\)", PP + {0.2, 0.2}], Text["\!\(\*
StyleBox[\"curva\",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\" \",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\"de\",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\" \",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\"Agnesi\",\nFontFamily->\"Times New Roman\",\nFontSize->16,\
\nFontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\":\",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontColor->RGBColor[0, 0, 1]]\)", {-3.5 a, 4 a}], Text["\!\(\*
StyleBox[\"y\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\" \",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\"=\",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[\" \",\nFontFamily->\"Times New Roman\",\nFontSize->14,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]\)\!\(\*
StyleBox[FractionBox[
RowBox[{SuperscriptBox[
RowBox[{
RowBox[{\"(\",
RowBox[{\"2\", \"a\"}], \")\"}], \" \"}],
StyleBox[\"3\",\nFontSlant->\"Plain\"]],
StyleBox[\" \",\nFontFamily->\"Times New Roman\",\nFontSize->16,\n\
FontSlant->\"Italic\",\nFontColor->RGBColor[0, 0, 1]]}],
RowBox[{SuperscriptBox[
RowBox[{
RowBox[{\"(\",
RowBox[{\"2\", \"a\"}], \")\"}], \" \"}], \"2\"], \"+\", \
SuperscriptBox[
RowBox[{
StyleBox[\"x\",\nFontSlant->\"Italic\"], \" \"}],
StyleBox[\"2\",\nFontSlant->\"Plain\"]]}]],\nFontFamily->\"Times New \
Roman\",\nFontSize->14,\nFontColor->RGBColor[0, 0, 1]]\)", {1.5 a,
     4 a}, Left]};
li1 = {Line[{{xmin, 2 a}, {xmax, 2 a }}]};
li2 = {Thickness[0.001], Line[{{0, 0}, MM}]};
ci = {Circle[{0, a}, a]};
pt = {{PointSize[0.012], Point[{{0, 0}, AA, NN, MM}]}, {Blue,
    PointSize[0.015], Point[{PP}]}};
Plot[f[x], {x, xmin, xmax - a/3}, PlotStyle -> Blue,
  Epilog -> {tx, ci, li1, li2, pt}, AxesStyle -> Arrowheads[0.03],
  AspectRatio -> Automatic, PlotRange -> {{xmin, xmax}, {ymin, ymax}},
   Ticks -> None, ImageSize -> 400], {{t, 0, "inclinação"}, 0.0001,
  Pi - 0.00001, AnimationDirection -> Backward,
  Exclusions -> {0, Pi}}, {{a, 1/2, "raio"}, 1/2, 1, 1/2,
  AnimationRunning -> False}, AnimationRunning -> True]
Attachments:
2 Replies
Another exemple that I would like to put on my Moodel page so that anyone can change value of "abcissa de P".  How to do this? Thanks for the help!
Attachments:
Hi Jorge,

your attached file does open form me and it works - very nice code. You can use CDF probably to embed it to Moodle? Also wait for coming release of Wolfram Cloud that suppose to make such things easy. Or you can just make an animated GIF (or use LICEcap)

POSTED BY: Sam Carrettie
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