Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: 2-D Levy motion

  • To: mathgroup at
  • Subject: [mg4738] Re: 2-D Levy motion
  • From: gaylord at (richard j. gaylord)
  • Date: Mon, 2 Sep 1996 01:51:28 -0400
  • Organization: university of illinois
  • Sender: owner-wri-mathgroup at

In article <508qjp$i02 at>, gaylord at
(richard j. gaylord) wrote:

> In article <508o0o$dp2 at>, deb at (David E.
> Burmaster) wrote:
> > Dear MathGroup
> > 
> > Does anyone have a program that simulates 2-D Levy motion, a type of random
> > motion??
> > 
> hi dave:
> i do.
> -richard-

i guess you want the program.

i post this code with GREAT reluctance because it is VERY badly written 
[it uses Block because it was written in 1.x before Module was available
and it uses Do (and also the AppendTo) because it was written before i had
learned how to write a Mathematica program properly (ie., functionally)].
nonetheless, here it am for your use:

note: the range of df is 1.0 -> 2.0


LevyDust[df_Real, steps_Integer] :=
Block[{points = {}, x = 0, y = 0, z, w},
      z = (Random[])^(-1/df);
      w = (N[2 Pi] Random[]);
      x += (z Cos[w]);
      y += (z Sin[w]);
      AppendTo[points, {x, y}],
   ListPlot[points, PlotJoined->True, AspectRatio->1]




"if you're not programming functionally, then you're programming dysfunctionally"


  • Prev by Date: Re: HELP:problems simplifying big matrices
  • Next by Date: Numerical integration
  • Previous by thread: Re: HELP:problems simplifying big matrices
  • Next by thread: Numerical integration