Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1887 > unrolled thread
| Started by | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| First post | 2011-04-26 10:51 +0000 |
| Last post | 2011-04-26 10:51 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Mathematica loop question Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-04-26 10:51 +0000
| From | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| Date | 2011-04-26 10:51 +0000 |
| Subject | Re: Mathematica loop question |
| Message-ID | <ip683f$bn6$1@smc.vnet.net> |
Hi,
if you're just interested in the pattern you could create a simpler one
and rotate it:
With[{num = 10, m = RotationMatrix[3/4 Pi]},
Graphics[{Table[Disk[m.{i, j}, 0.25], {i, 0, num}, {j, 0, i}]}]
]
Cheers
Patrick
On Tue, 2011-04-26 at 04:43 -0400, Sol Lederman wrote:
> 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
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web