Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Array[] building speed
Posted:
Nov 9, 1996 1:59 AM


I am faking a 600x400 pixel 8bit grayscale image by defining
grayfield[x_, y_] := Floor[ 256 * (1/2 + 1/4 N[Sin[2 Pi (x/100 + y/1800)]] + 1/4 N[Sin[2 Pi (x/4 + y/600)]]) ]
and then evaluating
grayimage = Array[ grayfield[ #1, #2 ]&, {600, 400}];
However, the latter takes bloody forever. (Well, how about 15 minutes on a Power Mac 7100.) Am I doing something wrong? I note that Show[]ing the DensityGraphics[] of grayimage ain't very speedy either.
 Rich Klopp



