Re: How to find the equidistance curves of a curve defined by Interpolation function?
- To: mathgroup at smc.vnet.net
- Subject: [mg27917] Re: [mg27863] How to find the equidistance curves of a curve defined by Interpolation function?
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Fri, 23 Mar 2001 04:31:51 -0500 (EST)
- References: <200103220930.EAA08453@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
liwen liwen wrote:
>
> Dear friends,
>
> How are you! I want to know how to find the
> equidistance curves of a curve defined by
> Interpolation function, for example,
> when the equidistance is 2, the equidistance curve of
> a circle with a radium of 5 is a circle with a radium
> of 3, now I want to
> find the equidistance curves of an Interpolation curve
> defined by the following data:
>
> data1={{0,0},{1,1},{2,3},{5,8},{7,12}};
> cur=Interpolation[data1];
>
> The equidistance curves of the curve defined above has
> two curves. How can I find them?
>
> Thank you very much!
>
> Liwen 3/21/2001
>
> e-mail: gzgear at yahoo.com
This can be done by creating offset points. You do so by moving 2 units
in a direction perpendicular to a given point on the curve. You get
perps by rotating tangents. As you are dealing with an interpolation
function, this might be a bit fuzzy, but you can get something
approximate as follows.
data1 = {{0,0},{1,1},{2,3},{5,8},{7,12}};
cur = Interpolation[data1]
tangents = Table[{1,cur'[x]}, {x,0,7,.1}];
tangents = Map[(#/Sqrt[1+#[[2]]^2])&, tangents];
perps = Map[{#[[2]],-#[[1]]}&, tangents];
offsetbelow = Table[{x,cur[x]}, {x,0,7,.1}] + 2*perps;
offsetabove = Table[{x,cur[x]}, {x,0,7,.1}] - 2*perps;
To get an idea of how it all looks, try something like
graph = Plot[cur[x], {x,0,7}, AspectRatio->1,
DisplayFunction->Identity];
graphbelow = ListPlot[offsetbelow, PlotJoined->True, AspectRatio->1,
DisplayFunction->Identity, PlotStyle->Hue[.3]];
graphabove = ListPlot[offsetabove, PlotJoined->True, AspectRatio->1,
DisplayFunction->Identity, PlotStyle->Hue[.6]];
Show[graphabove, graph, graphbelow, DisplayFunction->$DisplayFunction]
You can of course also make an Interpolation from the offset curves.
Daniel Lichtblau
Wolfram Research
- References:
- How to find the equidistance curves of a curve defined by Interpolation function?
- From: liwen liwen <gzgear@yahoo.com>
- How to find the equidistance curves of a curve defined by Interpolation function?