Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3568 > unrolled thread

Re: Contour ColorFunction in a ParametricPlot

Started byBob Hanlon <hanlonr@cox.net>
First post2011-07-08 08:56 +0000
Last post2011-07-08 08:56 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Contour ColorFunction in a ParametricPlot Bob Hanlon <hanlonr@cox.net> - 2011-07-08 08:56 +0000

#3568 — Re: Contour ColorFunction in a ParametricPlot

FromBob Hanlon <hanlonr@cox.net>
Date2011-07-08 08:56 +0000
SubjectRe: Contour ColorFunction in a ParametricPlot
Message-ID<iv6gor$s5c$1@smc.vnet.net>
contours = 6;
ParametricPlot3D[
 {Cos[p] Sin[t], Sin[p] Sin[t], Cos[t]},
 {p, 0, 2 Pi}, {t, 0, Pi},
 PlotPoints -> 200,
 Mesh -> None,
 ColorFunction -> Function[{x, y, z, p, t},
   Hue[Round[Sin[6 p] Sin[6 t], 1/contours]]],
 ColorFunctionScaling -> True]


Bob Hanlon

---- "Blandeau M.N." <mnb1f10@soton.ac.uk> wrote: 

=============
Hello,
I looked for this specific question in the archive and I did not find.

I want to create a contour (ie. not smooth) ColorFunction over a parametricplot.

For example:
ParametricPlot3D[ {Cos[ \[Phi]] Sin[\[Theta]],
  Sin[\[Phi]] Sin[\[Theta]], Cos[\[Theta]]}, {\[Phi], 0,
  2 \[Pi]}, {\[Theta], 0, \[Pi]}, PlotPoints -> 100, Mesh -> None,
 ColorFunction ->
  Function[{x, y, z, \[Phi], \[Theta]},
   Hue[Sin[6 \[Phi]] Sin[6 \[Theta]]]], ColorFunctionScaling -> True]

Here the colorfunction is smooth, what directive should I add to obtain a contour of the colour and to manage the number of contours ?

Thanks in advance.

Mathias Blandeau


From: Blandeau M.N.
Sent: 06 July 2011 14:35
To: 'mathgroup@smc.vnet.net'
Subject: subscription to mathgroup mailing list

Hi,
I would like to be added to the mathgroup mailing list, I am using Mathematica for my PhD and I have several questions to ask.
Thank you in advance

Mathias Blandeau

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web