Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10228
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: 'Nother Inverse Function Question |
| Date | 2012-05-27 08:44 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jpsphq$hdm$1@smc.vnet.net> (permalink) |
| 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@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
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: 'Nother Inverse Function Question Bob Hanlon <hanlonr357@gmail.com> - 2012-05-27 08:44 +0000
csiph-web