Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: SpinShow problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56421] Re: [mg56339] SpinShow problem
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 24 Apr 2005 03:29:23 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks to Mark Fisher and Peter Pein we now have a way to do this, but I do
not understand the internals.

They use the following two system functions.

?$RasterFunction
System`$RasterFunction
$RasterFunction = ($AnimationDisplayFunction[#1]; ) &

?$AnimationFunction
System`$AnimationFunction
$AnimationFunction = Null &

However I do not find any documentation on the meaning and use of these
functions. (In fact the user's access to animation control is very poorly
done in the present Mathematica.) Apparently, to get the graphics output we
have to get rid of the ";" in $RasterRunction and change Null& to Identity
in $AnimationFunction.

Then I wrote the following routine to obtain the graphics objects as output
for any of the commands in the Graphics`Animation` package. (Mark Fisher's
routine from his site works well and has the additional advantage allowing
the suppression of the display, but is specialized to SpinShow.)

AnimationGraphics::usage =
    "AnimationGraphics[animatecommand] generates the regular animations \
produced by the various commands in the Animation packages and also returns
\
the list of graphics objects produced.";
Attributes[AnimationGraphics] = {HoldFirst};
AnimationGraphics[animatecommand_] :=
  Block[{$AnimationFunction = Identity, $RasterFunction = $DisplayFunction},
    animatecommand]

For examples...

Needs["Graphics`Animation`"]

plot1 = Plot3D[x*Cos[y], {x, -1, 1}, {y, -Pi, Pi}, Axes -> False,
    Boxed -> False];

AnimationGraphics[SpinShow[plot1]]

frame[p_] :=
    Plot3D[x Cos[p y], {x, -1, 1}, {y, -Pi, Pi},
      Axes -> False,
      Boxed -> False];

AnimationGraphics[Animate[frame[p], {p, 0, 4, 0.25}]]

AnimationGraphics[
  MovieParametricPlot[{s Cos[2 Pi s + t], s Sin[2 Pi s + t]}, {s, 0, 4}, {t,
      0, 2Pi}, Frames -> 10, Axes -> False, AspectRatio -> Automatic,
    PlotRange -> {{-4, 4}, {-4, 4}}]]

AnimationGraphics[
  MoviePlot3D[x Cos[p y], {x, -1, 1}, {y, -\[Pi], \[Pi]}, {p, 0, 2, 0.1},
    Axes -> False,
    Boxed -> False]]

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



From: shawn peng [mailto:shawnpeng23 at yahoo.com.cn]
To: mathgroup at smc.vnet.net


I used SpinShow command to rotate a 3D graph. But when I export the results,
they can't be saved as .gif file. So, my question is how to save "SpinShow"
results as a .gif file in order to get a 3D movie?
Thanks.
Shawn






  • Prev by Date: Re: simplifying ulam spiral code
  • Next by Date: Re: simplifying ulam spiral code
  • Previous by thread: Re: Re: SpinShow problem
  • Next by thread: A bug in Integrate ?