MathGroup Archive 2011

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

Search the Archive

Mathematica loop question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118387] Mathematica loop question
  • From: Sol Lederman <sol.lederman at gmail.com>
  • Date: Tue, 26 Apr 2011 04:43:16 -0400 (EDT)

Hi,

I'm teaching myself Mathematica.

I've plotted this:

   Graphics[{
  Blue,
  Disk[{5, 10}, .25],
  Disk[{4, 9}, .25],
  Disk[{6, 9}, .25],
  Disk[{3, 8}, .25],
  Disk[{5, 8}, .25],
  Disk[{7, 8}, .25],
  Disk[{2, 7}, .25],
  Disk[{4, 7}, .25],
  Disk[{6, 7}, .25],
  Disk[{8, 7}, .25],
  Disk[{1, 6}, .25],
  Disk[{3, 6}, .25],
  Disk[{5, 6}, .25],
  Disk[{7, 6}, .25],
  Disk[{9, 6}, .25]
  }]


Is there an elegant way to write this without a bunch of Disk statements?
I'm imagining that this would be a double nested loop.


Thanks.


Sol


  • Prev by Date: Same Programming Problem Implemented in Multiple Paradigms
  • Next by Date: Re: Limit[f[x], x->a] vs. f[a]. When are they equal?
  • Previous by thread: Re: Same Programming Problem Implemented in Multiple Paradigms
  • Next by thread: Re: Mathematica loop question