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


Groups > comp.soft-sys.math.mathematica > #8784

Re: Plotting colorfunctions over multiple parametric curves

From Andrew Green <kiwibooga@googlemail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Plotting colorfunctions over multiple parametric curves
Date 2012-02-29 12:24 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jil5de$rmr$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hi Bob

Thanks for the reply. I am a step further thank you, but the results are strange.  It is as if the colorfunction is clipping values below 0 and above 1 - it is not scaling even if ColorFunctionScaling->true is added. Consider potential[theta_,i_] = theta+1.0, I would have expected you should still get a full rainbow of colors (0 to 2pi mapped to 0 to 1), instead all are red.

n = 3;
XYR = ( {
    {-2.1, 0, 1.0},
    {0, 0, 0.5},
    {2.1, 0, 1.0}
   } );
x[i_] := XYR[[i, 1]];
y[i_] := XYR[[i, 2]];
r[i_] := XYR[[i, 3]];

potential[theta_, i_] := theta + 1.0;
circle[i_, theta_] := {x[i] + r[i]*Cos[theta], y[i] + r[i]*Sin[theta]};

Show[Table[
  ParametricPlot[circle[i, theta], {theta, 0, 2 Pi}, 
   PlotStyle -> Thick, Axes -> False, ImageSize -> 200, 
   ColorFunction -> 
    Function[{x, y, theta}, 
     ColorData["TemperatureMap"][potential[theta, i]]], 
   ColorFunctionScaling -> True], {i, 1, n}], PlotRange -> All]

Any ideas why?

Thanks - Andrew

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Plotting colorfunctions over multiple parametric curves Andrew Green <kiwibooga@googlemail.com> - 2012-02-29 12:24 +0000

csiph-web