       Re: Colorfunction + parametricplot3d + plotrange = ?

• To: mathgroup at smc.vnet.net
• Subject: [mg103795] Re: [mg103774] Colorfunction + parametricplot3d + plotrange = ?
• From: "David Park" <djmpark at comcast.net>
• Date: Tue, 6 Oct 2009 08:01:53 -0400 (EDT)
• References: <21704474.1254764568161.JavaMail.root@n11>

```I don't know why that happens. I would say it is a bug.

But, the problem goes away if you specify the plot range to include the
entire curve.

ParametricPlot3D[{5*Cos[fi], 5*Sin[fi], fi}, {fi, 0, 2 Pi},
ColorFunction -> Function[{xx, yy, zz}, If[zz < 2, Red, Blue]],
PlotStyle -> {Thickness[0.01]},
ColorFunctionScaling -> False,
PlotRange -> {{-6, 6}, {-6, 6}, {-6, 7}}]

PlotRange -> Automatic also works, as in:

ParametricPlot3D[{0, 0, d}, {d, 0, 1*^13},
ColorFunction ->
Function[{xx, yy, zz, d}, If[d >= 5*^12, Blue, Red]],
ColorFunctionScaling -> False, PlotStyle -> {Thickness[0.03]},
PlotRange -> Automatic, BoxRatios -> {2, 2, 10},
SphericalRegion -> True, RotationAction -> "Clip"]

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: koringkriek [mailto:astronerma at gmail.com]

Hi,
I am using Mathematica 7 on Max OS X and came across this problem:

When I want to plot:

ParametricPlot3D[{5*Cos[fi], 5*Sin[fi], fi}, {fi, 0, 2 Pi},
ColorFunction -> Function[{xx, yy, zz}, If[zz < 2, Red, Blue]],
PlotStyle -> {Thickness[0.01]}, ColorFunctionScaling -> False]

It gives a nice plot which I can rotate in the notebook with mouse.
But as soon as I add PlotRange specification:

ParametricPlot3D[{5*Cos[fi], 5*Sin[fi], fi}, {fi, 0, 2
Pi},ColorFunction -> Function[{xx, yy, zz}, If[zz < 2, Red, Blue]],
PlotStyle -> {Thickness[0.01]}, ColorFunctionScaling -> False,
PlotRange -> {{-6, 6}, {-6, 6}, {-6, 6}}]

Not only the colors of the curve are corrupted showing strange white
stripes but also at the attempt to rotate the 3D plot Mathematica
crashes.

In other cases, for example such a simple plot:

ParametricPlot3D[{0, 0, d}, {d, 0, 1*^13}, ColorFunction -> Function
[{xx, yy, zz, d}, If[d >= 5*^12, Blue, Red]], ColorFunctionScaling ->
False, PlotStyle -> {Thickness[0.03]}, PlotRange -> {{-1*^12, 1*^12},
{-1*^12, 1*^12},{-2*^12, 8*^12}}, BoxRatios -> {2, 2, 10}]

can be rotated but the line has these strange white stripes all along.
One thing I have noticed is the stripes go worse if I increase
PlotPoints number.

Could you please tell me what I am doing wrong or confirm this
behavior?

Cheers
Anna

```

• Prev by Date: Re: How to find which variable caused the trigger in Manipulate[]
• Next by Date: RE: Axes not connected at the origin
• Previous by thread: Re: Colorfunction + parametricplot3d + plotrange = ?
• Next by thread: Re: Colorfunction + parametricplot3d + plotrange = ?