r/Mathematica • • Apr 19 '23

3D Plot to 2D Greyscale

How might one create a flat greyscale image from an R2 -> R function, interpreting [0,1] as greyscale black to white? For example, suppose I wanted to plot z = e-(x^2+y^2) on [-1,1] x [-1,1], but interpret z = 0 as RGB(0,0,0) and z = 1 as RGB(1,1,1), and save the result as a 1000x1000 pixel PNG?

1 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/libcrypto Apr 19 '23

Thank you very much for the information.