MathGroup Archive 2009

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

Search the Archive

Re: Scalar plot in 3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96409] Re: Scalar plot in 3D
  • From: dh <dh at metrohm.com>
  • Date: Fri, 13 Feb 2009 03:41:22 -0500 (EST)
  • References: <gn11bt$7tg$1@smc.vnet.net>


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





Franco Milicchio wrote:

> Hi everyone! I am still struggling with my "rendering hassles" :)

> I don't really know how to implement this in Mathematica, although the idea

> is quite simple. I have a list of points in 3D, their relative scalar value,

> and I'd like to have them nicely rendered on the domain on which they are

> defined. In other words, I have sampled a scalar field on a torus, and I'd

> like to plot its value (by hue or any other color means). Simple as it is, I

> cannot figure how to obtain this!

> 

> Basically, I know the torus' radii (rMIN and rMAX), and I have my good

> vectors:

> 

> coords = {{x1, y1, z1}, {x2, y2, z2}, ...}

> values = {v1, v2, ...}

> 

> Is there anyone who can help me with this? I have seen ListVectorPlot3D, but

> it won't show in the plot the domain itself (so arrows laying on a torus),

> and ineed, it requires a vector field. Although I can fake a vector field,

> I'd like something more "visually appealing"! :)

> 

> Thanks to anyone!

>    Franco




  • Prev by Date: Re: Setting upvalues, using ^:=, such that they get actually used
  • Next by Date: Re: Definition of the similarity in a set of integers
  • Previous by thread: Re: Scalar plot in 3D
  • Next by thread: Re: Re: Scalar plot in 3D