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 }:

ParametricPlot3D[
  {
   {(R + r*Cos[v]) Sin[u],
    (R + r*Cos[v]) Cos[u],
    r*Sin[v]}},
  {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 gmail.com>

DiS - Dept. of Studies on Structures
DIA - Dept. of Computer Science and Engineering
University Roma Tre
http://plm.dia.uniroma3.it/milicchio/



  • 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