MathGroup Archive 2009

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

Search the Archive

Re: Re: Re: Scalar plot in 3D


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
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Franco Milicchio [mailto:franco.milicchio at gmail.com] 

On Feb 13, 2009, at 9:41am, dh wrote:

> Hi Franco,
>
> here is an example where the z-value is color coded:
>
> ParametricPlot3D[{{4 + (3 + Cos[v]) Sin[u], 4 + (3 + Cos[v]) Cos[u],
>    4 + Sin[v]}}, {u, 0, 2 Pi}, {v, 0, 2 Pi},
>  ColorFunction -> Function[{x, y, z}, Hue[z]]]
>
> her another one where the distance from the origin defines the color:
>
> ParametricPlot3D[{{4 + (3 + Cos[v]) Sin[u], 4 + (3 + Cos[v]) Cos[u],
>    4 + Sin[v]}}, {u, 0, 2 Pi}, {v, 0, 2 Pi},
>  ColorFunction -> Function[{x, y, z}, Hue[Norm[{x, y, z}]]]]
>
> hope this helps, Daniel



Hi Daniel,

Thanks, that helped a lot! It is quite strage to me that ColorFunction  
needs a unitary interval [0, 1], so I will scale down my domain and  
then use the Nearest[] function to find the scalar value "near" to a  
given point.

Thanks!

-- 
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: Re: Typesetting bug
  • Next by Date: Re: Benchmark performance Under AIX
  • Previous by thread: Re: Re: Scalar plot in 3D
  • Next by thread: Re: Re: Re: Scalar plot in 3D