The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Array[] building speed
Replies: 1   Last Post: Nov 12, 1996 1:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Rich Klopp

Posts: 2
Registered: 12/7/04
Array[] building speed
Posted: Nov 9, 1996 1:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am faking a 600x400 pixel 8-bit gray-scale 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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.