Plotting a line with color changing as a function of position
- To: mathgroup at smc.vnet.net
- Subject: [mg124223] Plotting a line with color changing as a function of position
- From: "Eric Michielssen" <emichiel at eecs.umich.edu>
- Date: Sat, 14 Jan 2012 02:55:32 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hello,
I would like to plot/draw a line between two points p1= (x1,y1} and
p2={x2,y2}, and I would like the line color (preferred) or thickness or dash
density to be reflective of a known function f(d) that measures the
distance d from p1 to the point on the line.
Say p1={x1,y1}={0.,0.}, p2={10.,10}, and f[d_]:=Cos[d].
Is this possible?
Thanks!
Eric
Eric Michielssen
- Follow-Ups:
- Re: Plotting a line with color changing as a function of position
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Plotting a line with color changing as a function of position