Re: 'Nother Inverse Function Question
- To: mathgroup at smc.vnet.net
- Subject: [mg126635] Re: 'Nother Inverse Function Question
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Sun, 27 May 2012 04:42:58 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201205250854.EAA26865@smc.vnet.net>
eqns[s_, t_] = Rationalize[{
x == s (2 + 1.2 (2 - y)^2) + (1 - s) (-3.2 - 1/3 (y - 1.3)^2),
y == t (-(x/3)^3 + x/2 + 2.5) + (1 - t) ((x/4)^3 + 1)}] //
Simplify;
ParametricPlot[{x, y} /.
FindRoot[eqns[s, t], {{x, 0}, {y, 2}}],
{s, 0, 1}, {t, 0, 1},
Axes -> False, AspectRatio -> 1,
ColorFunction -> (RGBColor[#3, .5, #4] &),
Exclusions -> {s == 1}]
tab = Table[FindRoot[eqns[s, t], {x, 0}, {y, 2}],
{s, 0, 1, .1}, {t, 0, 1, .1}];
xp = ListInterpolation[x /. tab, {{0, 1}, {0, 1}}];
yp = ListInterpolation[y /. tab, {{0, 1}, {0, 1}}];
ParametricPlot[{xp[s, t], yp[s, t]},
{s, 0, 1}, {t, 0, 1},
Axes -> False, AspectRatio -> 1,
ColorFunction -> (RGBColor[#3, .5, #4] &)]
Bob Hanlon
On Fri, May 25, 2012 at 4:54 AM, Bill Freed <billfreed at shaw.ca> wrote:
> Thanks for the previous hints on using InverseFunction. Will be helpful
> for me.
> I am working on parameterizing regions bounded by 4 curves in the plane
> or 6 surfaces in 3D.
> Below is an example for the region bounded by
> x=2+1.2(2-y)^2, x=-3.2-1/3(y-1/3)^2
> y=(-x/3)^3+x/2+2.5, y=(x/4)^3+1
>
> Table[FindRoot[{x == s (2 + 1.2 (2 - y)^2) + (1 - s) (-3.2 - 1/3 (y -
> 1.3)^2),
> y == t (-(x/3)^3 + x/2 + 2.5) + (1 - t) ((x/4)^3 + 1)}, {x, 0}, {y, 2}],
> {s, 0, 1, .1}, {t, 0, 1, .1}];
> x = ListInterpolation[x /. %, {{0, 1}, {0, 1}}];
> y = ListInterpolation[y /. %%, {{0, 1}, {0, 1}}];
> ParametricPlot3D[{x[s, t], y[s, t], 0}, {s, 0, 1}, {t, 0, 1}, ViewPoint
> -> {0, 0, +Infinity},
> Boxed -> False, Axes -> None, PlotPoints -> {25, 11}]
>
> The problem with this homemade inverter is frequent error messages
> concerning accuracy and convergence and also problems in choosing the
> starting points, here {x,0}, {y,2}.
> Is there a way of using InverseFunction or other Mathematica command
> that is more robust?
>
> Thanks
> Bll Freed
>
- References:
- 'Nother Inverse Function Question
- From: Bill Freed <billfreed@shaw.ca>
- 'Nother Inverse Function Question