MathGroup Archive 2007

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

Search the Archive

Re: replace jpg with animated gif?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80109] Re: replace jpg with animated gif?
  • From: zzzz <giarc54 at gmail.com>
  • Date: Mon, 13 Aug 2007 04:24:17 -0400 (EDT)
  • References: <f9mqg6$rel$1@smc.vnet.net>

On Aug 12, 4:21 am, zzzz <giar... at gmail.com> wrote:
> Hi all,
> This little program allows you to manipulate a photo in 3d. (thanks to
> Chris Hill for viewangle tip!)
> I adapted it from the "neat examples" for listplot3d in version 6.
> Never satisfied, I now would like to know how to do something similar
> but
> with an animated gif instead of the jpeg. Is it posssible? One might
> have to end up making
> an animated gif of an animated gif ! Please help me in my quest for
> the ultimate in
> goofy programs.
>     ALSO, It is a pain having to edit each photo to 512x512 pixles.
> does someone know a way to
> make the program more flexible? I'm not really clear on the span (;;)
> concept.
>
> Thanx everybody!

Here's the program that I stupidly forgot to include in my first
messege!

asd = Import["buz512.jpg",
   "Data"];       (* pic512 is a jpg photo. It must be edited to be \
512X512 pixels *)
(*ArrayPlot[(255-asd)]       prints your jpg  if you want   *)
asd = N[asd/255.];
DynamicModule[{va = 90 Degree},
 ListPlot3D[
  Table[(50^2) - ((x - 0)^2) - ((y - 0)^2), {x, -5, 5, .1}, {y, -5,
    5, .1}],
  Mesh -> None, VertexColors -> {asd[[5 ;; -5 ;; 5, 5 ;; -5 ;; 5]]},
  Lighting -> "Neutral", PlotStyle -> Opacity[0.75],
  BoxRatios -> Automatic, ImageSize -> {400, 400},
  Axes -> False,
  ViewAngle -> Dynamic[Module[{y = ControllerState["Y2"]},
     If[Abs[y] > 0.2, va += y*0.05;
      va = Clip[va, {1 Degree, 179 Degree}]        ]; va          ]

       (*dynamic*)]
    (*Lplot3d*)]
      (*dmodule*)]



  • Prev by Date: Re: Increasing scattered subsequence
  • Next by Date: Re: FourierTransform of Sign^2 ?
  • Previous by thread: replace jpg with animated gif?
  • Next by thread: Pane in the Magnification