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


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

Re: Plotting colorfunctions over multiple parametric curves

From "djmpark" <djmpark@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Plotting colorfunctions over multiple parametric curves
Date 2012-02-28 05:47 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jihppr$90r$1@smc.vnet.net> (permalink)
References <5868125.5962.1330344098277.JavaMail.root@m06>

Show all headers | View raw


You will obtain better responses if you supply a completely evaluable
example and not leave it up to responders to make up part of the input.


David Park
djmpark@comcast.net 
http://home.comcast.net/~djmpark/index.html 


From: Andrew Green [mailto:kiwibooga@googlemail.com] 


Hi there

I am a bit stuck with this one. I have several curves (circles in this
case) I want to plot at the same time. Each circle also has its own function
defining a unique potential as a function of theta around the curve. I want
to take advantage of Mathematica's colorfunction color scaling and show the
potential around each curve in a color scaled to the min and max values for
the entire set of circle potentials. I get about this far....

n = 5; (*number of circles*)

potential[theta_, i_] := Sin[2*i*theta];

circle[i_, theta_] := {x[i] + r[i]*Cos[theta], y[i] + r[i]*Sin[theta]};
(*x,y, and r are earlier defined vectors of coordinates, radius*)

ParametricPlot[
 Evaluate@Table[circle[i, theta], {i, 1, n}], {theta, 0, 2 Pi},  PlotStyle
-> Thick, Axes -> False,  ColorFunction ->
  Function[{x, y, theta}, ColorData["TemperatureMap"][theta]]];

I can get a nice rainbow color around each circle  but it is the same for
all because I can only seem to define one colorfunction and cannot
incorporate the potential function which varies for each circle "i".

Any help would be most appreciated.


Andrew Green

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


Thread

Re: Plotting colorfunctions over multiple parametric curves "djmpark" <djmpark@comcast.net> - 2012-02-28 05:47 +0000

csiph-web