Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

special ColorFunction

  • To: mathgroup at
  • Subject: [mg5766] special ColorFunction
  • From: rustybel at (Russell Towle)
  • Date: Sat, 18 Jan 1997 14:58:50 -0500
  • Sender: owner-wri-mathgroup at


I wish to construct a special ColorFunction for use in DensityPlots.  The
object is to assign an RGB color to each cell in such a way that the
(normalized) magnitude of the cell is divided into red and green
components.  First, the red component would be the greatest multiple of
1/256 below the actual normalized magnitude; and then, the green component
would be 1/256 of whatever is left over from this greatest multiple of

The blue part of the RGB would just be zero.  The object is to use the MMA
DensityPlot to contruct a matrix of 16-bit "numbers," 8 bits to red, 8 bits
to green.  This can then be used in POV-Ray as a height field.

I would very greatly appreciate any suggestions.  An example of such a
special ColorFunction is as follows:

ColorFunction -> (GrayLevel[#^3]&).


Russell Towle
Giant Gap Press:  books on California history, digital topographic maps
P.O. Box 141
Dutch Flat, California 95714
Voice:  (916) 389-2872
e-mail:  rustybel at

  • Prev by Date: special ColorFunction
  • Next by Date: Re: Mathematica 2 problem
  • Previous by thread: special ColorFunction
  • Next by thread: Re: Mathematica 2 problem