Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1895 > unrolled thread

Re: Mathematica loop question

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-04-27 09:37 +0000
Last post2011-04-27 09:37 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Mathematica loop question DrMajorBob <btreat1@austin.rr.com> - 2011-04-27 09:37 +0000

#1895 — Re: Mathematica loop question

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-04-27 09:37 +0000
SubjectRe: Mathematica loop question
Message-ID<ip8o4l$pem$1@smc.vnet.net>
Also cool:

Module[{num = 10, m = RotationMatrix[3/4 Pi], yMax},
  yMax = Last[m.{num, 1}];
  Graphics[{Table[{x, y} =
      m.{i, j}; {EdgeForm@{Thick,
        ColorData["TemperatureMap"][1 - y/yMax]},
      ColorData["TemperatureMap"][y/yMax], Disk[{x, y}, 0.4]}, {i, 0,
      num}, {j, 0, i}]}]]

or

Module[{num = 100, m = RotationMatrix[3/4 Pi], yMax},
  yMax = Last[m.{num, 1}];
  Graphics[{Table[{x, y} =
      m.{i, j}; {ColorData["TemperatureMap"][y/yMax],
      Disk[{x, y}, 1]}, {i, 0, num}, {j, 0, i}]}]]

Bobby

On Tue, 26 Apr 2011 12:43:54 -0500, Sol Lederman <sol.lederman@gmail.com>  
wrote:

> That is way too clever!
>
> On Tue, Apr 26, 2011 at 11:37 AM, DrMajorBob <btreat1@austin.rr.com>  
> wrote:
>
>> Or this (after Patrick Scheibe):
>>
>> Module[{num = 10, m = RotationMatrix[3/4 Pi], yMax},
>>  yMax = Last[m.{num, 1}];
>>  Graphics[{EdgeForm@Directive[Thin, Black],
>>   Table[{x, y} = m.{i, j}; {ColorData["TemperatureMap"][y/yMax],
>>     Disk[{x, y}, 0.4]}, {i, 0, num}, {j, 0, i}]}]]
>>
>> Bobby
>>
>>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web