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


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

Re: Plotting colorfunctions over multiple parametric curves

Started byAndrew Green <kiwibooga@googlemail.com>
First post2012-03-01 10:38 +0000
Last post2012-03-01 10:38 +0000
Articles 1 — 1 participant

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


Contents

  Re: Plotting colorfunctions over multiple parametric curves Andrew Green <kiwibooga@googlemail.com> - 2012-03-01 10:38 +0000

#8813 — Re: Plotting colorfunctions over multiple parametric curves

FromAndrew Green <kiwibooga@googlemail.com>
Date2012-03-01 10:38 +0000
SubjectRe: Plotting colorfunctions over multiple parametric curves
Message-ID<jinjin$d1n$1@smc.vnet.net>
Sorry if this post appears twice, after  24 hours and it not appearing I assumed I had done something wrong while posting.

Thanks Bob. I tried what you said (see under), but the colorfunction does not seem to be scaling the potential function. For instance assigning the potential function to (1 + theta) will give all red as it seems to be clipping to the 0 and 1 levels.

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]


Anymore thoughts ?


Thanks


Andrew

[toc] | [standalone]


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


csiph-web