MathGroup Archive 2010

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

Search the Archive

plotting many curves

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108311] plotting many curves
  • From: eric g <eric.phys at gmail.com>
  • Date: Sat, 13 Mar 2010 07:57:27 -0500 (EST)

Hello Group,

I know I should avoid For cycles in mathematica, but I am C person... 
how to do this without For

(*--------initialization------------------*)
n = 10^2;
xoi = RandomReal[{-10, 10}, {n}];
yoi = RandomReal[{-10, 10}, {n}];
ri = RandomReal[{0, 10}, {n}];
-----------------------------------
(*

n=10^2;
Clear[circles];
circles = Table[Null, {n}];
For[i = 1, i <= n, i++,
  circles[[i]] = {xoi[[i]] + ri[[i]]*Cos[t], yoi[[i]] + ri[[i]]*Sin[t]}]

(*---------------displaying--------------------*)
ParametricPlot[circles, {t, 0, 2 Pi}, PlotStyle -> Black]




  • Prev by Date: Exporting equations as high-quality graphics
  • Next by Date: QuickFactorInteger
  • Previous by thread: Exporting equations as high-quality graphics
  • Next by thread: Re: plotting many curves