MathGroup Archive 2009

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

Search the Archive

Re: Re: Re: Scalar plot in 3D

On Feb 14, 2009, at 12:49pm, David Park wrote:

> Franco,
> Most of the color gradient functions have a scale that goes from 0  
> to 1. For
> precise control you can use ColorFunctionScaling -> False, and then  
> use
> Rescale on the coloring variable to make it fit that domain.
> David Park

Thanks, this did the right job! This is my code given radii r and R,  
and a list { {u, v}->scalarValue }:

   {(R + r*Cos[v]) Sin[u],
    (R + r*Cos[v]) Cos[u],
  {u, 0, 2 Pi},
  {v, 0, 2 Pi},
  ColorFunction -> Function[{x, y, z, u, v}, Hue[First[Nearest[vals,  
{v, u}]]]],
  ColorFunctionScaling -> False,
  Mesh -> 19,
  MeshStyle -> Gray

I rescaled the field with Rescale[] as you suggested. Do you have any  
suggestion on how to improve this code?

Franco Milicchio <franco.milicchio at>

DiS - Dept. of Studies on Structures
DIA - Dept. of Computer Science and Engineering
University Roma Tre

  • Prev by Date: Re: Select All Lists Where Any Element is a Given Value
  • Next by Date: Re: Using VerticalSlider controls for Manipulate
  • Previous by thread: Re: Re: Re: Scalar plot in 3D
  • Next by thread: internal details of Options, Default, Attributes